senf::console::ParseCommandInfo Class Reference
[The parser]
Single parsed
console command.
More...
#include <senf/Utils/Console/Parse.hh>
List of all members.
Detailed Description
Single parsed
console command.
Every command parsed is returned in a ParseCommandInfo instance. This information is purely taken from the parser, no semantic information is attached at this point, the config/console node tree is not involved in any way. ParseCommandInfo consist of
- the type of command: built-in or normal command represented by a possibly relative path into the command tree.
- the command
- the arguments. Every argument consists of a range of Token instances.
Definition at line 349 of file Parse.hh.
Member Typedef Documentation
typedef boost::iterator_range<argument_iterator> senf::console::ParseCommandInfo:: |
ArgumentsRange |
|
|
|
|
|
typedef boost::iterator_range<path_iterator> senf::console::ParseCommandInfo:: |
CommandPathRange |
|
|
|
|
|
typedef CommandPath::const_iterator senf::console::ParseCommandInfo:: |
path_iterator |
|
|
|
|
|
typedef Tokens::size_type senf::console::ParseCommandInfo:: |
size_type |
|
|
|
|
|
typedef Tokens::const_iterator senf::console::ParseCommandInfo:: |
token_iterator |
|
|
|
|
|
typedef boost::iterator_range<token_iterator> senf::console::ParseCommandInfo:: |
TokensRange |
|
|
|
|
|
Member Enumeration Documentation
enum senf::console::ParseCommandInfo:: |
BuiltinCommand |
|
|
|
|
|
- Enumerator:
-
NoBuiltin |
|
BuiltinCD |
|
BuiltinLS |
|
BuiltinLL |
|
BuiltinLR |
|
BuiltinPUSHD |
|
BuiltinPOPD |
|
BuiltinEXIT |
|
BuiltinHELP |
|
Definition at line 366 of file Parse.hh.
Constructor & Destructor Documentation
senf::console::ParseCommandInfo:: |
ParseCommandInfo |
() |
|
|
|
|
Member Function Documentation
void senf::console::ParseCommandInfo:: |
addToken |
( |
Token const & |
token |
) |
|
Add argument token.
You must ensure, that the resulting argument tokens are properly nested regarding '()' groups, otherwise interpreting arguments using the arguments() call will crash the program.
Definition at line 208 of file Parse.cci.
Command arguments.
The returned range contains one TokensRange for each argument.
Definition at line 171 of file Parse.cci.
void senf::console::ParseCommandInfo:: |
builtin |
( |
BuiltinCommand |
builtin |
) |
|
Assign builtin command.
Definition at line 196 of file Parse.cci.
Command type.
- Returns:
-
NoBuiltin
, if the command is an ordinary command, otherwise the id of the built-in command
Definition at line 157 of file Parse.cci.
void senf::console::ParseCommandInfo:: |
clear |
() |
|
|
|
|
Clear all data members.
Definition at line 184 of file Parse.cci.
void senf::console::ParseCommandInfo:: |
command |
( |
std::vector< Token > & |
commandPath |
) |
|
Assign non-builtin command.
Definition at line 202 of file Parse.cci.
Command path.
This is the path to the command if it is not a built-in command. Every element of the returned range constitutes one path element. If the first element is empty, the path is an absolute path, otherwise it is relative. If the last element is an empty string, the path ends with a '/' char.
Definition at line 164 of file Parse.cci.
bool senf::console::ParseCommandInfo:: |
empty |
() |
|
|
|
|
true
, if the data is empty
Definition at line 191 of file Parse.cci.
All argument tokens.
The returned range contains all argument tokens in a single range not divided into separate arguments.
Definition at line 178 of file Parse.cci.
The documentation for this class was generated from the following files: