diff options
author | Pavel Belikov <pavel.fuchs.belikov@gmail.com> | 2017-11-09 20:55:09 +0300 |
---|---|---|
committer | Pavel Belikov <pavel.fuchs.belikov@gmail.com> | 2017-11-09 20:55:09 +0300 |
commit | fc1813ef6c3c16d4793b9412aa0167971d078bfc (patch) | |
tree | d8980411ef86558c86654012f563fbcdf0712831 | |
parent | update README.md (diff) | |
download | args.hxx-fc1813ef6c3c16d4793b9412aa0167971d078bfc.tar.xz |
add documentation for Command::RequireCommand
-rw-r--r-- | args.hxx | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1374,6 +1374,11 @@ namespace args const std::string &Help() const { return help; } + /** If value is true, parser will fail if no command was parsed. + */ + void RequireCommand(bool value) + { commandIsRequired = value; } + virtual bool IsGroup() const override { return false; } @@ -1396,11 +1401,6 @@ namespace args } } - void RequireCommand(bool value) - { - commandIsRequired = value; - } - virtual FlagBase *Match(const EitherFlag &flag) override { if (selectedCommand != nullptr) |