17 #ifndef AGX_SINGLETON_H 18 #define AGX_SINGLETON_H 36 HIGHEST_PRIORITY = 2147483647,
37 LOWEST_PRIORITY = 10000,
38 DEFAULT_PRIORITY = 1073741824
46 Singleton(
int priority = DEFAULT_PRIORITY );
52 int getPriority()
const;
54 friend class SingletonManager;
56 virtual std::string getClassName()
const = 0;
59 # define SINGLETON_CLASSNAME_METHOD() 61 # define SINGLETON_CLASSNAME_METHOD() \ 62 std::string getClassName() const override { agxStream::ClassInformation ci(AGX_FUNCTION); return ci.getClassType(); } 74 bool m_shutdownCalled;
ref_ptr< Singleton > SingletonRef
Priority
Specifies the ranges of the priority which can be assigned to a singleton at the time of creation...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Smart pointer for handling referenced counted objects.
virtual void shutdown()
Implement this method to cleanup your Singleton class.
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...