00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef OM_HGUARD_OMSETTINGS_H
00025 #define OM_HGUARD_OMSETTINGS_H
00026
00027 #include <string>
00028
00030
00031
00032
00037 class OmSettings {
00038 public:
00039 class Internal;
00041 Internal *internal;
00042
00045 OmSettings();
00046
00047
00048
00053 OmSettings(const OmSettings &other);
00055 void operator=(const OmSettings &other);
00056
00058 ~OmSettings();
00059
00066 void set(const std::string &key, const std::string &value);
00067
00074 void set(const std::string &key, const char *value);
00075
00082 void set(const std::string &key, int value);
00083
00090 void set(const std::string &key, double value);
00091
00098 void set(const std::string &key, bool value);
00099
00106 std::string get(const std::string &key) const;
00107
00112 std::string get(const std::string &key, std::string def) const;
00113
00120 int get_int(const std::string &key) const;
00121
00126 int get_int(const std::string &key, int def) const;
00127
00134 bool get_bool(const std::string &key) const;
00135
00140 bool get_bool(const std::string &key, bool def) const;
00141
00148 double get_real(const std::string &key) const;
00149
00154 double get_real(const std::string &key, double def) const;
00155
00159 std::string get_description() const;
00160 };
00161
00162 #endif // OM_HGUARD_OMSETTINGS_H