zipios::SimpleSmartPointer< Type > Class Template Reference

SimpleSmartPointer is a simple reference counting smart pointer template. More...

#include <simplesmartptr.h>

List of all members.

Public Member Functions

Type * get () const
unsigned int getReferenceCount () const
 Returns the reference count - For debugging purposes.
 operator void * () const
bool operator! () const
bool operator!= (const SimpleSmartPointer &sp) const
bool operator!= (const Type *p) const
Type & operator* () const
Type * operator-> () const
SimpleSmartPointeroperator= (Type *src)
SimpleSmartPointeroperator= (const SimpleSmartPointer &src)
template<class T2 >
SimpleSmartPointeroperator= (const SimpleSmartPointer< T2 > &src)
bool operator== (const SimpleSmartPointer &sp) const
bool operator== (const Type *p) const
 SimpleSmartPointer (const SimpleSmartPointer &src)
template<class T2 >
 SimpleSmartPointer (const SimpleSmartPointer< T2 > &src)
 SimpleSmartPointer (Type *p=0)
 ~SimpleSmartPointer ()

Detailed Description

template<class Type>
class zipios::SimpleSmartPointer< Type >

SimpleSmartPointer is a simple reference counting smart pointer template.

The type pointed to must keep a reference count that is accessible through the two methods void ref() const and unsigned int unref() const. The type must also handle the reference count properly. The easiest way to do that is to use the ReferenceCount template class.

Definition at line 15 of file simplesmartptr.h.


Constructor & Destructor Documentation

template<class Type>
zipios::SimpleSmartPointer< Type >::SimpleSmartPointer ( Type *  p = 0  )  [inline]

Definition at line 21 of file simplesmartptr.h.

template<class Type>
template<class T2 >
zipios::SimpleSmartPointer< Type >::SimpleSmartPointer ( const SimpleSmartPointer< T2 > &  src  )  [inline]

Definition at line 23 of file simplesmartptr.h.

template<class Type>
zipios::SimpleSmartPointer< Type >::SimpleSmartPointer ( const SimpleSmartPointer< Type > &  src  )  [inline]

Definition at line 26 of file simplesmartptr.h.

template<class Type>
zipios::SimpleSmartPointer< Type >::~SimpleSmartPointer (  )  [inline]

Definition at line 30 of file simplesmartptr.h.


Member Function Documentation

template<class Type>
Type* zipios::SimpleSmartPointer< Type >::get (  )  const [inline]
template<class Type>
unsigned int zipios::SimpleSmartPointer< Type >::getReferenceCount (  )  const [inline]

Returns the reference count - For debugging purposes.

Definition at line 67 of file simplesmartptr.h.

template<class Type>
zipios::SimpleSmartPointer< Type >::operator void * (  )  const [inline]

Definition at line 62 of file simplesmartptr.h.

template<class Type>
bool zipios::SimpleSmartPointer< Type >::operator! (  )  const [inline]

Definition at line 59 of file simplesmartptr.h.

template<class Type>
bool zipios::SimpleSmartPointer< Type >::operator!= ( const SimpleSmartPointer< Type > &  sp  )  const [inline]

Definition at line 58 of file simplesmartptr.h.

References zipios::SimpleSmartPointer< Type >::get().

template<class Type>
bool zipios::SimpleSmartPointer< Type >::operator!= ( const Type *  p  )  const [inline]

Definition at line 56 of file simplesmartptr.h.

template<class Type>
Type& zipios::SimpleSmartPointer< Type >::operator* (  )  const [inline]

Definition at line 19 of file simplesmartptr.h.

template<class Type>
Type* zipios::SimpleSmartPointer< Type >::operator-> (  )  const [inline]

Definition at line 17 of file simplesmartptr.h.

template<class Type>
SimpleSmartPointer& zipios::SimpleSmartPointer< Type >::operator= ( Type *  src  )  [inline]

Definition at line 49 of file simplesmartptr.h.

template<class Type>
SimpleSmartPointer& zipios::SimpleSmartPointer< Type >::operator= ( const SimpleSmartPointer< Type > &  src  )  [inline]

Definition at line 41 of file simplesmartptr.h.

References zipios::SimpleSmartPointer< Type >::get().

template<class Type>
template<class T2 >
SimpleSmartPointer& zipios::SimpleSmartPointer< Type >::operator= ( const SimpleSmartPointer< T2 > &  src  )  [inline]

Definition at line 33 of file simplesmartptr.h.

References zipios::SimpleSmartPointer< Type >::get().

template<class Type>
bool zipios::SimpleSmartPointer< Type >::operator== ( const SimpleSmartPointer< Type > &  sp  )  const [inline]

Definition at line 57 of file simplesmartptr.h.

References zipios::SimpleSmartPointer< Type >::get().

template<class Type>
bool zipios::SimpleSmartPointer< Type >::operator== ( const Type *  p  )  const [inline]

Definition at line 55 of file simplesmartptr.h.


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

Generated on Wed Nov 23 19:02:52 2011 for FreeCAD by  doxygen 1.6.1