Pseudo command class to add header like seperators in help descriptions.
More...
#include <CmdLine.hpp>
|
| | HeaderCmd (std::string const &header) |
| |
| | Cmd (std::string const &name, std::string const &help="No help for this command") |
| | Standard constructor. More...
|
| |
|
std::string | getName () const |
| | Get command name.
|
| |
| void | addArg (std::string const &name, std::string const &help="No help for this option") |
| | Add mandatory argument. Use this in constructors of custom Cmd classes. More...
|
| |
| void | addOptArg (std::string const &name, std::string const &help="No help for this option") |
| | Add optional argument. Use this in constructors of custom Cmd classes. More...
|
| |
|
int | getMinArgs () const |
| | Get min args.
|
| |
|
int | getMaxArgs () const |
| | Get max args.
|
| |
|
std::string | getSyntax () const |
| | Get syntax line: cmd arg1 arg2 [arg3].
|
| |
|
std::string | getHelp (bool showArgs=false) const |
| | Print help (i.e., syntax + documentation text).
|
| |
| bool | parse (std::string const &line) |
| | Parse a line. More...
|
| |
|
bool | isParsed () const |
| | Check if we are in "parsed" state.
|
| |
| std::string | getArg (int i) const |
| | Get the argument of a parsed command. More...
|
| |
|
int | run () |
| | Public run function. Use this to run commands.
|
| |
|
void | setCL (CmdLine *cl) |
| | Set Command Line Pointer; This must be run when adding commands from a CmdLine.
|
| |
Pseudo command class to add header like seperators in help descriptions.
- Examples:
- CmdLine.cpp.
| UI::Util::CmdLine::HeaderCmd::HeaderCmd |
( |
std::string const & |
header | ) |
|
- Parameters
-
| header | Text to show as header. |
The documentation for this class was generated from the following files: