// Options.h #ifndef OPTIONS_H #define OPTIONS_H #include #include #include using namespace std; typedef map OptionsMap; /** * Options */ class Options { public: // Get the singleton object. static Options *makeOptions(); // Access one of the settings. string &operator[](string const &key) { return (*m_settings)[key]; } private: // Hide the default constructor. Options() : m_settings(new OptionsMap()) {} // Hide the copy constructor. Options(const Options &options) {} // Hide the default destructor. ~Options() {} // Singleton object. static Options *s_options; // Lookup table for storing the settings. OptionsMap *m_settings; }; #endif // !OPTIONS_H