TrueReality  v0.1.1912
trSG::NodeVisitor Class Reference

#include <NodeVisitor.h>

Inheritance diagram for trSG::NodeVisitor:
Collaboration diagram for trSG::NodeVisitor:

Public Types

using BaseClass = trBase::Base
 
- Public Types inherited from trBase::Base
using BaseClass = trBase::SmrtClass
 
- Public Types inherited from trBase::SmrtClass
using BaseClass = osg::Referenced
 

Public Member Functions

 NodeVisitor (const std::string name=CLASS_TYPE)
 Holds the class type name for efficient comparisons. More...
 
virtual const std::string & GetType () const override
 Returns the class type. More...
 
virtual void SetName (const std::string &name)
 Sets this instances name. More...
 
virtual osg::NodeVisitor * AsOSGVisitor ()
 Returns a pointer to the internal OSG Node. More...
 
virtual const osg::NodeVisitor * AsOSGVisitor () const
 Returns a constant pointer to the internal OSG Node. More...
 
- Public Member Functions inherited from trBase::Base
 Base (const std::string &name=CLASS_TYPE)
 Holds the class type name for efficient comparisons. More...
 
virtual const std::string & GetName ()
 Returns this instances name. More...
 
virtual const std::string & GetName () const
 Returns this instances name. More...
 
virtual void SetUUID (const trBase::UniqueId &id)
 Overwrites the default internal UUID with the passed in one. More...
 
virtual const trBase::UniqueIdGetUUID (void)
 Returns the instances Universally Unique ID. More...
 
- Public Member Functions inherited from trBase::SmrtClass
 SmrtClass ()
 Adds an easy and swappable access to the base class. More...
 
 SmrtClass (bool threadSafeRefUnref)
 Constructor. More...
 
 SmrtClass (const SmrtClass &inst)
 Copy constructor. More...
 
virtual bool GetThreadSafeRefUnref ()
 Get whether a mutex is used to ensure Ref() and UnRef() are thread safe. More...
 
OpenThreads::Mutex * GetRefMutex () const
 Get the mutex used to ensure thread safety of Ref()/UnRef(). More...
 
int Ref () const
 Increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
int Unref () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More...
 
int UnRefNoDelete () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More...
 
int ReferenceCount () const
 Return the number of pointers currently referencing this object. More...
 

Static Public Attributes

static const trUtil::RefStr CLASS_TYPE = trUtil::RefStr("trSG::NodeVisitor")
 Adds an easy and swappable access to the base class. More...
 
- Static Public Attributes inherited from trBase::Base
static const trUtil::RefStr CLASS_TYPE = trUtil::RefStr("trBase::Base")
 Adds an easy and swappable access to the base class. More...
 

Protected Member Functions

 ~NodeVisitor ()
 Destructor. More...
 
- Protected Member Functions inherited from trBase::Base
 ~Base ()
 Base destructor. More...
 
- Protected Member Functions inherited from trBase::SmrtClass
 ~SmrtClass ()
 

Protected Attributes

trBase::SmrtPtr< osg::NodeVisitor > mNodeVisitor
 

Additional Inherited Members

- Static Public Member Functions inherited from trBase::SmrtClass
static OpenThreads::Mutex * GetGlobalReferencedMutex ()
 Get the optional global Referenced mutex, this can be shared between all trBase::SmrtClass. More...
 

Detailed Description

Definition at line 34 of file trSG/NodeVisitor.h.

Member Typedef Documentation

◆ BaseClass

Definition at line 37 of file trSG/NodeVisitor.h.

Constructor & Destructor Documentation

◆ NodeVisitor()

trSG::NodeVisitor::NodeVisitor ( const std::string  name = CLASS_TYPE)

Holds the class type name for efficient comparisons.

Default constructor.

Parameters
name(Optional) The name.

Definition at line 30 of file trSG/NodeVisitor.cpp.

References mNodeVisitor.

◆ ~NodeVisitor()

trSG::NodeVisitor::~NodeVisitor ( )
protected

Destructor.

Definition at line 62 of file trSG/NodeVisitor.cpp.

Member Function Documentation

◆ AsOSGVisitor() [1/2]

osg::NodeVisitor * trSG::NodeVisitor::AsOSGVisitor ( )
virtual

Returns a pointer to the internal OSG Node.

Returns
Null if it fails, else a pointer to an osg::Node.

Definition at line 50 of file trSG/NodeVisitor.cpp.

References trBase::SmrtPtr< T >::Get(), and mNodeVisitor.

Here is the call graph for this function:

◆ AsOSGVisitor() [2/2]

const osg::NodeVisitor * trSG::NodeVisitor::AsOSGVisitor ( ) const
virtual

Returns a constant pointer to the internal OSG Node.

Returns
Null if it fails, else a pointer to a const osg::Node.

Definition at line 56 of file trSG/NodeVisitor.cpp.

References trBase::SmrtPtr< T >::Get(), and mNodeVisitor.

Here is the call graph for this function:

◆ GetType()

const std::string & trSG::NodeVisitor::GetType ( ) const
overridevirtual

Returns the class type.

Returns
The type.

Implements trBase::Base.

Definition at line 37 of file trSG/NodeVisitor.cpp.

References CLASS_TYPE.

◆ SetName()

void trSG::NodeVisitor::SetName ( const std::string &  name)
virtual

Sets this instances name.

Parameters
nameThe name.

Reimplemented from trBase::Base.

Definition at line 43 of file trSG/NodeVisitor.cpp.

References mNodeVisitor, and trBase::Base::SetName().

Here is the call graph for this function:

Member Data Documentation

◆ CLASS_TYPE

const trUtil::RefStr trSG::NodeVisitor::CLASS_TYPE = trUtil::RefStr("trSG::NodeVisitor")
static

Adds an easy and swappable access to the base class.

Definition at line 39 of file trSG/NodeVisitor.h.

Referenced by GetType().

◆ mNodeVisitor

trBase::SmrtPtr<osg::NodeVisitor> trSG::NodeVisitor::mNodeVisitor
protected

Definition at line 88 of file trSG/NodeVisitor.h.

Referenced by AsOSGVisitor(), NodeVisitor(), and SetName().


The documentation for this class was generated from the following files: