#include <refcounter_decls.h>
Inheritance diagram for WeakReference< RC >:
Public Member Functions | |
WeakReference () | |
Constructs a WeakReference that will throw a NullPointerException when dereferenced. | |
WeakReference (const WeakReference &other) | |
Constructs a WeakReference by referencing the same object as another WeakReference other. | |
WeakReference (const Reference< RC > &other) | |
Constructs a WeakReference by referencing the same object as a "real" Reference other. | |
WeakReference (RC *obj) | |
Constructs a WeakReference by referencing given obj. | |
WeakReference & | operator= (const WeakReference &other) |
The assignment operator is needed for reference counting. | |
WeakReference & | operator= (const Reference< RC > &other) |
The assignment operator is needed for reference counting. | |
bool | operator== (const WeakReference &other) const |
Checks whether this and other reference the same object. | |
bool | operator== (const Reference< RC > &other) const |
Checks whether this and other reference the same object. | |
bool | operator!= (const WeakReference &other) const |
Checks whether this and other reference the same object. | |
bool | operator!= (const Reference< RC > &other) const |
Checks whether this and other reference the same object. | |
Reference< RC > | operator * () const |
Returns the RefCounter derived object referenced. | |
~WeakReference () | |
This destructor is needed for reference counting. | |
Friends | |
class | Reference< RC > |
WeakReference< RC >::WeakReference | ( | const WeakReference< RC > & | other | ) | [inline] |
Constructs a WeakReference by referencing the same object as another WeakReference other.
other | contains the reference to copy |
WeakReference< RC >::WeakReference | ( | const Reference< RC > & | other | ) | [inline] |
Constructs a WeakReference by referencing the same object as a "real" Reference other.
other | contains the reference to copy |
WeakReference< RC >::WeakReference | ( | RC * | obj | ) | [inline] |
Constructs a WeakReference by referencing given obj.
Note that there might not be "real" References so the referenced object might not be destroyed when this WeakReference dies.
obj | is a pointer to the object to be referenced |
WeakReference< RC > & WeakReference< RC >::operator= | ( | const WeakReference< RC > & | other | ) | [inline] |
The assignment operator is needed for reference counting.
other | is contains the reference to copy |
WeakReference< RC > & WeakReference< RC >::operator= | ( | const Reference< RC > & | other | ) | [inline] |
The assignment operator is needed for reference counting.
other | is contains the reference to copy |
bool WeakReference< RC >::operator== | ( | const WeakReference< RC > & | other | ) | const [inline] |
Checks whether this and other reference the same object.
other | is the WeakReference to compare to |
bool WeakReference< RC >::operator== | ( | const Reference< RC > & | other | ) | const [inline] |
Checks whether this and other reference the same object.
other | is the Reference to compare to |
bool WeakReference< RC >::operator!= | ( | const WeakReference< RC > & | other | ) | const [inline] |
Checks whether this and other reference the same object.
other | is the WeakReference to compare to |
bool WeakReference< RC >::operator!= | ( | const Reference< RC > & | other | ) | const [inline] |
Checks whether this and other reference the same object.
other | is the Reference to compare to |
Reference< RC > WeakReference< RC >::operator * | ( | ) | const [inline] |
Returns the RefCounter derived object referenced.
NullPointerException |