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