Smart pointer class This class wraps a C pointer to T, subclass of PoolObject, which gets reset to NULL as soon as the object is deleted, e.g by Pool::restoreObjects(). Its operator overloads allows the Ptr class to be used as if it was a raw C pointer. More...
#include <pool.h>
Public Member Functions | |
Ptr (T *obj) | |
Ptr (const Ptr &ptr) | |
Ptr & | operator= (T *obj) |
Ptr & | operator= (const Ptr &ptr) |
operator bool () const | |
bool | operator! () const |
bool | operator== (T *obj) const |
bool | operator!= (T *obj) const |
T * | operator-> () const |
T & | operator* () const |
operator T* () const | |
Smart pointer class This class wraps a C pointer to T, subclass of PoolObject, which gets reset to NULL as soon as the object is deleted, e.g by Pool::restoreObjects(). Its operator overloads allows the Ptr class to be used as if it was a raw C pointer.