A shared pointer template for reference-counted objects. More...
#include <RefCounted.h>
Public Types | |
typedef T | element_type |
Public Member Functions | |
RefCountedPtr () | |
RefCountedPtr (T *p, bool add_ref=true) | |
template<class U > | |
RefCountedPtr (RefCountedPtr< U > const &rhs) | |
RefCountedPtr (RefCountedPtr const &rhs) | |
RefCountedPtr (RefCountedPtr &&rhs) | |
RefCountedPtr & | operator= (RefCountedPtr &&rhs) |
~RefCountedPtr () | |
template<class U > | |
RefCountedPtr & | operator= (RefCountedPtr< U > const &rhs) |
bool | operator== (RefCountedPtr< T > const &rhs) const |
template<class U > | |
bool | operator== (RefCountedPtr< U > const &rhs) const |
bool | operator!= (RefCountedPtr< T > const &rhs) const |
template<class U > | |
bool | operator!= (RefCountedPtr< U > const &rhs) const |
RefCountedPtr & | operator= (RefCountedPtr const &rhs) |
RefCountedPtr & | operator= (T *rhs) |
T * | get () const |
Get a pointer the intenal object held by the reference-counted object. More... | |
T *const & | GetCR () const |
Get a constant reference to the intenal object held by the reference-counted object. More... | |
T *& | GetR () |
Get a reference to the intenal object held by the reference-counted object. More... | |
T & | operator* () const |
Get a reference to the intenal object held by the reference-counted object. More... | |
T * | operator-> () const |
Get a pointer to the intenal object held by the reference-counted object. More... | |
bool | IsValid () const |
Return true if the ref-counted object has a valid (non-NULL) internal object. More... | |
bool | IsNull () const |
Return true if the ref-counted object has a invalid (NULL) internal object. More... | |
bool | Equals (T const *other) const |
bool | Equals (RefCountedPtr const &other) const |
void | swap (RefCountedPtr &rhs) |
Swap the internal objects pointed to by two smart pointers. More... | |
A shared pointer template for reference-counted objects.
Type T must have functions named AddRef and Release with signatures that conform to the reference-counting pattern.
typedef T element_type |
RefCountedPtr | ( | ) |
RefCountedPtr | ( | T * | p, |
bool | add_ref = true |
||
) |
RefCountedPtr | ( | RefCountedPtr< U > const & | rhs | ) |
RefCountedPtr | ( | RefCountedPtr< T > const & | rhs | ) |
RefCountedPtr | ( | RefCountedPtr< T > && | rhs | ) |
~RefCountedPtr | ( | ) |
bool Equals | ( | T const * | other | ) | const |
bool Equals | ( | RefCountedPtr< T > const & | other | ) | const |
T* get | ( | ) | const |
Get a pointer the intenal object held by the reference-counted object.
Referenced by RefCountedPtr< IECInstanceCollectionAdapter >::Equals(), VirtualCollectionIterator< IteratorImplementation >::operator!=(), RefCountedPtr< IECInstanceCollectionAdapter >::operator!=(), and RefCountedPtr< IECInstanceCollectionAdapter >::operator==().
T* const& GetCR | ( | ) | const |
Get a constant reference to the intenal object held by the reference-counted object.
T*& GetR | ( | ) |
Get a reference to the intenal object held by the reference-counted object.
bool IsNull | ( | ) | const |
Return true if the ref-counted object has a invalid (NULL) internal object.
Referenced by VirtualCollectionIterator< IteratorImplementation >::operator!=().
bool IsValid | ( | ) | const |
Return true if the ref-counted object has a valid (non-NULL) internal object.
bool operator!= | ( | RefCountedPtr< T > const & | rhs | ) | const |
bool operator!= | ( | RefCountedPtr< U > const & | rhs | ) | const |
T& operator* | ( | ) | const |
Get a reference to the intenal object held by the reference-counted object.
T* operator-> | ( | ) | const |
Get a pointer to the intenal object held by the reference-counted object.
RefCountedPtr& operator= | ( | RefCountedPtr< T > && | rhs | ) |
RefCountedPtr& operator= | ( | RefCountedPtr< U > const & | rhs | ) |
RefCountedPtr& operator= | ( | RefCountedPtr< T > const & | rhs | ) |
RefCountedPtr& operator= | ( | T * | rhs | ) |
bool operator== | ( | RefCountedPtr< T > const & | rhs | ) | const |
bool operator== | ( | RefCountedPtr< U > const & | rhs | ) | const |
void swap | ( | RefCountedPtr< T > & | rhs | ) |
Swap the internal objects pointed to by two smart pointers.
Referenced by RefCountedPtr< IECInstanceCollectionAdapter >::operator=().