Base::Reference< T > Class Template Reference

Reference class Implementation of the reference counting pattern. More...

#include <Handle.h>

Public Member Functions

int getRefCount (void) const
 Get number of references on the object, including this one. More...
 
bool isNull (void) const
 Test if it does not handle anything. More...
 
bool isValid (void) const
 Test if it handles something. More...
 
 operator T * () const
 
bool operator!= (const Reference< T > &p) const
 
T & operator* () const
 Dereference operator. More...
 
T * operator-> () const
 Dereference operator. More...
 
bool operator< (const Reference< T > &p) const
 Lower operator, needed for sorting in maps and sets. More...
 
Reference< T > & operator= (T *p)
 Assign operator from a pointer. More...
 
Reference< T > & operator= (const Reference< T > &p)
 Assign operator from a handle. More...
 
bool operator== (const Reference< T > &p) const
 Equal operator. More...
 
 Reference ()
 Pointer and default constructor. More...
 
 Reference (T *p)
 
 Reference (const Reference< T > &p)
 Copy constructor. More...
 
 ~Reference ()
 destructor Release the reference counter which causes, in case of the last one, the referenced object to be destructed! More...
 

Detailed Description

template<class T>
class Base::Reference< T >

Reference class Implementation of the reference counting pattern.

Only able to instantiate with a class inheriting Base::Handled.

Constructor & Destructor Documentation

template<class T>
Base::Reference< T >::Reference ( )
inline

Pointer and default constructor.

template<class T>
Base::Reference< T >::Reference ( T *  p)
inline
template<class T>
Base::Reference< T >::Reference ( const Reference< T > &  p)
inline

Copy constructor.

template<class T>
Base::Reference< T >::~Reference ( )
inline

destructor Release the reference counter which causes, in case of the last one, the referenced object to be destructed!

Member Function Documentation

template<class T>
int Base::Reference< T >::getRefCount ( void  ) const
inline

Get number of references on the object, including this one.

Referenced by MeshThread::run().

template<class T>
bool Base::Reference< T >::isNull ( void  ) const
inline

Test if it does not handle anything.

template<class T>
bool Base::Reference< T >::isValid ( void  ) const
inline

Test if it handles something.

Referenced by ParameterGrpPy::getGroup().

template<class T>
Base::Reference< T >::operator T * ( ) const
inline
template<class T>
bool Base::Reference< T >::operator!= ( const Reference< T > &  p) const
inline
template<class T>
T& Base::Reference< T >::operator* ( ) const
inline

Dereference operator.

template<class T>
T* Base::Reference< T >::operator-> ( ) const
inline

Dereference operator.

template<class T>
bool Base::Reference< T >::operator< ( const Reference< T > &  p) const
inline

Lower operator, needed for sorting in maps and sets.

template<class T>
Reference<T>& Base::Reference< T >::operator= ( T *  p)
inline

Assign operator from a pointer.

template<class T>
Reference<T>& Base::Reference< T >::operator= ( const Reference< T > &  p)
inline

Assign operator from a handle.

template<class T>
bool Base::Reference< T >::operator== ( const Reference< T > &  p) const
inline

Equal operator.


The documentation for this class was generated from the following file:
  • src/src/Base/Handle.h