|
AGX Dynamics 2.42.3.1
|
Base class for Singletons that should have its shutdown called explicitly before exit of the application. More...
#include <Singleton.h>
Inheritance diagram for agx::Singleton:Public Types | |
| enum | Priority { HIGHEST_PRIORITY = 2147483647 , LOWEST_PRIORITY = 10000 , DEFAULT_PRIORITY = 1073741824 } |
| Specifies the ranges of the priority which can be assigned to a singleton at the time of creation. More... | |
Public Member Functions | |
| Singleton (int priority=DEFAULT_PRIORITY) | |
| Default constructor. | |
| virtual std::string | getClassName () const =0 |
| int | getPriority () const |
| Return the shutdown priority of the singleton instance. | |
| virtual void | shutdown ()=0 |
| Implement this method to cleanup your Singleton class. | |
Protected Member Functions | |
| virtual | ~Singleton () |
| Destructor. | |
| void | _shutdown () |
Base class for Singletons that should have its shutdown called explicitly before exit of the application.
Definition at line 30 of file Singleton.h.
Specifies the ranges of the priority which can be assigned to a singleton at the time of creation.
Definition at line 35 of file Singleton.h.
| agx::Singleton::Singleton | ( | int | priority = DEFAULT_PRIORITY | ) |
Default constructor.
| priority | - The higher priority, the earlier it will get its shutdown executed during application shutdown. So if there is someone which should be shutdown early, use a high priority. Usually default should work. |
|
protectedvirtual |
Destructor.
|
protected |
|
pure virtual |
| int agx::Singleton::getPriority | ( | ) | const |
Return the shutdown priority of the singleton instance.
|
pure virtual |
Implement this method to cleanup your Singleton class.
Implemented in agx::ConfigSingleton, agx::Logger, agx::Notify, agx::Runtime, agx::Statistics, agx::TaskManager, agxIO::DeviceManager, agxIO::Environment, agxIO::ResourceManager, agxNet::Library, agxOSG::CameraManipulatorFactory, agxPlot::DebugPlot, agxPowerLine::PowerLineController, agxRender::RenderSingleton, agxSDK::SimulationControl, agxUtil::SceneRoot, and agxWire::WireController.