![]() |
MaCh3
2.8.0
Reference Guide
|
Extended ArgumentParser with MaCh3-specific functionality. More...
#include <CLI/API/m3argparse.hpp>
Public Member Functions | |
| virtual | ~MaCh3ArgumentParser ()=default |
| const std::string | name () const |
| Get the name of this parser/subcommand. More... | |
| const std::list< std::reference_wrapper< ArgumentParser > > & | subparsers () const |
| Get the list of registered subparsers. More... | |
| const MaCh3ArgumentParser & | get_subcommand_used () const |
| Get the subcommand that was used in parsing. More... | |
| std::vector< std::string > | get_long_option_names () const |
| Return all long option names (–xxx) registered with this parser. More... | |
| bool | option_takes_value (const std::string &name) const |
| Return true if the named option expects a value (not a flag) More... | |
Extended ArgumentParser with MaCh3-specific functionality.
This class extends the standard ArgumentParser to provide additional methods for accessing parser name, subparsers, and tracking which subcommand was used.
Definition at line 17 of file m3argparse.hpp.
|
virtualdefault |
|
inline |
Return all long option names (–xxx) registered with this parser.
Definition at line 50 of file m3argparse.hpp.
|
inline |
Get the subcommand that was used in parsing.
Recursively traverses the subparser hierarchy to find the deepest subcommand that was actually invoked.
Definition at line 40 of file m3argparse.hpp.
|
inline |
Get the name of this parser/subcommand.
Definition at line 24 of file m3argparse.hpp.
|
inline |
Return true if the named option expects a value (not a flag)
Definition at line 60 of file m3argparse.hpp.
|
inline |
Get the list of registered subparsers.
Definition at line 30 of file m3argparse.hpp.