]> git.stg.codes - stg.git/blob - include/stg/module_settings.h
Remove redundand ctors.
[stg.git] / include / stg / module_settings.h
1  /*
2  $Revision: 1.5 $
3  $Date: 2010/03/04 11:49:52 $
4  $Author: faust $
5  */
6
7 #ifndef MODULE_SETTINGS_H
8 #define MODULE_SETTINGS_H
9
10 #include <cstring> // strcasecmp
11 #include <string>
12 #include <vector>
13
14 //-----------------------------------------------------------------------------
15 struct PARAM_VALUE
16 {
17     bool operator==(const PARAM_VALUE & rhs) const
18         { return !strcasecmp(param.c_str(), rhs.param.c_str()); }
19
20     bool operator<(const PARAM_VALUE & rhs) const
21         { return strcasecmp(param.c_str(), rhs.param.c_str()) < 0; }
22
23     std::string param;
24     std::vector<std::string> value;
25 };
26 //-----------------------------------------------------------------------------
27 struct MODULE_SETTINGS
28 {
29     bool operator==(const MODULE_SETTINGS & rhs) const
30         { return !strcasecmp(moduleName.c_str(), rhs.moduleName.c_str()); }
31
32     bool operator<(const MODULE_SETTINGS & rhs) const
33         { return strcasecmp(moduleName.c_str(), rhs.moduleName.c_str()) < 0; }
34
35     std::string              moduleName;
36     std::vector<PARAM_VALUE> moduleParams;
37 };
38 //-----------------------------------------------------------------------------
39 #endif