neo::core::RefCount Class Reference

#include <core/refcount.h>

Inheritance diagram for neo::core::RefCount:

Inheritance graph
[legend]
Collaboration diagram for neo::core::RefCount:

Collaboration graph
[legend]
List of all members.

Detailed Description

Reference counted object base class. Used by all objects that are managed through smart pointers (the template class neo::core::Pointer). Once reference count reaches zero, the object deletes itself.

You must NEVER delete a reference counted object directly! All access to a reference counted object MUST be done through the smart pointer interface as offered by the neo::core::Pointer template class

See also:
Pointer
Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

void incRef ()
void decRef ()
int getRefCount () const

Protected Member Functions

 RefCount ()
virtual ~RefCount ()


Constructor & Destructor Documentation

neo::core::RefCount::RefCount (  )  [inline, protected]

Reset reference count to 0

neo::core::RefCount::~RefCount (  )  [inline, protected, virtual]

Dummy method for virtual destructor chaining


Member Function Documentation

void neo::core::RefCount::incRef (  )  [inline]

Increase reference count

void neo::core::RefCount::decRef (  )  [inline]

Decrease reference count and garbage collect if 0

int neo::core::RefCount::getRefCount (  )  const [inline]

Get current reference count

Returns:
Current reference count


The documentation for this class was generated from the following file:
Generated on Sat Feb 17 20:51:02 2007 for NeoEngine 2 - Evolution by  doxygen 1.5.1