3 $Date: 2010/03/04 11:49:52 $
7 #ifndef MODULE_SETTINGS_H
8 #define MODULE_SETTINGS_H
10 #include <cstring> // strcasecmp
14 //-----------------------------------------------------------------------------
18 PARAM_VALUE(const std::string& p, const std::vector<std::string>& vs)
22 PARAM_VALUE(const std::string& p, const std::vector<std::string>& vs, const std::vector<PARAM_VALUE>& ss)
27 bool operator==(const PARAM_VALUE & rhs) const
28 { return !strcasecmp(param.c_str(), rhs.param.c_str()); }
30 bool operator<(const PARAM_VALUE & rhs) const
31 { return strcasecmp(param.c_str(), rhs.param.c_str()) < 0; }
34 std::vector<std::string> value;
35 std::vector<PARAM_VALUE> sections;
37 //-----------------------------------------------------------------------------
38 struct MODULE_SETTINGS
41 MODULE_SETTINGS(const std::string& name, const std::vector<PARAM_VALUE>& params)
45 bool operator==(const MODULE_SETTINGS & rhs) const
46 { return !strcasecmp(moduleName.c_str(), rhs.moduleName.c_str()); }
48 bool operator<(const MODULE_SETTINGS & rhs) const
49 { return strcasecmp(moduleName.c_str(), rhs.moduleName.c_str()) < 0; }
51 std::string moduleName;
52 std::vector<PARAM_VALUE> moduleParams;
54 //-----------------------------------------------------------------------------