CrystalSpace

Public API Reference

CS::Utility::AtomicRefCount Class Reference

This is a class which provides basic atomic reference-counting semantics. More...

#include <csutil/refcount.h>

Inherited by CS::Threading::ThreadedJobQueue::ThreadState, and scfImplementationHelper::ScfImplAuxData.

List of all members.

Public Member Functions

void DecRef ()
 Decrease the number of references to this object.
int GetRefCount () const
 Get the reference count (only for debugging).
void IncRef ()
 Increase the number of references to this object.



 AtomicRefCount (const AtomicRefCount &other)
 Initialize object and set reference to 1.
 AtomicRefCount ()
 Initialize object and set reference to 1.

Detailed Description

This is a class which provides basic atomic reference-counting semantics.

It behaves like csRefCount, with the difference that the reference count is increased/decreased atomically, making this class suitable for using reference-counted objects across threads.

Definition at line 203 of file refcount.h.


Constructor & Destructor Documentation

CS::Utility::AtomicRefCount::AtomicRefCount (  )  [inline]

Initialize object and set reference to 1.

Definition at line 225 of file refcount.h.

CS::Utility::AtomicRefCount::AtomicRefCount ( const AtomicRefCount other  )  [inline]

Initialize object and set reference to 1.

Definition at line 229 of file refcount.h.


Member Function Documentation

void CS::Utility::AtomicRefCount::DecRef (  )  [inline]

Decrease the number of references to this object.

Definition at line 242 of file refcount.h.

int CS::Utility::AtomicRefCount::GetRefCount (  )  const [inline]

Get the reference count (only for debugging).

Definition at line 249 of file refcount.h.

void CS::Utility::AtomicRefCount::IncRef (  )  [inline]

Increase the number of references to this object.

Definition at line 236 of file refcount.h.


The documentation for this class was generated from the following file:

Generated for Crystal Space 2.1 by doxygen 1.6.1