eq::base::Referenced Class Reference

Base class for referenced objects. More...

#include <referenced.h>

Inheritance diagram for eq::base::Referenced:

Inheritance graph
[legend]
Collaboration diagram for eq::base::Referenced:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void ref ()
 Increase the reference count.
void unref ()
 Decrease the reference count and delete this object when the reference count reaches 0.
int getRefCount () 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.
void deleteReferenced (Referenced *object)


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 39 of file referenced.h.


Constructor & Destructor Documentation

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

Construct a new reference-counted object.

Definition at line 71 of file referenced.h.

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

Construct a new copy of a reference-counted object.

Definition at line 79 of file referenced.h.

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

Destruct a reference-counted object.

Definition at line 87 of file referenced.h.


Member Function Documentation

void eq::base::Referenced::ref (  )  [inline]

Increase the reference count.

Definition at line 43 of file referenced.h.

int eq::base::Referenced::getRefCount (  )  const [inline]

Returns:
the current reference count.

Definition at line 67 of file referenced.h.

Referenced by eq::net::Node::initLocal().

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:44 2009 for Equalizer 0.9 by  doxygen 1.5.8