osg::Referenced Class Reference
List of all members.
Detailed Description
Base class from providing referencing counted objects.
Constructor & Destructor Documentation
osg::Referenced::Referenced |
( |
|
) |
|
osg::Referenced::Referenced |
( |
bool |
threadSafeRefUnref |
) |
[explicit] |
osg::Referenced::Referenced |
( |
const Referenced & |
|
) |
|
virtual osg::Referenced::~Referenced |
( |
|
) |
[protected, virtual] |
Member Function Documentation
void osg::Referenced::addObserver |
( |
Observer * |
observer |
) |
const |
void osg::Referenced::deleteUsingDeleteHandler |
( |
|
) |
const [protected] |
static DeleteHandler* osg::Referenced::getDeleteHandler |
( |
|
) |
[static] |
Get the mutex used to ensure thread safety of ref()/unref().
static bool osg::Referenced::getThreadSafeReferenceCounting |
( |
|
) |
[static] |
Get whether reference counting is active.
bool osg::Referenced::getThreadSafeRefUnref |
( |
|
) |
const [inline] |
Get whether a mutex is used to ensure ref() and unref() are thread safe.
void osg::Referenced::ref |
( |
|
) |
const [inline] |
int osg::Referenced::referenceCount |
( |
|
) |
const [inline] |
Return the number pointers currently referencing this object.
void osg::Referenced::removeObserver |
( |
Observer * |
observer |
) |
const |
Add a Observer that is observing this object, notify the Observer when this object gets deleted.
static void osg::Referenced::setDeleteHandler |
( |
DeleteHandler * |
handler |
) |
[static] |
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
static void osg::Referenced::setThreadSafeReferenceCounting |
( |
bool |
enableThreadSafeReferenceCounting |
) |
[static] |
Set whether reference counting should be use a mutex to create thread reference counting.
virtual void osg::Referenced::setThreadSafeRefUnref |
( |
bool |
threadSafe |
) |
[virtual] |
Set whether to use a mutex to ensure ref() and unref() are thread safe.
Reimplemented in osg::Drawable, osg::Geode, osg::Group, osg::LightSource, osg::Node, osg::Program, osg::StateSet, osg::TexGenNode, osgSim::OverlayNode, osgSim::OverlayNode::OverlayData, osgText::Font, osgText::Font::GlyphTexture, osgText::Font3D, osgText::Font3D::Glyph3D, osgText::Text, osgText::Text3D, and osgText::TextBase.
void osg::Referenced::unref |
( |
|
) |
const [inline] |
void osg::Referenced::unref_nodelete |
( |
|
) |
const |
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 responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following file: