Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

ost::RefPointer Class Reference

Pointer to reference counted objects. Pointer to reference count managed objects. More...

#include <object.h>

List of all members.

Public Methods

 RefPointer ()
 Create an unattached pointer. More...

 RefPointer (RefObject *obj)
 Create a pointer attached to a reference counted object. More...

 RefPointer (const RefPointer &ptr)
 A copy constructor. More...

virtual ~RefPointer ()
RefPointer& operator= (const RefObject &ref)
void* operator * () const
void* operator-> () const
void* getObject (void) const
bool operator! () const

Protected Methods

void detach (void)
 Detach current object, for example, when changing pointer. More...

virtual void enterLock (void)
 Patch point for mutex in derived class. More...

virtual void leaveLock (void)
 Patch point for a mutex in derived class. More...


Protected Attributes

RefObjectref


Detailed Description

Pointer to reference counted objects. Pointer to reference count managed objects.

This is a non-template form of a reference count smart pointer, and so uses common code. This can be subclassed to return explicit object types.

Author:
David Sugar <dyfet@gnutelephony.org>


Constructor & Destructor Documentation

ost::RefPointer::RefPointer ( ) [inline]
 

Create an unattached pointer.

ost::RefPointer::RefPointer ( RefObject * obj )
 

Create a pointer attached to a reference counted object.

Object being referenced.

ost::RefPointer::RefPointer ( const RefPointer & ptr )
 

A copy constructor.

Pointer being copied.

ost::RefPointer::~RefPointer ( ) [virtual]
 


Member Function Documentation

void ost::RefPointer::detach ( void ) [protected]
 

Detach current object, for example, when changing pointer.

void ost::RefPointer::enterLock ( void ) [protected, virtual]
 

Patch point for mutex in derived class.

This may often be a single static mutex shared by a managed type.

void * ost::RefPointer::getObject ( void ) const
 

void ost::RefPointer::leaveLock ( void ) [protected, virtual]
 

Patch point for a mutex in derived class.

This may often be a single static mutex shared by a managed type.

void * ost::RefPointer::operator * ( ) const [inline]
 

bool ost::RefPointer::operator! ( void ) const
 

void * ost::RefPointer::operator-> ( ) const [inline]
 

RefPointer & ost::RefPointer::operator= ( const RefObject & ref )
 


Member Data Documentation

RefObject * ost::RefPointer::ref [protected]
 


The documentation for this class was generated from the following file:
Generated at Fri May 30 14:51:03 2008 for GNU CommonC++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001