Go to the documentation of this file.
17 #ifndef GZ_COMMON_SINGLETONT_HH_
18 #define GZ_COMMON_SINGLETONT_HH_
32 return &GetInstance();
42 private:
static T &GetInstance()
45 return static_cast<T &
>(t);
49 private:
static T &myself;
54 T &SingletonT<T>::myself = SingletonT<T>::GetInstance();
Forward declarations for the common classes.
virtual ~SingletonT()
Destructor.
Definition: gz/common/SingletonT.hh:39
static T * Instance()
Get an instance of the singleton.
Definition: gz/common/SingletonT.hh:30
Singleton template class.
Definition: gz/common/SingletonT.hh:27
SingletonT()
Constructor.
Definition: gz/common/SingletonT.hh:36