A reference counting pointer class which keeps objects alive as long as strong pointers to these objects exist.
More...
#include </home/werner/origo/vish/memcore/RefPtr.hpp>
List of all members.
Public Types
Public Member Functions
-
StrongPtr & assignStrong (const DynPtr_t &other) throw ()
- assign a strong pointer from a weak pointer
-
StrongPtr & assignStrong (const ReferenceBase< ObjectBase_t > *Obj) throw ()
- assign a strong pointer from a native pointer
-
StrongPtr & assignStrong (const NullPtr &Null) throw ()
- assign NullPtr to a strong pointer, i.e. invalidate it.
-
void destroy ()
-
StrongPtr & operator= (const StrongPtr &other) throw ()
- Assignment operator, same as assignStrong()
-
StrongPtr & operator= (const DynPtr_t &other) throw ()
- Assignment operator, same as assignStrong()
- StrongPtr & operator= (const ReferenceBase< ObjectBase_t > *Obj)
- Assignment from object base class pointer.
-
StrongPtr & operator= (const NullPtr &Null) throw ()
- Assignment operator with NullPtr, invalidate.
-
StrongPtr ()
- Default constructor (makes a NULL pointer)
-
StrongPtr (const NullPtr &)
- Explicitely construct a NULL pointer.
-
StrongPtr (const ReferenceBase< ObjectBase_t > *Obj)
- Strong pointer from reference base of object, eg. via new operator.
-
StrongPtr (const ReferenceBase< ObjectBase_t > *Obj, const NotNullPtr &)
- Strong pointer from reference base of object, eg. via new operator.
-
template<class ChildObject > StrongPtr (const WeakPtr< ChildObject, ObjectBase_t > &Other)
- Reference pointer with dynamic type identification.
-
template<class ChildObject > StrongPtr (const StrongPtr< ChildObject > &Other)
- Reference pointer with dynamic type identification.
-
StrongPtr (const StrongPtr< Object, ObjectBase > &Other) throw ()
- Copy constructor.
-
~StrongPtr () throw ()
- Destructor, the last one cleans up and destructs the object itself.
Detailed Description
A reference counting pointer class which keeps objects alive as long as strong pointers to these objects exist.
Note that StrongPtr (and RefPtr) are possible for classes that have not been defined. A class declaration is required and the WeakPtr<> template has to be explicitely told the base class of the respective declared class.
- Examples:
-
ComputeGridStreamLines.cpp, and ComputeMultiStreamLines.cpp.
Member Function Documentation
Assignment from object base class pointer.
Required to avoid creation of a temporary pointer when calling the assignment operator.
The documentation for this class was generated from the following file: