]> git.stg.codes - stg.git/blob - include/base_settings.h
Fix compilation issues for plugin and auth interfaces
[stg.git] / include / base_settings.h
1  /*
2  $Revision: 1.5 $
3  $Date: 2010/03/04 11:49:52 $
4  $Author: faust $
5  */
6
7 #ifndef BASE_SETTINGS_H
8 #define BASE_SETTINGS_H
9
10 #include <string.h>
11 #include <string>
12 #include <vector>
13
14 using namespace std;
15
16 //-----------------------------------------------------------------------------
17 struct PARAM_VALUE
18 {
19     PARAM_VALUE()
20         : param(),
21           value()
22     {};
23     bool operator==(const PARAM_VALUE & rhs) const
24         { return !strcasecmp(param.c_str(), rhs.param.c_str()); };
25
26     bool operator<(const PARAM_VALUE & rhs) const
27         { return strcasecmp(param.c_str(), rhs.param.c_str()) < 0; };
28
29     string param;
30     vector<string> value;
31 };
32 //-----------------------------------------------------------------------------
33 struct MODULE_SETTINGS
34 {
35     MODULE_SETTINGS()
36         : moduleName(),
37           moduleParams()
38     {};
39     MODULE_SETTINGS(const MODULE_SETTINGS & rvalue)
40         : moduleName(rvalue.moduleName),
41           moduleParams(rvalue.moduleParams)
42     {};
43     bool operator==(const MODULE_SETTINGS & rhs) const
44         { return !strcasecmp(moduleName.c_str(), rhs.moduleName.c_str()); };
45
46     bool operator<(const MODULE_SETTINGS & rhs) const
47         { return strcasecmp(moduleName.c_str(), rhs.moduleName.c_str()) < 0; };
48
49 string              moduleName;
50 vector<PARAM_VALUE> moduleParams;
51 };
52 //-----------------------------------------------------------------------------
53 #endif //BASE_SETTINGS_H
54
55