|
TrueReality
v0.1.1912
|
An application base from which all other application classes should be derived. More...
#include <AppBase.h>


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 | |
| AppBase (const std::string &name=CLASS_TYPE) | |
| Holds the class type name for efficient comparisons. More... | |
| virtual const std::string & | GetType () const override |
| Gets the type. More... | |
| virtual void | Run () |
| Starts the application loop. More... | |
| virtual void | Quit () |
| Stops the application loop and exits the application. 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 void | SetName (const std::string &name) |
| Sets this instances name. 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::UniqueId & | GetUUID (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("trApp::AppBase") |
| 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 | |
| ~AppBase () | |
| 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< trManager::SystemManager > | mSysMan |
Private Attributes | |
| trBase::SmrtPtr< trCore::SystemDirector > | mSysDirector |
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... | |
An application base from which all other application classes should be derived.
| trApp::AppBase::AppBase | ( | const std::string & | name = CLASS_TYPE | ) |
Holds the class type name for efficient comparisons.
Default constructor.
| name | (Optional) The name of the class. |
Definition at line 31 of file AppBase.cpp.
References trManager::SystemManager::GetInstance(), trManager::DirectorPriority::HIGHEST, mSysDirector, mSysMan, and trManager::SystemManager::RegisterDirector().

|
protected |
Destructor.
Definition at line 44 of file AppBase.cpp.
|
overridevirtual |
Gets the type.
Implements trBase::Base.
Definition at line 49 of file AppBase.cpp.
References CLASS_TYPE.
|
virtual |
Stops the application loop and exits the application.
Definition at line 61 of file AppBase.cpp.
References mSysMan, trManager::SystemManager::SendMessage(), and trCore::SystemControls::SHUT_DOWN.

|
virtual |
Starts the application loop.
Definition at line 55 of file AppBase.cpp.
References mSysDirector, and trCore::SystemDirector::Run().

|
static |
|
private |
|
protected |