Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes
Pointer< T > Class Template Reference

Used to create and manage referece counted pointers. More...

#include <pointer.h>

Collaboration diagram for Pointer< T >:
Collaboration graph
[legend]

Public Member Functions

 Pointer (T *ptr=NULL)
 
 Pointer (const Pointer< T > &ref)
 
virtual ~Pointer ()
 
Pointeroperator= (const Pointer< T > &ref)
 
T & operator* () const
 
T * getObject () const
 
T * operator-> () const
 
bool operator! () const
 
int operator++ () const
 
int operator-- () const
 

Protected Member Functions

void ptrDetach (void)
 

Protected Attributes

unsigned * ptrCount
 
T * ptrObject
 

Detailed Description

template<class T>
class Pointer< T >

Used to create and manage referece counted pointers.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org reference counted pointer template.

Definition at line 65 of file pointer.h.

Constructor & Destructor Documentation

template<class T>
Pointer< T >::Pointer ( T *  ptr = NULL)
inlineexplicit

Definition at line 82 of file pointer.h.

template<class T>
Pointer< T >::Pointer ( const Pointer< T > &  ref)
inline

Definition at line 88 of file pointer.h.

template<class T>
virtual Pointer< T >::~Pointer ( )
inlinevirtual

Definition at line 95 of file pointer.h.

Member Function Documentation

template<class T>
T* Pointer< T >::getObject ( void  ) const
inline

Definition at line 113 of file pointer.h.

template<class T>
bool Pointer< T >::operator! ( ) const
inline

Definition at line 119 of file pointer.h.

template<class T>
T& Pointer< T >::operator* ( ) const
inline

Definition at line 110 of file pointer.h.

template<class T>
int Pointer< T >::operator++ ( void  ) const
inline

Definition at line 122 of file pointer.h.

template<class T>
int Pointer< T >::operator-- ( ) const
inline

Definition at line 125 of file pointer.h.

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

Definition at line 116 of file pointer.h.

template<class T>
Pointer& Pointer< T >::operator= ( const Pointer< T > &  ref)
inline

Definition at line 99 of file pointer.h.

template<class T>
void Pointer< T >::ptrDetach ( void  )
inlineprotected

Definition at line 71 of file pointer.h.

Field Documentation

template<class T>
unsigned* Pointer< T >::ptrCount
protected

Definition at line 68 of file pointer.h.

template<class T>
T* Pointer< T >::ptrObject
protected

Definition at line 69 of file pointer.h.


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