Base::Reference< T > Class Template Reference

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

#include <Handle.h>

List of all members.

Public Member Functions

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

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.

Definition at line 46 of file Handle.h.


Constructor & Destructor Documentation

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

Pointer and default constructor.

Definition at line 53 of file Handle.h.

template<class T>
Base::Reference< T >::Reference ( T *  p  )  [inline]

Definition at line 56 of file Handle.h.

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

Copy constructor.

Definition at line 62 of file Handle.h.

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!

Definition at line 72 of file Handle.h.


Member Function Documentation

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

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

Definition at line 149 of file Handle.h.

Referenced by CmdSandboxMeshTestRef::activated(), and Gui::Dialog::ParameterGroupItem::~ParameterGroupItem().

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

Test if it does not handle anything.

Definition at line 144 of file Handle.h.

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

Test if it handles something.

Definition at line 139 of file Handle.h.

Referenced by Mesh::Facet::Facet(), and Gui::WindowParameter::setGroupName().

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

Definition at line 116 of file Handle.h.

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

Definition at line 130 of file Handle.h.

template<class T>
T& Base::Reference< T >::operator* (  )  const [inline]

Dereference operator.

Definition at line 107 of file Handle.h.

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

Dereference operator.

Definition at line 112 of file Handle.h.

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

Lower operator, needed for sorting in maps and sets.

Definition at line 121 of file Handle.h.

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

Assign operator from a handle.

Definition at line 94 of file Handle.h.

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

Assign operator from a pointer.

Definition at line 81 of file Handle.h.

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

Equal operator.

Definition at line 126 of file Handle.h.


The documentation for this class was generated from the following file:

Generated on Wed Nov 23 19:01:48 2011 for FreeCAD by  doxygen 1.6.1