17#ifndef AGX_SINGLETON_H
18#define AGX_SINGLETON_H
36 HIGHEST_PRIORITY = 2147483647,
37 LOWEST_PRIORITY = 10000,
38 DEFAULT_PRIORITY = 1073741824
54 friend class SingletonManager;
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;
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...
Priority
Specifies the ranges of the priority which can be assigned to a singleton at the time of creation.
virtual ~Singleton()
Destructor.
Singleton(int priority=DEFAULT_PRIORITY)
Default constructor.
virtual void shutdown()=0
Implement this method to cleanup your Singleton class.
virtual std::string getClassName() const =0
int getPriority() const
Return the shutdown priority of the singleton instance.
Smart pointer for handling referenced counted objects.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
ref_ptr< Singleton > SingletonRef