ScummVM API documentation
Grim::PoolObject< T >::Ptr Class Reference

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)
 
Ptroperator= (T *obj)
 
Ptroperator= (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
 

Detailed Description

template<class T>
class Grim::PoolObject< T >::Ptr

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.


The documentation for this class was generated from the following file: