UQTk: Uncertainty Quantification Toolkit 3.1.5
|
#include <RefPtr.h>
Public Types | |
typedef T | Type |
Make the typename that this pointer holds accessible to other objects. | |
Public Member Functions | |
RefPtr () | |
Construct a new RefPtr and initialize the pointee to NULL. | |
RefPtr (T *p) | |
Construct a new RefPtr and initialize the pointee as given. | |
RefPtr (const RefPtr< T > &p) | |
Construct a new RefPtr and initialize to the given RefPtr pointee. | |
template<class Other > | |
RefPtr (RefPtr< Other > p) | |
~RefPtr () | |
Destroy this RefPtr. | |
RefPtr< T > & | operator= (T *p) |
Assign the value of this RefPtr to the given pointee. | |
RefPtr< T > & | operator= (const RefPtr< T > &p) |
Assign the value of this RefPtr to the pointee of the given RefPtr. | |
template<class Other > | |
RefPtr< T > & | cast (Other *p) |
template<class Other > | |
RefPtr< T > & | cast (RefPtr< Other > p) |
T * | operator-> () const |
T & | operator* () const |
T * | pointee () |
Return the pointee of this RefPtr. | |
const T * | pointee () const |
Return the pointee of this RefPtr in a const context. | |
bool | operator== (const T *p) const |
Compare the pointee of this RefPtr with the given pointer. | |
bool | operator== (const RefPtr< T > &p) const |
Compare the value of this pointee with the pointee of the given RefPtr. | |
bool | operator!= (const T *p) const |
Test inequality. | |
bool | operator!= (const RefPtr< T > &p) const |
Test inequality. | |
bool | operator< (const RefPtr< T > &p) const |
Convenience routine to sort pointer values in standard containers. | |
template<class Other > | |
bool | operator< (const RefPtr< Other > &p) const |
Convenience routine to sort pointer values in standard containers. | |
Private Member Functions | |
void | grab () |
Grab a reference to the current pointee if it is not NULL. | |
void | release () |
Private Attributes | |
T * | ptr_ |
Reference counted pointer that gives the holder modification privileges to the pointee.
Part of the Particle Simulation Toolkit (pst)
T RefPtr< T >::Type |
Make the typename that this pointer holds accessible to other objects.
Construct a new RefPtr and initialize the pointee to NULL.
Construct a new RefPtr and initialize the pointee as given.
Perform a static cast to initialize this pointee. This cast is only valid if T is a parent class of Other
Use dynamic_cast to set the pointee to the pointer that was passed in, and return *this. The returned value is NULL if the cast fails.
|
inline |
Use dynamic_cast to set the pointee to the pointee of the RefPtr given, and return *this. The returned value is NULL if the cast fails.
|
inlineprivate |
Grab a reference to the current pointee if it is not NULL.
Test inequality.
|
inline |
Test inequality.
|
inline |
Return a reference to the pointee of this RefPtr. This will not work right if the pointee is NULL.
|
inline |
Return the pointee of this RefPtr. This will throw an exception if the pointee is NULL.
|
inline |
Convenience routine to sort pointer values in standard containers.
Convenience routine to sort pointer values in standard containers.
Assign the value of this RefPtr to the given pointee.
Compare the value of this pointee with the pointee of the given RefPtr.
|
inline |
Compare the pointee of this RefPtr with the given pointer.
|
inline |
Return the pointee of this RefPtr in a const context.
|
inlineprivate |
Release the reference to the current pointee if it is not NULL. If this results in the reference count of the pointee dropping to zero, delete the object pointed to.
|
private |