]> git.stg.codes - stg.git/blobdiff - include/stg/module_settings.h
Merge branch 'stg-2.409' into stg-2.409-radius
[stg.git] / include / stg / module_settings.h
index 669cc2254fab0fb59c39d5dd53df571be89f1db8..b94de10c25d2f56b71cabbaf5beef54e4a0f4fcb 100644 (file)
 //-----------------------------------------------------------------------------
 struct PARAM_VALUE
 {
 //-----------------------------------------------------------------------------
 struct PARAM_VALUE
 {
+    PARAM_VALUE() {}
+    PARAM_VALUE(const std::string& p, const std::vector<std::string>& vs)
+        : param(p),
+          value(vs)
+    {}
+    PARAM_VALUE(const std::string& p, const std::vector<std::string>& vs, const std::vector<PARAM_VALUE>& ss)
+        : param(p),
+          value(vs),
+          sections(ss)
+    {}
     bool operator==(const PARAM_VALUE & rhs) const
         { return !strcasecmp(param.c_str(), rhs.param.c_str()); }
 
     bool operator==(const PARAM_VALUE & rhs) const
         { return !strcasecmp(param.c_str(), rhs.param.c_str()); }
 
@@ -22,10 +32,16 @@ struct PARAM_VALUE
 
     std::string param;
     std::vector<std::string> value;
 
     std::string param;
     std::vector<std::string> value;
+    std::vector<PARAM_VALUE> sections;
 };
 //-----------------------------------------------------------------------------
 struct MODULE_SETTINGS
 {
 };
 //-----------------------------------------------------------------------------
 struct MODULE_SETTINGS
 {
+    MODULE_SETTINGS() {}
+    MODULE_SETTINGS(const std::string& name, const std::vector<PARAM_VALUE>& params)
+        : moduleName(name),
+          moduleParams(params)
+    {}
     bool operator==(const MODULE_SETTINGS & rhs) const
         { return !strcasecmp(moduleName.c_str(), rhs.moduleName.c_str()); }
 
     bool operator==(const MODULE_SETTINGS & rhs) const
         { return !strcasecmp(moduleName.c_str(), rhs.moduleName.c_str()); }