|
TrueReality
v0.1.1912
|
Smart pointer for handling referenced counted objects. More...
#include <SmrtPtr.h>

Public Member Functions | |
| SmrtPtr () | |
| Default constructor. More... | |
| SmrtPtr (T *t) | |
| Constructor. More... | |
| SmrtPtr (const SmrtPtr &smPt) | |
| Copy constructor. More... | |
| T * | Get () const |
| Returns the stored internal pointer. More... | |
| T * | Release () |
| Release the pointer from ownership by this SmrtPtr<>, decrementing the objects refenced count to prevent the object from being deleted even if the reference count goes to zero. More... | |
| void | Swap (SmrtPtr &sp) |
| Swaps the internal pointer of this and the passed in SmartPtr. More... | |
| bool | Valid () const |
| Returns True if the smart pointer has a valid internal pointer set. More... | |
| bool | operator! () const |
| Logical negation operator. More... | |
| T & | operator* () const |
| Dereferences the internal pointer. More... | |
| T * | operator-> () const |
| Access to the internal pointer. More... | |
| operator T* () const | |
| operator osg::ref_ptr< T > () const | |
| Implicit conversion operator to OSG ref_ptr. More... | |
| operator osg::ref_ptr< T > & () | |
| Implicit conversion operator to OSG ref_ptr. More... | |
| operator const osg::ref_ptr< T > & () const | |
| Implicit conversion operator to OSG ref_ptr. More... | |
| operator osg::ref_ptr< T > * () | |
| Implicit conversion operator to OSG ref_ptr. More... | |
Private Attributes | |
| osg::ref_ptr< T > | mOSGSmartPtr |
Friends | |
| std::ostream & | operator<< (std::ostream &ios, const SmrtPtr &smPt) |
| Prints out the memory address of the held pointer. More... | |
Smart pointer for handling referenced counted objects.
|
inline |
|
inline |
|
inline |
|
inline |
Returns the stored internal pointer.
Definition at line 73 of file SmrtPtr.h.
Referenced by trCore::Nodes::FrameStamp::AsOSGClass(), trBase::NodeBase::AsOSGNode(), trSG::Node::AsOSGNode(), trCore::Nodes::Node::AsOSGNode(), trSG::NodeVisitor::AsOSGVisitor(), trCore::Nodes::NodeVisitor::AsOSGVisitor(), trManager::DirectorBase::CompareComponentPriority(), trManager::EntityBase::GetParent(), trUtil::hash< trBase::SmrtPtr< _Key > >::operator()(), trUtil::hash< osg::ref_ptr< _Key > >::operator()(), and trBase::SmrtPtr< osg::PositionAttitudeTransform >::SmrtPtr().

|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Release the pointer from ownership by this SmrtPtr<>, decrementing the objects refenced count to prevent the object from being deleted even if the reference count goes to zero.
When using Release() you are implicitly expecting other code to take over management of the object, otherwise a memory leak will result.
|
inline |
|
inline |
Returns True if the smart pointer has a valid internal pointer set.
Definition at line 103 of file SmrtPtr.h.
Referenced by trManager::DirectorBase::CompareComponentPriority(), trManager::EntityBase::Emancipate(), trManager::SystemManager::GetInstance(), trCore::SceneObjects::SkyBoxNode::LoadFile(), trManager::EntityBase::RemoveFromHierarchy(), and trManager::EntityBase::SetParent().

|
friend |
|
private |
Definition at line 203 of file SmrtPtr.h.
Referenced by trBase::SmrtPtr< osg::PositionAttitudeTransform >::Get(), trBase::SmrtPtr< trManager::SystemManager >::operator const osg::ref_ptr< trManager::SystemManager > &(), trBase::SmrtPtr< trManager::SystemManager >::operator osg::ref_ptr< trManager::SystemManager >(), trBase::SmrtPtr< trManager::SystemManager >::operator osg::ref_ptr< trManager::SystemManager > &(), trBase::SmrtPtr< trManager::SystemManager >::operator osg::ref_ptr< trManager::SystemManager > *(), trBase::SmrtPtr< trManager::SystemManager >::operator trManager::SystemManager *(), trBase::SmrtPtr< osg::PositionAttitudeTransform >::operator!(), trBase::SmrtPtr< osg::PositionAttitudeTransform >::operator*(), trBase::SmrtPtr< osg::PositionAttitudeTransform >::operator->(), trBase::SmrtPtr< osg::PositionAttitudeTransform >::Release(), trBase::SmrtPtr< osg::PositionAttitudeTransform >::SmrtPtr(), trBase::SmrtPtr< osg::PositionAttitudeTransform >::Swap(), and trBase::SmrtPtr< osg::PositionAttitudeTransform >::Valid().