|
lintel 0.2.0
|
#include <CommandParser.h>
Public Member Functions | |
| CommandParser ()=default | |
| void | addCommand (const Command &command, ENUM value) |
| void | addCommand (Command &&command, ENUM value) |
| ENUM | parse (const std::string &command, const std::vector< std::string > &flags) |
| void | printHelp (const std::string &command, std::ostream &os=std::cout) |
| void | printHelp (std::string_view componentName, const std::string_view alias, std::string_view description, std::ostream &os=std::cout) |
| void | printCommandList (std::set< std::string > menuAlias, std::ostream &os=std::cout) |
| std::vector< std::string > | allCommandsOf () |
Generic command parser that maps string commands to enum values
| ENUM | enum type for command identifiers |
| undefined | enum value returned for unknown commands |
|
default |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Register a command with its enum value
|
inline |
|
inline |
Parse a command string and its flags
| command | the command name |
| flags | the flag arguments |
|
inline |
Print a compact list of all commands and aliases
|
inline |
Print help for a specific command
|
inline |
Print full help page for all commands in this component