/* Singleton Class */ /* This is sample header code for a singleton. */ /* The design DOES NOT allow for inheritence. */ /* If you want to inherit from a singleton */ /* class you should see me. */ #ifndef MY_SINGLETON_H #define MY_SINGLETON_H /* Singleton class */ class Singleton { public: static Singleton* Instance(); void printMessage(void); private: static Singleton* _instance; Singleton() {}; // disables construction Singleton(const Singleton& copy) {}; //disables copying Singleton& operator=(const Singleton& rhs){}; // disables copying }; #endif