openalpp::Referenced Class Reference

#include <referenced.h>

Inheritance diagram for openalpp::Referenced:

openalpp::AudioBase openalpp::SoundData::SoundBuffer openalpp::StreamUpdater openalpp::AudioEnvironment openalpp::PositionedObject openalpp::SoundData openalpp::FileStreamUpdater openalpp::NetUpdater openalpp::Listener openalpp::SourceBase openalpp::Sample openalpp::Stream openalpp::GroupSource openalpp::Source openalpp::FileStream openalpp::InputDevice openalpp::NetStream List of all members.

Public Member Functions

 Referenced ()
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
void ref () const
void unref () const
void unref_nodelete () const
int referenceCount () const

Static Public Member Functions

static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()

Protected Member Functions

virtual ~Referenced ()

Protected Attributes

int _refCount

Friends

class DeleteHandler

Detailed Description

Base class from providing referencing counted objects.


Constructor & Destructor Documentation

openalpp::Referenced::Referenced  )  [inline]
 

openalpp::Referenced::Referenced const Referenced  )  [inline]
 

virtual openalpp::Referenced::~Referenced  )  [protected, virtual]
 


Member Function Documentation

static DeleteHandler* openalpp::Referenced::getDeleteHandler  )  [static]
 

Get a DeleteHandler.

Referenced& openalpp::Referenced::operator= const Referenced  )  [inline]
 

void openalpp::Referenced::ref  )  const [inline]
 

increment the reference count by one, indicating that this object has another pointer which is referencing it.

int openalpp::Referenced::referenceCount  )  const [inline]
 

return the number pointers currently referencing this object.

static void openalpp::Referenced::setDeleteHandler DeleteHandler handler  )  [static]
 

Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

void openalpp::Referenced::unref  )  const [inline]
 

decrement the reference count by one, indicating that a pointer to this object is referencing it. If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

void openalpp::Referenced::unref_nodelete  )  const [inline]
 

decrement the reference count by one, indicating that a pointer to this object is referencing it. However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be resonsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.


Friends And Related Function Documentation

friend class DeleteHandler [friend]
 


Member Data Documentation

int openalpp::Referenced::_refCount [mutable, protected]
 


The documentation for this class was generated from the following file:
Generated on Thu May 18 00:49:38 2006 for openalpp by  doxygen 1.4.6