Inheritance diagram for osg::Referenced:

Public Member Functions | |
| Referenced () | |
| Referenced (bool threadSafeRefUnref) | |
| Referenced (const Referenced &) | |
| Referenced & | operator= (const Referenced &) |
| virtual void | setThreadSafeRefUnref (bool threadSafe) |
| Set whether to use a mutex to ensure ref() and unref() are thread safe. | |
| bool | getThreadSafeRefUnref () const |
| Get whether a mutex is used to ensure ref() and unref() are thread safe. | |
| void | ref () const |
| Increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unref () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unref_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| int | referenceCount () const |
| Return the number pointers currently referencing this object. | |
| void | addObserver (Observer *observer) |
| Add a Observer that is observering this object, notify the Observer when this object gets deleted. | |
| void | removeObserver (Observer *observer) |
| Add a Observer that is observering this object, notify the Observer when this object gets deleted. | |
Static Public Member Functions | |
| static void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
| Set whether reference counting should be use a mutex to create thread reference counting. | |
| static bool | getThreadSafeReferenceCounting () |
| Get whether reference counting is active. | |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
| static DeleteHandler * | getDeleteHandler () |
| Get a DeleteHandler. | |
Protected Member Functions | |
| virtual | ~Referenced () |
| void | deletUsingDeleteHandler () const |
Protected Attributes | |
| OpenThreads::Mutex * | _refMutex |
| int | _refCount |
| void * | _observers |
Friends | |
| class | DeleteHandler |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add a Observer that is observering this object, notify the Observer when this object gets deleted.
|
|
|
|
|
|
Get a DeleteHandler.
|
|
|
Get whether reference counting is active.
|
|
|
Get whether a mutex is used to ensure ref() and unref() are thread safe.
|
|
|
|
|
|
Increment the reference count by one, indicating that this object has another pointer which is referencing it.
|
|
|
Return the number pointers currently referencing this object.
|
|
|
Add a Observer that is observering this object, notify the Observer when this object gets deleted.
|
|
|
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
|
|
Set whether reference counting should be use a mutex to create thread reference counting.
|
|
|
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, osgText::Font, osgText::Font::GlyphTexture, and osgText::Text. |
|
|
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. |
|
|
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. |
|
|
|
|
|
|
|
|
|
|
|
|