X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fgetopt.h;h=2aaceef836730aa24a966c3cfaa20bb9864e23a7;hp=dbc0f9cef0284e94d4f5ec66b890e94700515e4d;hb=9f8d6a18f68fb54b62e9f4a5cf1a1650282b3667;hpb=699670a264c7fc5a0b05c2d258a7552f5c594bd1;ds=sidebyside diff --git a/source/core/getopt.h b/source/core/getopt.h index dbc0f9c..2aaceef 100644 --- a/source/core/getopt.h +++ b/source/core/getopt.h @@ -72,6 +72,8 @@ public: metavariable is used to denote the argument in the option list. */ virtual Option &set_help(const std::string &, const std::string &) = 0; + virtual Option &bind_seen_count(unsigned &) = 0; + /// Returns the number of times this option was seen on the command line. virtual unsigned get_seen_count() const = 0; }; @@ -84,6 +86,7 @@ private: std::string lng; ArgType arg_type; unsigned seen_count; + unsigned *ext_seen_count; std::string help; std::string metavar; @@ -93,6 +96,7 @@ private: virtual OptBase &set_help(const std::string &); virtual OptBase &set_help(const std::string &, const std::string &); + virtual OptBase &bind_seen_count(unsigned &); char get_short() const { return shrt; } const std::string &get_long() const { return lng; } ArgType get_arg_type() const { return arg_type; }