UCommon
ost::Pointer< T > Class Template Reference

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

#include <pointer.h>

Public Member Functions

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

Protected Member Functions

void ptrDetach (void)
 

Protected Attributes

unsigned * ptrCount
 
T * ptrObject
 

Detailed Description

template<class T>
class ost::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 63 of file pointer.h.

Constructor & Destructor Documentation

◆ Pointer() [1/2]

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

Definition at line 79 of file pointer.h.

◆ Pointer() [2/2]

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

Definition at line 84 of file pointer.h.

◆ ~Pointer()

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

Definition at line 90 of file pointer.h.

Member Function Documentation

◆ getObject()

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

Definition at line 108 of file pointer.h.

◆ operator bool()

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

Definition at line 116 of file pointer.h.

◆ operator!()

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

Definition at line 120 of file pointer.h.

◆ operator*()

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

Definition at line 104 of file pointer.h.

◆ operator++()

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

Definition at line 124 of file pointer.h.

◆ operator--()

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

Definition at line 128 of file pointer.h.

◆ operator->()

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

Definition at line 112 of file pointer.h.

◆ operator=()

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

Definition at line 94 of file pointer.h.

◆ ptrDetach()

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

Definition at line 69 of file pointer.h.

Field Documentation

◆ ptrCount

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

Definition at line 66 of file pointer.h.

◆ ptrObject

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

Definition at line 67 of file pointer.h.


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