A threadsafe, reference-counting smart pointer. More...
#include <SharedPtr.h++>
Public Member Functions | |
| SharedPtr (T *object=NULL) | |
| Construct a new SharedPtr for the given object pointer. | |
| SharedPtr (const SharedPtr &other) | |
| Copy constructor. | |
| ~SharedPtr () | |
| Destructor. | |
| template<class U > | |
| SharedPtr< U > | staticCast () |
| Static cast. | |
| template<class U > | |
| SharedPtr< U > | dynamicCast () |
| Dynamic cast. | |
| SharedPtr & | operator= (const SharedPtr &other) |
| Assignment operator. | |
| SharedPtr & | operator= (T *object) |
| Assignment operator. | |
| T * | operator-> () throw () |
| Pointer-to-member operator. | |
| const T * | operator-> () const throw () |
| Pointer-to-member operator. | |
| T & | operator* () throw (NullPointerException) |
| Dereference operator. | |
| const T & | operator* () const throw (NullPointerException) |
| Dereference operator. | |
| T * | get () const |
| Get the value of the pointer. | |
| bool | operator! () const throw () |
| Test if the pointer is NULL. | |
| operator const void * () const throw () | |
| Boolean test operator. | |
| bool | isNull () const throw () |
| Test if the pointer is NULL. | |
| bool | operator== (const SharedPtr &other) const |
| Equality operator. | |
| bool | operator!= (const SharedPtr &other) const |
| Inequality operator. | |
| int | getRefCount () const throw () |
| Get the reference count for this pointer. | |
Friends | |
| class | SharedPtr |
A threadsafe, reference-counting smart pointer.
See sections 13.6.3.1 and 25.7 of The C++ Programming Language.
| ~SharedPtr | ( | ) | [inline] |
Destructor.
| SharedPtr<U> dynamicCast | ( | ) | [inline] |
| T* get | ( | ) | const [inline] |
Get the value of the pointer.
| int getRefCount | ( | ) | const throw () [inline] |
Get the reference count for this pointer.
| bool isNull | ( | ) | const throw () [inline] |
Test if the pointer is NULL.
| operator const void * | ( | ) | const throw () [inline] |
Boolean test operator.
(Test if the pointer is non-NULL.)
| bool operator! | ( | ) | const throw () [inline] |
Test if the pointer is NULL.
| bool operator!= | ( | const SharedPtr< T > & | other | ) | const [inline] |
Inequality operator.
Compares the object pointers.
| const T& operator* | ( | ) | const throw (NullPointerException) [inline] |
Dereference operator.
| NullPointerException | If this pointer is NULL. |
| T& operator* | ( | ) | throw (NullPointerException) [inline] |
Dereference operator.
| NullPointerException | If this pointer is NULL. |
| const T* operator-> | ( | ) | const throw () [inline] |
Pointer-to-member operator.
| T* operator-> | ( | ) | throw () [inline] |
Pointer-to-member operator.
| SharedPtr& operator= | ( | T * | object | ) | [inline] |
Assignment operator.
| bool operator== | ( | const SharedPtr< T > & | other | ) | const [inline] |
Equality operator.
Compares the object pointers.
| SharedPtr<U> staticCast | ( | ) | [inline] |
friend class SharedPtr [friend] |
1.6.3