OpenSceneGraph
3.4.0
|
Smart pointer for handling referenced counted objects. More...
Public Types | |
typedef T | element_type |
Public Member Functions | |
ref_ptr () | |
ref_ptr (T *ptr) | |
ref_ptr (const ref_ptr &rp) | |
template<class Other > | |
ref_ptr (const ref_ptr< Other > &rp) | |
ref_ptr (observer_ptr< T > &optr) | |
~ref_ptr () | |
ref_ptr & | operator= (const ref_ptr &rp) |
template<class Other > | |
ref_ptr & | operator= (const ref_ptr< Other > &rp) |
ref_ptr & | operator= (T *ptr) |
bool | operator== (const ref_ptr &rp) const |
bool | operator== (const T *ptr) const |
bool | operator!= (const ref_ptr &rp) const |
bool | operator!= (const T *ptr) const |
bool | operator< (const ref_ptr &rp) const |
operator unspecified_bool_type () const | |
T & | operator* () const |
T * | operator-> () const |
T * | get () const |
bool | operator! () const |
bool | valid () const |
T * | release () |
release the pointer from ownership by this ref_ptr<>, decrementing the objects refencedCount() via unref_nodelete() to prevent the Object object from being deleted even if the reference count goes to zero. | |
void | swap (ref_ptr &rp) |
Friends | |
class | ref_ptr |
bool | operator== (const T *ptr, const ref_ptr &rp) |
bool | operator!= (const T *ptr, const ref_ptr &rp) |
Smart pointer for handling referenced counted objects.
typedef T osg::ref_ptr< T >::element_type |
osg::ref_ptr< T >::ref_ptr | ( | ) | [inline] |
osg::ref_ptr< T >::ref_ptr | ( | T * | ptr | ) | [inline] |
osg::ref_ptr< T >::ref_ptr | ( | const ref_ptr< T > & | rp | ) | [inline] |
osg::ref_ptr< T >::ref_ptr | ( | const ref_ptr< Other > & | rp | ) | [inline] |
osg::ref_ptr< T >::ref_ptr | ( | observer_ptr< T > & | optr | ) | [inline] |
osg::ref_ptr< T >::~ref_ptr | ( | ) | [inline] |
T* osg::ref_ptr< T >::get | ( | ) | const [inline] |
Referenced by osgUtil::CullVisitor::addDrawable(), osgUtil::CullVisitor::addDrawableAndDepth(), osg::State::applyGlobalDefaultAttribute(), osg::State::applyGlobalDefaultAttributeOnTexUnit(), osg::clone(), osg::cloneType(), osg::const_pointer_cast(), osg::dynamic_pointer_cast(), osg::State::get(), osg::get_pointer(), osgParticle::Particle::getAlphaInterpolator(), osgParticle::Particle::getColorInterpolator(), osgParticle::ModularEmitter::getCounter(), osg::DrawElements::getElementBufferObject(), osg::State::getGlobalDefaultAttribute(), osg::State::getGlobalDefaultTextureAttribute(), osg::Camera::getImplicitBufferAttachmentRenderMask(), osg::Camera::getImplicitBufferAttachmentResolveMask(), osgAnimation::TemplateSampler< F >::getKeyframeContainer(), osgAnimation::TemplateSampler< F >::getKeyframeContainerTyped(), osg::CullStack::getModelViewMatrix(), osg::CullStack::getMVPW(), osgAnimation::TemplateSampler< F >::getOrCreateKeyframeContainer(), osgAnimation::TemplateChannel< SamplerType >::getOrCreateSampler(), osgFX::BumpMapping::getOverrideDiffuseTexture(), osgFX::BumpMapping::getOverrideNormalMapTexture(), osgParticle::ParticleProcessor::getParticleSystem(), osgParticle::ModularEmitter::getPlacer(), osg::CullStack::getProjectionMatrix(), osgAnimation::TemplateChannel< SamplerType >::getSampler(), osgAnimation::TemplateChannel< SamplerType >::getSamplerTyped(), osgParticle::ModularEmitter::getShooter(), osgParticle::Particle::getSizeInterpolator(), osg::RenderInfo::getState(), osgAnimation::TemplateChannel< SamplerType >::getTarget(), osgAnimation::TemplateChannel< SamplerType >::getTargetTyped(), osg::RenderInfo::getUserData(), osg::CullStack::getViewport(), osg::CullStack::getWindowMatrix(), osgAnimation::UpdateUniform< osg::Matrixf >::link(), osg::observer_ptr< Skeleton >::observer_ptr(), osg::observer_ptr< Skeleton >::operator=(), osgDB::InputStream::readObjectOfType(), osg::Node::removeCullCallback(), osg::Node::removeEventCallback(), osg::Node::removeUpdateCallback(), osgAnimation::TemplateChannel< SamplerType >::setTarget(), osg::static_pointer_cast(), and osgAnimation::UpdateRigGeometry::update().
osg::ref_ptr< T >::operator unspecified_bool_type | ( | ) | const [inline] |
bool osg::ref_ptr< T >::operator! | ( | ) | const [inline] |
bool osg::ref_ptr< T >::operator!= | ( | const ref_ptr< T > & | rp | ) | const [inline] |
bool osg::ref_ptr< T >::operator!= | ( | const T * | ptr | ) | const [inline] |
T& osg::ref_ptr< T >::operator* | ( | ) | const [inline] |
T* osg::ref_ptr< T >::operator-> | ( | ) | const [inline] |
bool osg::ref_ptr< T >::operator< | ( | const ref_ptr< T > & | rp | ) | const [inline] |
ref_ptr& osg::ref_ptr< T >::operator= | ( | const ref_ptr< T > & | rp | ) | [inline] |
ref_ptr& osg::ref_ptr< T >::operator= | ( | const ref_ptr< Other > & | rp | ) | [inline] |
ref_ptr& osg::ref_ptr< T >::operator= | ( | T * | ptr | ) | [inline] |
bool osg::ref_ptr< T >::operator== | ( | const ref_ptr< T > & | rp | ) | const [inline] |
bool osg::ref_ptr< T >::operator== | ( | const T * | ptr | ) | const [inline] |
T* osg::ref_ptr< T >::release | ( | ) | [inline] |
release the pointer from ownership by this ref_ptr<>, decrementing the objects refencedCount() via unref_nodelete() to prevent the Object object from being deleted even if the reference count goes to zero.
Use when using a local ref_ptr<> to an Object that you want to return from a function/method via a C pointer, whilst preventing the normal ref_ptr<> destructor from cleaning up the object. When using release() you are implicitly expecting other code to take over management of the object, otherwise a memory leak will result.
Referenced by osg::clone(), osg::cloneType(), osgDB::readFile(), and osgDB::InputStream::readObjectOfType().
void osg::ref_ptr< T >::swap | ( | ref_ptr< T > & | rp | ) | [inline] |
Referenced by osg::swap().
bool osg::ref_ptr< T >::valid | ( | ) | const [inline] |
Referenced by osg::State::applyAttribute(), osg::State::applyAttributeOnTexUnit(), osg::State::applyGlobalDefaultAttribute(), osg::State::applyGlobalDefaultAttributeOnTexUnit(), osgAnimation::TemplateChannel< SamplerType >::createKeyframeContainerFromTargetValue(), osg::Drawable::draw(), osg::observer_ptr< Skeleton >::get(), osg::RenderInfo::getContextID(), osgAnimation::TemplateChannel< SamplerType >::getOrCreateSampler(), osgViewer::GraphicsWindowEmbedded::init(), osgSim::BlinkSequence::localTime(), osg::observer_ptr< Skeleton >::lock(), osg::observer_ptr< Skeleton >::observer_ptr(), osg::ref_ptr< osg::Sphere >::operator unspecified_bool_type(), osg::observer_ptr< Skeleton >::operator=(), osgDB::readRefShaderFile(), and osgAnimation::UpdateRigGeometry::update().
bool operator== | ( | const T * | ptr, |
const ref_ptr< T > & | rp | ||
) | [friend] |
friend class ref_ptr [friend] |
![]() | Generated at Tue Dec 8 2015 00:16:43 for the OpenSceneGraph by doxygen 1.7.6.1. |