GNU CommonC++
Public Member Functions | Protected Member Functions | Protected Attributes
ost::Pointer Class Reference

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

#include <pointer.h>

List of all members.

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

Used to create and manage referece counted pointers.

Author:
David Sugar <dyfet@gnutelephony.org> reference counted pointer template.

Constructor & Destructor Documentation

ost::Pointer::Pointer ( T *  ptr = NULL) [inline, explicit]

References ptrCount.

ost::Pointer::Pointer ( const Pointer< T > &  ref) [inline]

References ptrObject, and ptrCount.

virtual ost::Pointer::~Pointer ( ) [inline, virtual]

References ptrDetach().


Member Function Documentation

T* ost::Pointer::getObject ( void  ) const [inline]

References ptrObject.

bool ost::Pointer::operator! ( void  ) const [inline]

References ptrCount.

T& ost::Pointer::operator* ( ) const [inline]

References ptrObject.

int ost::Pointer::operator++ ( void  ) const [inline]
int ost::Pointer::operator-- ( void  ) const [inline]

References ptrCount.

T* ost::Pointer::operator-> ( ) const [inline]

References ptrObject.

Pointer& ost::Pointer::operator= ( const Pointer< T > &  ref) [inline]

References ptrDetach(), ptrObject, and ptrCount.

void ost::Pointer::ptrDetach ( void  ) [inline, protected]

References ptrCount, and ptrObject.

Referenced by ~Pointer(), and operator=().


Member Data Documentation

unsigned* ost::Pointer::ptrCount [protected]
T* ost::Pointer::ptrObject [protected]

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