Crazy Eddie's GUI System
0.8.3
|
Simple, generic, reference counted pointer class. This is primarily here for use by the Events system to track when to delete slot bindings. More...
Public Member Functions | |
RefCounted () | |
Default constructor. | |
RefCounted (T *ob) | |
Contruct a RefCounted object that wraps the pointer ob. | |
RefCounted (const RefCounted< T > &other) | |
Copy constructor. | |
~RefCounted () | |
Destructor. Only deletes the associated object if no further references exist. | |
RefCounted< T > & | operator= (const RefCounted< T > &other) |
Assignment operator. Previously held object gets its reference count reduced, and is deleted if no further references exist. The newly assigned object, taken from other, gets its count increased. | |
bool | operator== (const RefCounted< T > &other) const |
Return whether the two RefCounted ptrs are equal (point to the same object) | |
bool | operator!= (const RefCounted< T > &other) const |
Return whether the two RefCounted ptrs are not equal (point to different objects) | |
const T & | operator* () const |
Return the object referred to by the wrapped pointer. (beware of null pointers when using this!) | |
T & | operator* () |
const T * | operator-> () const |
Return the wrapped pointer. | |
T * | operator-> () |
bool | isValid () const |
Return whether the wrapped pointer is valid. i.e. that it is not null. | |
Simple, generic, reference counted pointer class. This is primarily here for use by the Events system to track when to delete slot bindings.