22 #ifndef GAZEBO_COMMON_SINGLETONT_HH_ 23 #define GAZEBO_COMMON_SINGLETONT_HH_ 38 return &GetInstance();
48 private:
static T &GetInstance()
51 return static_cast<T &
>(t);
59 #define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType) 61 #define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType) \ 66 class singletonType; \ 69 template class visibility ::SingletonT<n1::n2::singletonType>;
Singleton template class.
Definition: SingletonT.hh:33
virtual ~SingletonT()
Destructor.
Definition: SingletonT.hh:45
SingletonT()
Constructor.
Definition: SingletonT.hh:42
static T * Instance()
Get an instance of the singleton.
Definition: SingletonT.hh:36