diff --git a/cmdopt.cpp b/cmdopt.cpp index a7f6a845..8adb50e6 100644 --- a/cmdopt.cpp +++ b/cmdopt.cpp @@ -117,6 +117,28 @@ base::seen (bool _seen) /////////////////////////////////////////////////////////////////////////////// +null::null (std::string _name): + base (std::move (_name)) +{ ; } + + +//----------------------------------------------------------------------------- +void +null::execute (void) +{ + seen (true); +} + + +//----------------------------------------------------------------------------- +void +null::execute (const char *restrict) +{ + seen (true); +} + + +//----------------------------------------------------------------------------- namespace util { namespace cmdopt { namespace option { template class value; template class value; diff --git a/cmdopt.hpp b/cmdopt.hpp index 92818027..1b3e0814 100644 --- a/cmdopt.hpp +++ b/cmdopt.hpp @@ -51,6 +51,15 @@ namespace util { namespace cmdopt { }; + class null : public base { + public: + null (std::string name); + + virtual void execute (void) override; + virtual void execute (const char *restrict) override; + }; + + template class value : public base { public: