33 #ifndef DART_COMMON_DETAIL_SINGLETON_HPP_
34 #define DART_COMMON_DETAIL_SINGLETON_HPP_
49 template <
typename... Args>
55 if (mInstance ==
nullptr)
57 static T instance(std::forward<Args>(_args)...);
58 mInstance = &instance;
66 template <
typename... Args>
69 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:67
static T & getSingleton(Args... _args)
Returns reference of the singleton.
Definition: Singleton-impl.hpp:50
Definition: BulletCollisionDetector.cpp:65