]> git.stg.codes - stg.git/blobdiff - projects/sgconf/action.h
Merge branch 'stg-2.409-radius'
[stg.git] / projects / sgconf / action.h
index 64d7c1e83e01ed6aceb653bde460c4157d182422..940ea7f6272673bad87ab08aa12819e8e86a602f 100644 (file)
@@ -22,6 +22,7 @@
 #define __STG_SGCONF_ACTION_H__
 
 #include <string>
+#include <map>
 #include <stdexcept>
 
 namespace SGCONF
@@ -29,6 +30,7 @@ namespace SGCONF
 
 class OPTION_BLOCK;
 struct PARSER_STATE;
+struct CONFIG;
 
 class ACTION
 {
@@ -39,7 +41,8 @@ class ACTION
         virtual std::string ParamDescription() const = 0;
         virtual std::string DefaultDescription() const = 0;
         virtual OPTION_BLOCK & Suboptions() = 0;
-        virtual PARSER_STATE Parse(int argc, char ** argv) = 0;
+        virtual PARSER_STATE Parse(int argc, char ** argv, void * data = NULL) = 0;
+        virtual void ParseValue(const std::string &) {}
 
         class ERROR : public std::runtime_error
         {
@@ -49,13 +52,6 @@ class ACTION
         };
 };
 
-template <typename T>
-class ACTION_CLONE_MIXIN : public ACTION
-{
-    public:
-        virtual ACTION * Clone() const { return new T(*this); }
-};
-
 } // namespace SGCONF
 
 #endif