jigdo API
Last update by Admin on 2010-05-23
SmartPtr< X > Class Template Reference
Smart pointer, i.e. More...
#include <smartptr.hh>
Public Types | |
typedef X | element_type |
Public Member Functions | |
SmartPtr () | |
~SmartPtr () | |
SmartPtr (const SmartPtr &x) | |
template<class Y> | |
SmartPtr (const SmartPtr< Y > &y) | |
SmartPtr (X *x) | |
SmartPtr & | operator= (const SmartPtr &x) |
template<class Y> | |
SmartPtr & | operator= (const SmartPtr< Y > &y) |
template<class Y> | |
SmartPtr & | operator= (Y *y) |
X & | operator* () const |
X * | operator-> () const |
X * | get () const |
X * | release () |
void | swap (SmartPtr &x) |
void | clear () |
bool | isNull () const |
Detailed Description
template<class X>
class SmartPtr< X >
Smart pointer, i.e.
pointer-like object that maintains a count for how many times an object is referenced, and only deletes the object when the last smart pointer to it is destroyed.
To make it possible to create smart pointers to objects of a class, the class must inherit from SmartPtrBase.
NB: SmartPtrBase must only be inherited from *once*, so derive virtually if it appears multiple times:
class MyClass : public virtual SmartPtrBase { ... };
There are no implicit conversions from/to the actual pointer.
Member Typedef Documentation
template<class X>
typedef X SmartPtr< X >::element_type |
Constructor & Destructor Documentation
Member Function Documentation
template<class X>
template<class Y>
SmartPtr& SmartPtr< X >::operator= | ( | const SmartPtr< Y > & | y | ) | [inline] |
template<class X>
X& SmartPtr< X >::operator* | ( | ) | const [inline] |
template<class X>
X* SmartPtr< X >::operator-> | ( | ) | const [inline] |
template<class X>
X* SmartPtr< X >::get | ( | ) | const [inline] |
template<class X>
X* SmartPtr< X >::release | ( | ) | [inline] |
template<class X>
void SmartPtr< X >::clear | ( | ) | [inline] |
template<class X>
bool SmartPtr< X >::isNull | ( | ) | const [inline] |
Referenced by UrlMapping::insertNext().
The documentation for this class was generated from the following file:
- util/smartptr.hh
Generated on Tue Sep 23 14:27:43 2008 for jigdo by
