Base class for providing reference counted objects.
More...
Inherited by osg::ApplicationUsage, osg::ArrayDispatchers, osg::AttributeDispatch, osg::BlendColor::Extensions, osg::BlendEquation::Extensions, osg::BlendFunc::Extensions, osg::ClampColor::Extensions, osg::CullingSet, osg::CullSettings::ClampProjectionMatrixCallback, osg::DisplaySettings, osg::Drawable::Extensions, osg::FBOExtensions, osg::FragmentProgram::Extensions, osg::FrameStamp, osg::GeometryCostEstimator, osg::GL2Extensions, osg::GLBufferObject, osg::GLBufferObject::Extensions, osg::GLBufferObjectManager, osg::GLBufferObjectSet, osg::GraphicsContext::ResizedCallback, osg::GraphicsContext::SwapCallback, osg::GraphicsContext::Traits, osg::GraphicsContext::WindowingSystemInterface, osg::GraphicsCostEstimator, osg::Image::DimensionsChangedCallback, osg::LineSegment, osg::Multisample::Extensions, osg::NodeVisitor [virtual]
, osg::NodeVisitor::DatabaseRequestHandler, osg::NodeVisitor::ImageRequestHandler, osg::NotifyHandler, osg::Object, osg::ObserverSet, osg::Operation [virtual]
, osg::OperationQueue, osg::OperationThread, osg::Point::Extensions, osg::PrimitiveRestartIndex::Extensions, osg::Program::PerContextProgram, osg::ProgramCostEstimator, osg::RefBlock [virtual]
, osg::RefBlockCount [virtual]
, osg::SampleMaski::Extensions, osg::Shader::PerContextShader, osg::State, osg::State::DynamicObjectRenderingCompletedCallback, osg::Stats, osg::Stencil::Extensions, osg::StencilTwoSided::Extensions, osg::TestResult, osg::Texture1D::SubloadCallback, osg::Texture2D::SubloadCallback, osg::Texture2DArray::Extensions, osg::Texture2DArray::SubloadCallback, osg::Texture3D::Extensions, osg::Texture3D::SubloadCallback, osg::Texture::Extensions, osg::Texture::TextureObject, osg::Texture::TextureObjectManager, osg::Texture::TextureObjectSet, osg::TextureBuffer::TextureBufferObject, osg::TextureCostEstimator, osg::TextureCubeMap::Extensions, osg::TextureCubeMap::SubloadCallback, osg::TextureRectangle::SubloadCallback, osg::VertexProgram::Extensions, osg::View::Slave::UpdateSlaveCallback [virtual]
, osgAnimation::ActionVisitor, osgAnimation::Channel, osgAnimation::KeyframeContainer, osgAnimation::Motion, osgAnimation::RigTransform, osgAnimation::Sampler, osgAnimation::Target, osgAnimation::TemplateCompositeSampler< VALUESAMPLERTYPE, TIMESAMPLERTYPE >, osgDB::AuthenticationDetails, osgDB::AuthenticationMap, osgDB::BaseCompressor, osgDB::BaseSerializer, osgDB::DatabasePager::DatabaseRequest, osgDB::DatabasePager::DatabaseThread, osgDB::DatabasePager::PagedLODList, osgDB::DatabasePager::RequestQueue, osgDB::DeprecatedDotOsgWrapperManager, osgDB::DotOsgWrapper, osgDB::DynamicLibrary, osgDB::FileCache, osgDB::FileLocationCallback [virtual]
, osgDB::FindFileCallback [virtual]
, osgDB::FinishedObjectReadCallback, osgDB::ImageOptions::TexCoordRange, osgDB::ImagePager::ImageRequest, osgDB::ImagePager::ImageThread, osgDB::ImagePager::RequestQueue, osgDB::InputException, osgDB::InputIterator, osgDB::ObjectWrapper, osgDB::ObjectWrapperManager, osgDB::OutputException, osgDB::OutputIterator, osgDB::ReaderWriterInfo, osgDB::ReadFileCallback [virtual]
, osgDB::Registry, osgDB::WriteFileCallback [virtual]
, osgDB::XmlNode, osgFX::Registry, osgFX::Technique, osgGA::AnimationPathManipulator::AnimationCompletedCallback [virtual]
, osgGA::CameraManipulator::CoordinateFrameCallback, osgGA::EventQueue, osgGA::PointerData, osgGA::StandardManipulator::AnimationData, osgManipulator::CommandManager, osgManipulator::Constraint, osgManipulator::MotionCommand, osgManipulator::Projector, osgQt::GraphicsWindowQt::WindowData, osgShadow::ParallelSplitShadowMap::FragmentShaderGenerator, osgShadow::ViewDependentShadowMap::LightData, osgShadow::ViewDependentShadowMap::ShadowData, osgShadow::ViewDependentShadowMap::ViewDependentData, osgShadow::ViewDependentShadowTechnique::ViewData, osgSim::GeographicLocation, osgSim::ImpostorSpriteManager, osgSim::OverlayNode::OverlayData, osgSim::ScalarBar::ScalarPrinter, osgSim::ScalarsToColors, osgTerrain::GeometryTechnique::BufferData, osgTerrain::TerrainTile::TileLoadedCallback, osgTerrain::ValidDataOperator, osgText::Font::FontImplementation, osgText::Glyph3D, osgText::GlyphGeometry, osgUtil::CubeMapGenerator, osgUtil::CullVisitor::Identifier, osgUtil::DelaunayTriangulator, osgUtil::EdgeCollector::Edge, osgUtil::EdgeCollector::Edgeloop, osgUtil::EdgeCollector::Point, osgUtil::EdgeCollector::Triangle, osgUtil::IncrementalCompileOperation::CompileCompletedCallback [virtual]
, osgUtil::IncrementalCompileOperation::CompileOp, osgUtil::IncrementalCompileOperation::CompileSet, osgUtil::IntersectionVisitor::ReadCallback, osgUtil::Intersector, osgUtil::IntersectVisitor::IntersectState, osgUtil::Optimizer::IsOperationPermissibleForObjectCallback, osgUtil::Optimizer::TextureAtlasBuilder::Atlas, osgUtil::Optimizer::TextureAtlasBuilder::Source, osgUtil::RenderBin::DrawCallback, osgUtil::RenderBin::SortCallback, osgUtil::RenderLeaf, osgUtil::SceneView::ComputeStereoMatricesCallback, osgUtil::ShaderGenCache, osgUtil::Simplifier::ContinueSimplificationCallback, osgUtil::StateGraph, osgUtil::TangentSpaceGenerator, osgUtil::Tessellator, osgUtil::Tessellator::Prim, osgViewer::DepthPartitionSettings, osgViewer::GraphicsWindowWin32::WindowData, osgViewer::GraphicsWindowX11::WindowData, osgViewer::OpenGLQuerySupport, osgViewer::Scene, osgViewer::ScreenCaptureHandler::CaptureOperation, osgWidget::Callback, osgWidget::CallbackInterface, and osgWidget::ScriptEngine.
Base class for providing reference counted objects.
osg::Referenced::Referenced |
( |
) | |
|
osg::Referenced::Referenced |
( |
bool |
threadSafeRefUnref) | |
|
|
explicit |
osg::Referenced::Referenced |
( |
const Referenced & |
) | |
|
virtual osg::Referenced::~Referenced |
( |
) | |
|
|
protectedvirtual |
void osg::Referenced::addObserver |
( |
Observer * |
observer) | |
const |
void osg::Referenced::deleteUsingDeleteHandler |
( |
) | |
const |
|
protected |
static OpenThreads::Mutex* osg::Referenced::getGlobalReferencedMutex |
( |
) | |
|
|
static |
Get the ObserverSet if one is attached, otherwise return NULL.
ObserverSet* osg::Referenced::getOrCreateObserverSet |
( |
) | |
const |
OpenThreads::Mutex* osg::Referenced::getRefMutex |
( |
) | |
const |
|
inline |
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.
int osg::Referenced::ref |
( |
) | |
const |
|
inline |
int osg::Referenced::referenceCount |
( |
) | |
const |
|
inline |
Return the number of pointers currently referencing this object.
void osg::Referenced::removeObserver |
( |
Observer * |
observer) | |
const |
Remove Observer that is observing this object.
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated.
static void osg::Referenced::setThreadSafeReferenceCounting |
( |
bool |
enableThreadSafeReferenceCounting) | |
|
|
static |
Set whether reference counting should use a mutex for thread safe 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::StateSet, osg::Node, osg::Drawable, osgText::Text, osgText::GlyphTexture, osgText::TextBase, osgText::Glyph3D, osgSim::OverlayNode::OverlayData, osgText::Font, osg::Group, osg::Geode, osgText::GlyphGeometry, osgSim::OverlayNode, osgText::Text3D, osg::Object, osg::LightSource, osg::Program, and osg::TexGenNode.
void osg::Referenced::signalObserversAndDelete |
( |
bool |
signalDelete, |
|
|
bool |
doDelete |
|
) |
| const |
|
protected |
int osg::Referenced::unref |
( |
) | |
const |
|
inline |
Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
References _refCount, and signalObserversAndDelete().
Referenced by osg::intrusive_ptr_release().
int osg::Referenced::unref_nodelete |
( |
) | |
const |
OpenThreads::AtomicPtr osg::Referenced::_observerSet |
|
mutableprotected |
OpenThreads::Atomic osg::Referenced::_refCount |
|
mutableprotected |
The documentation for this class was generated from the following file: