X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/df2bb45e41303b5132feb6b264caaa01c31b8bb5..0b3f54e8d9366b135697ac1d96c15a85f55fcb62:/projects/sgconf/options.h diff --git a/projects/sgconf/options.h b/projects/sgconf/options.h index 696255ff..3d4bdd64 100644 --- a/projects/sgconf/options.h +++ b/projects/sgconf/options.h @@ -23,6 +23,7 @@ #include #include +#include #include #include // size_t @@ -68,13 +69,16 @@ class OPTION class OPTION_BLOCK { public: - void Add(const std::string & shortName, - const std::string & longName, - ACTION * action, - const std::string & description); - void Add(const std::string & longName, - ACTION * action, - const std::string & description); + OPTION_BLOCK() {} + OPTION_BLOCK(const std::string & description) + : m_description(description) {} + OPTION_BLOCK & Add(const std::string & shortName, + const std::string & longName, + ACTION * action, + const std::string & description); + OPTION_BLOCK & Add(const std::string & longName, + ACTION * action, + const std::string & description); void Help(size_t level) const; @@ -82,6 +86,19 @@ class OPTION_BLOCK private: std::vector