|
CLI
2.9
|
Command line parsing. More...
#include <command_line.h>

Public Member Functions | |
| CommandLine (void) | |
| Default constructor. More... | |
| virtual | ~CommandLine (void) |
| Destructor. More... | |
| const bool | Parse (const Menu &CLI_Menu, const tk::String &STR_Line, const bool B_Execution) |
| Parse and analysis invocation. More... | |
| const Element & | GetLastElement (void) const |
| Last element accessor. More... | |
| const char *const | GetLastWord (void) const |
| Last word (for completion). More... | |
| const int | GetNumBackspacesForCompletion (void) const |
| Number of backspaces for completion. More... | |
| const ResourceString & | GetLastError (void) const |
| Last error. More... | |
Public Member Functions inherited from Object | |
| virtual | ~Object (void)=0 |
| Pure virtual destructor. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Object | |
| Object (void) | |
| Default constructor only available to sub-classes. More... | |
Command line parsing.
Parses a command line in its string form, and returns the command line in its Element collection form after analysis.
Definition at line 52 of file command_line.h.
|
explicit |
Default constructor.
|
virtual |
Destructor.
| const Element& CommandLine::GetLastElement | ( | void | ) | const |
Last element accessor.
| const ResourceString& CommandLine::GetLastError | ( | void | ) | const |
Last error.
This resource is cleared on every parse.
| const char* const CommandLine::GetLastWord | ( | void | ) | const |
Last word (for completion).
When used for completion, this object does not analyse the last word and just stores it. This method retrieves this last word.
| const int CommandLine::GetNumBackspacesForCompletion | ( | void | ) | const |
Number of backspaces for completion.
Number of backspaces in order to erase the last word of the line.
| const bool CommandLine::Parse | ( | const Menu & | CLI_Menu, |
| const tk::String & | STR_Line, | ||
| const bool | B_Execution | ||
| ) |
Parse and analysis invocation.
If this method succeeds, the result is stored in the object itself, and can be accessed through the following public methods.
| CLI_Menu | Current menu. |
| STR_Line | Input command line in its string form. |
| B_Execution | Flag set when parsing is done for execution. Implicitely say completion otherwise. |