jigdo API
Last update by Admin on 2010-05-23
util/smartptr.hh File Reference
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. More...
Go to the source code of this file.
Classes | |
struct | SmartPtrBase |
The version of SmartPtrBase below needs the following:. More... | |
struct | SmartPtr_lockStatic |
If static objects are accessed through smart pointers, ensure that there are no attempts to delete them, by defining a non-static SmartPtr_lockStatic(object), which MUST be DEFINED (not declared) AFTER the object being locked, in the SAME translation unit. More... | |
class | SmartPtr< X > |
Smart pointer, i.e. More... | |
Functions | |
template<class X> | |
SmartPtr< X > | makeSmartPtr (X *x) |
template<class X> | |
bool | deleteSmart (X *ptr) |
template<class X> | |
X * | releaseSmart (X *ptr) |
template<class X> | |
void | swap (SmartPtr< X > &a, SmartPtr< X > &b) |
template<class X> | |
bool | operator< (const SmartPtr< X > a, const SmartPtr< X > b) |
template<class X> | |
bool | operator> (const SmartPtr< X > a, const SmartPtr< X > b) |
template<class X> | |
bool | operator<= (const SmartPtr< X > a, const SmartPtr< X > b) |
template<class X> | |
bool | operator>= (const SmartPtr< X > a, const SmartPtr< X > b) |
template<class X> | |
bool | operator== (const SmartPtr< X > a, const void *b) |
template<class X> | |
bool | operator== (const void *a, const SmartPtr< X > b) |
template<class X> | |
bool | operator!= (const SmartPtr< X > a, const void *b) |
template<class X> | |
bool | operator!= (const void *a, const SmartPtr< X > b) |
Detailed Description
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.
Function Documentation
template<class X>
bool deleteSmart | ( | X * | ptr | ) | [inline] |
template<class X>
SmartPtr<X> makeSmartPtr | ( | X * | x | ) | [inline] |
template<class X>
bool operator!= | ( | const void * | a, | |
const SmartPtr< X > | b | |||
) | [inline] |
References SmartPtr< X >::get().
template<class X>
bool operator!= | ( | const SmartPtr< X > | a, | |
const void * | b | |||
) | [inline] |
References SmartPtr< X >::get().
template<class X>
bool operator== | ( | const void * | a, | |
const SmartPtr< X > | b | |||
) | [inline] |
References SmartPtr< X >::get().
template<class X>
bool operator== | ( | const SmartPtr< X > | a, | |
const void * | b | |||
) | [inline] |
References SmartPtr< X >::get().
References SmartPtr< X >::get().
References SmartPtr< X >::get().
template<class X>
X* releaseSmart | ( | X * | ptr | ) | [inline] |
References SmartPtr< X >::swap().
Generated on Tue Sep 23 14:27:42 2008 for jigdo by
