33 #ifndef DART_COMMON_DETAIL_SINGLETON_HPP_
34 #define DART_COMMON_DETAIL_SINGLETON_HPP_
48 template <
typename... Args>
54 if (mInstance ==
nullptr)
56 static T instance(std::forward<Args>(_args)...);
57 mInstance = &instance;
65 template <
typename ... Args>
68 return &getSingleton(std::forward<Args>(_args)...);
static T * mInstance
Singleton instance.
Definition: Singleton.hpp:77
static T * getSingletonPtr(Args... _args)
Returns pointer of the singleton.
Definition: Singleton-impl.hpp:66
static T & getSingleton(Args... _args)
Returns reference of the singleton.
Definition: Singleton-impl.hpp:49
Definition: BulletCollisionDetector.cpp:63