ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

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(). More...

#include <pool.h>

List of all members.

Public Member Functions

 Ptr ()
 Ptr (T *obj)
 Ptr (const Ptr &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

Private Member Functions

void reset ()

Private Attributes

T * _obj

Friends

class PoolObject

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.

Definition at line 103 of file pool.h.


Constructor & Destructor Documentation

template<class T>
Grim::PoolObject< T >::Ptr::Ptr (  )  [inline]

Definition at line 105 of file pool.h.

template<class T>
Grim::PoolObject< T >::Ptr::Ptr ( T *  obj  )  [inline]

Definition at line 106 of file pool.h.

template<class T>
Grim::PoolObject< T >::Ptr::Ptr ( const Ptr ptr  )  [inline]

Definition at line 110 of file pool.h.

template<class T>
Grim::PoolObject< T >::Ptr::~Ptr (  )  [inline]

Definition at line 114 of file pool.h.


Member Function Documentation

template<class T>
Grim::PoolObject< T >::Ptr::operator bool (  )  const [inline]

Definition at line 122 of file pool.h.

template<class T>
Grim::PoolObject< T >::Ptr::operator T * (  )  const [inline]

Definition at line 129 of file pool.h.

template<class T>
bool Grim::PoolObject< T >::Ptr::operator! (  )  const [inline]

Definition at line 123 of file pool.h.

template<class T>
bool Grim::PoolObject< T >::Ptr::operator!= ( T *  obj  )  const [inline]

Definition at line 125 of file pool.h.

template<class T>
T& Grim::PoolObject< T >::Ptr::operator* (  )  const [inline]

Definition at line 128 of file pool.h.

template<class T>
T* Grim::PoolObject< T >::Ptr::operator-> (  )  const [inline]

Definition at line 127 of file pool.h.

template<class T>
PoolObject< T >::Ptr & Grim::PoolObject< T >::Ptr::operator= ( const Ptr ptr  ) 

Definition at line 349 of file pool.h.

template<class T>
PoolObject< T >::Ptr & Grim::PoolObject< T >::Ptr::operator= ( T *  obj  ) 

Definition at line 336 of file pool.h.

template<class T>
bool Grim::PoolObject< T >::Ptr::operator== ( T *  obj  )  const [inline]

Definition at line 124 of file pool.h.

template<class T>
void Grim::PoolObject< T >::Ptr::reset (  )  [inline, private]

Definition at line 132 of file pool.h.


Friends And Related Function Documentation

template<class T>
friend class PoolObject [friend]

Definition at line 136 of file pool.h.


Member Data Documentation

template<class T>
T* Grim::PoolObject< T >::Ptr::_obj [private]

Definition at line 134 of file pool.h.


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


Generated on Sat Jun 15 2019 05:04:36 for ResidualVM by doxygen 1.7.1
curved edge   curved edge