aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Belikov <pavel.fuchs.belikov@gmail.com>2017-11-09 20:55:09 +0300
committerPavel Belikov <pavel.fuchs.belikov@gmail.com>2017-11-09 20:55:09 +0300
commitfc1813ef6c3c16d4793b9412aa0167971d078bfc (patch)
treed8980411ef86558c86654012f563fbcdf0712831
parentupdate README.md (diff)
downloadargs.hxx-fc1813ef6c3c16d4793b9412aa0167971d078bfc.tar.xz
add documentation for Command::RequireCommand
-rw-r--r--args.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/args.hxx b/args.hxx
index 859a210..21dd433 100644
--- a/args.hxx
+++ b/args.hxx
@@ -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)