#include <cddefines.h>
Inherited by t_hydrobranch, and t_yield.
Static Public Member Functions | |
static T & | Inst () |
class t_myclass : public Singleton<t_myclass> { friend class Singleton<t_myclass>; protected: t_myclass(); // make sure the contructor is protected! public: long myfunc() const { return 43; } };
and use as follows throughout the code:
long l = t_myclass::Inst().myfunc();
NB NB - This implementation is not threadsafe !!
Definition at line 77 of file cddefines.h.
static T& Singleton< T >::Inst | ( | ) | [inline, static] |
Definition at line 80 of file cddefines.h.
Referenced by atmdat_readin(), ContCreatePointers(), GammaPrtShells(), HydroBranch(), ion_photo(), ion_solver(), lines(), ParseDont(), punch_opacity(), PunchDo(), and zero().