Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/util/SharedPtr.h>
Public Member Functions | |
SharedPtr (void) | |
SharedPtr (T *p) | |
SharedPtr (const SharedPtr< T > &p) | |
~SharedPtr (void) | |
bool | isEmpty (void) const |
T * | ptr (void) const |
T & | ref (void) const |
operator bool (void) const | |
operator T* (void) const | |
T * | operator-> (void) const |
T & | operator* (void) const |
T * | operator& (void) const |
SharedPtr< T > & | operator= (const SharedPtr< T > &p) |
SharedPtr< T > & | operator= (T *p) |
bool | operator== (const SharedPtr< T > &p) const |
bool | operator!= (const SharedPtr< T > &p) const |
bool | operator== (T *p) const |
bool | operator!= (T *p) const |
Implements a pointer wrapper class that takes care of the usage of a pointer and that automatically delete a pointed object when it is no more used.
Based on reference counting approach, assignment of shared pointer induces the decrementation of the previous pointer and the incrementation of the new pointer.
Beware: this also means that pointed objects forming a cycle will not be deleted!
T | Type of pointed object. |
|
inline |
Referenced by SharedPtr< T >::operator bool().
References SharedPtr< T >::isEmpty().
|
inline |
References SharedPtr< T >::ptr().
References elm::io::p().
|
inline |
References elm::io::p().
|
inline |
References SharedPtr< T >::ptr().
|
inline |
References SharedPtr< T >::ref().
|
inline |
References SharedPtr< T >::ptr().
References elm::io::p().
|
inline |
References elm::io::p().
References elm::io::p().
|
inline |
References elm::io::p().
|
inline |
Referenced by SharedPtr< T >::operator T*(), SharedPtr< T >::operator&(), and SharedPtr< T >::operator->().
|
inline |
Referenced by SharedPtr< T >::operator*().