SYNOPSIS

#include <object.h>

Public Member Functions

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.

Protected Member Functions

RefObject ()

The constructor simply initializes the count. virtual ~RefObject ()

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

Protected Attributes

unsigned refCount

Friends

class RefPointer

Detailed Description

A reference countable object.

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

Author:

David Sugar [email protected] Object managed by smart pointer reference count.

Constructor & Destructor Documentation

ost::RefObject::RefObject ()\fC [inline]\fP, \fC [protected]\fP

The constructor simply initializes the count.

virtual ost::RefObject::~RefObject ()\fC [protected]\fP, \fC [virtual]\fP

The destructor is called when the reference count returns to zero. This is done through a virtual destructor.

Member Function Documentation

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

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

friend class \fBRefPointer\fP\fC [friend]\fP

Member Data Documentation

unsigned ost::RefObject::refCount\fC [protected]\fP

Author

Generated automatically by Doxygen for GNU CommonC++ from the source code.