Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

base::Object Class Reference

Base class to derive from if you want to use Pointer<of something>. More...

#include <Object.h>

Inheritance diagram for base::Object:

base::Array< X > base::DataAllocator Test List of all members.

Public Member Functions

 Object ()
 Constructor: initialize the reference counter.
virtual ~Object ()
 Destructor.
void addReference ()
 Add a reference to this object.
void dropReference ()
 Remove a reference to this object.
bool isMutable () const
 This is useful to know if this object may be modified safely.

Protected Member Functions

virtual void destroy ()
 Wrapper to delete.

Private Attributes

unsigned int refCounter
 reference counter

Detailed Description

Base class to derive from if you want to use Pointer<of something>.

The reference counting is done by Object.


Constructor & Destructor Documentation

base::Object::Object  )  [inline]
 

Constructor: initialize the reference counter.

virtual base::Object::~Object  )  [inline, virtual]
 

Destructor.


Member Function Documentation

void base::Object::addReference  )  [inline]
 

Add a reference to this object.

Use carefully because this will affect deallocation.

virtual void base::Object::destroy  )  [inline, protected, virtual]
 

Wrapper to delete.

It is virtual in case we have objects that are not deallocated by delete, in which case, the method is overriden.

Reimplemented in base::Array< X >.

void base::Object::dropReference  )  [inline]
 

Remove a reference to this object.

Use carefully because this will affect deallocation.

bool base::Object::isMutable  )  const [inline]
 

This is useful to know if this object may be modified safely.

Returns:
true if there is only one reference to this object.


Member Data Documentation

unsigned int base::Object::refCounter [private]
 

reference counter


The documentation for this class was generated from the following file:
Generated on Fri Jun 30 00:02:30 2006 for Module base by  doxygen 1.4.2