Equalizer 1.0

co::base::Referenced Class Reference

Base class for referenced objects. More...

#include <referenced.h>

Inheritance diagram for co::base::Referenced:
Collaboration diagram for co::base::Referenced:

List of all members.

Public Member Functions

void ref (EQ_REFERENCED_ARGS) const
 Increase the reference count.
void unref (EQ_REFERENCED_ARGS) const
 Decrease the reference count.
int getRefCount () const
void printHolders (std::ostream &os) const

Protected Member Functions

 Referenced ()
 Construct a new reference-counted object.
 Referenced (const Referenced &)
 Construct a new copy of a reference-counted object.
virtual ~Referenced ()
 Destruct a reference-counted object.
COBASE_API void deleteReferenced (const Referenced *object) const

Detailed Description

Base class for referenced objects.

Implements reference-counted objects which destroy themselves once they are no longer referenced. Uses an Atomic variable to keep the reference count access thread-safe and efficient.

See also:
RefPtr

Definition at line 48 of file referenced.h.


Constructor & Destructor Documentation

co::base::Referenced::Referenced ( ) [inline, protected]

Construct a new reference-counted object.

Version:
1.0

Definition at line 116 of file referenced.h.

co::base::Referenced::Referenced ( const Referenced ) [inline, protected]

Construct a new copy of a reference-counted object.

Version:
1.0

Definition at line 122 of file referenced.h.

virtual co::base::Referenced::~Referenced ( ) [inline, protected, virtual]

Destruct a reference-counted object.

Version:
1.0

Definition at line 128 of file referenced.h.


Member Function Documentation

int co::base::Referenced::getRefCount ( ) const [inline]
Returns:
the current reference count.
Version:
1.0

Definition at line 96 of file referenced.h.

void co::base::Referenced::ref ( EQ_REFERENCED_ARGS  ) const [inline]

Increase the reference count.

Version:
1.0 .

Definition at line 52 of file referenced.h.

References co::base::backtrace(), and co::base::className().

Here is the call graph for this function:

void co::base::Referenced::unref ( EQ_REFERENCED_ARGS  ) const [inline]

Decrease the reference count.

The object is deleted when the reference count reaches 0.

Version:
1.0

Definition at line 75 of file referenced.h.


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:09 for Equalizer 1.0 by  doxygen 1.7.3