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

ost::RefObject Class Reference

A reference countable object. Object managed by smart pointer reference count. More...

#include <object.h>

List of all members.

Public Methods

virtual void* getObject (void)=0
 The actual object being managed can be returned by this method as a void and then recast to the actual type. More...


Protected Methods

 RefObject ()
 The constructor simply initializes the count. More...

virtual ~RefObject ()
 The destructor is called when the reference count returns to zero. More...


Protected Attributes

unsigned refCount

Friends

class  RefPointer


Detailed Description

A reference countable object. Object managed by smart pointer reference count.

This is used in association with smart pointers (RefPointer).

Author:
David Sugar <dyfet@gnutelephony.org>


Constructor & Destructor Documentation

ost::RefObject::RefObject ( ) [inline, protected]
 

The constructor simply initializes the count.

ost::RefObject::~RefObject ( ) [protected, virtual]
 

The destructor is called when the reference count returns to zero.

This is done through a virtual destructor.


Member Function Documentation

void * ost::RefObject::getObject ( void ) [pure virtual]
 

The actual object being managed can be returned by this method as a void and then recast to the actual type.

This removes the need to dynamic cast from RefObject and the dependence on rtti this implies.

Returns:
underlying object being referenced.


Friends And Related Function Documentation

class RefPointer [friend]
 


Member Data Documentation

unsigned ost::RefObject::refCount [protected]
 


The documentation for this class was generated from the following file:
Generated at Sat May 12 18:59:43 2007 for GNU CommonC++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001