![]() |
appkit
1.5.1
RoadNarrows Robotics Application Kit
|
Commands. More...
Namespaces | |
| addons | |
| Add-Ons. | |
Classes | |
| class | CmdArgDef |
| Command argument compiled definition class. More... | |
| class | CmdDef |
| Compiled command definition class. More... | |
| struct | CmdDesc |
| User available command description structure. More... | |
| struct | CmdExec |
| Helper class to hold a command line execution function. More... | |
| class | CmdExtArg |
| Command EXTended ARGument class holding parsed command context and the raw and converted argmument values. More... | |
| class | CmdFormDef |
| Compiled command form defintion class. More... | |
| class | CommandLine |
| CommandLine class. More... | |
| class | DataSect |
| Command line interface data section class. More... | |
| struct | DataSectCore |
| Core data section type. More... | |
| struct | NameValuePair |
| Handy Dandy Name-Value Pair entry structure. More... | |
| class | ReadLine |
| ReadLine class provides a C++ wrapper around the readline C library. More... | |
| class | Token |
| Parsed token container class. More... | |
Typedefs | |
| typedef std::vector< CmdArgDef > | ArgDefVec |
| vector of argument defs | |
| typedef std::vector< CmdExtArg > | CmdExtArgVec |
| vector of ext args type | |
| typedef std::vector< CmdFormDef > | CmdFormDefVec |
| vector of command forms | |
| typedef int(* | CmdExec1Func) (const str::StringVec &argv) |
| Command execution function type, variant 1. More... | |
| typedef int(* | CmdExec2Func) (const CmdExtArgVec &argv) |
| Command execution function type, variant 2. More... | |
| typedef int(* | CmdExec3Func) (CommandLine &cli, const CmdExtArgVec &argv) |
| Command execution function type, variant 3. More... | |
| typedef std::map< unsigned, CmdDef > | CmdDefMap |
| command map type | |
| typedef CmdDefMap::iterator | CmdDefIter |
| cmd iterator type | |
| typedef CmdDefMap::const_iterator | CmdDefCIter |
| cmd const iter type | |
| typedef std::map< unsigned, CmdExec > | CmdExecMap |
| exec map type | |
| typedef CmdExecMap::iterator | CmdExecIter |
| exec iterator type | |
| typedef CmdExecMap::const_iterator | CmdExecCIter |
| exec const iter type | |
| typedef std::map< std::string, DataSect > | DataSectMap |
| section map type | |
| typedef DataSectMap::iterator | DataSectIter |
| iterator type | |
| typedef DataSectMap::const_iterator | DataSectCIter |
| const iter type | |
| typedef str::StringVec | PromptStack |
| prompt stack type | |
| typedef std::vector< Token > | TokenVec |
| vector of tokens type | |
Functions | |
| bool | isIdentifier (const std::string &str) |
| Test if string is a valid identifier. More... | |
| const string | undefstring ("undef") |
| empty string | |
| bool | isIdentifier (const string &str) |
| static bool | isspecial (int c) |
| Command usage syntax special characters. More... | |
| static bool | isdquote (int c) |
| Test if c is a double quote character. | |
| static bool | isoparen (int c) |
| Test if c is a open parenthesis character. | |
| static bool | iscparen (int c) |
| Test if c is a close parenthesis character. | |
| static bool | isesc (int c) |
| Testif c is an escape character. | |
| static char | tohex (int c) |
| Convert ascii character to binary character value. More... | |
Variables | |
| const int | AOk = OK |
| (0) A-Ok, no error, success, good | |
| const int | EError = -1 |
| general, unspecified error | |
| const int | EEoF = -2 |
| end of file | |
| const int | ERead = -3 |
| read error | |
| const int | EAmbigCmd = -4 |
| ambiguous command | |
| const int | EUnknownCmd = -5 |
| unknown, unmatched command | |
| const int | EBadSyntax = -6 |
| bad syntax | |
| const int | ENoExec = -7 |
| cannot execute | |
| const int | EArgv0 = -8 |
| not this command argv0 | |
| const int | ENoOp = -9 |
| no operation | |
| const int | EBadVal = -10 |
| bad value | |
| const int | NumOfECodes = 10 |
| number of error codes. | |
| const int | NoUid = -1 |
| Special values. More... | |
| const int | NoIndex = -1 |
| no index | |
| const char *const | ArgSymLiteral = "literal" |
| Variable argument symbol names. More... | |
| const char *const | ArgSymWord = "word" |
| non-whitespace seq | |
| const char *const | ArgSymMultiWord = "multiword" |
| any sequence | |
| const char *const | ArgSymIdentifier = "identifier" |
| identifier | |
| const char *const | ArgSymBoolean = "bool" |
| boolean (bool) | |
| const char *const | ArgSymInteger = "int" |
| integer (long) | |
| const char *const | ArgSymFpn = "fpn" |
| fpn (double) | |
| const char *const | ArgSymFile = "file" |
| file path | |
| const char *const | ArgSymRegEx = "re" |
| regular expression | |
| const std::string | emptystring |
| "" empty string More... | |
| const std::string | undefstring |
| "undef" string | |
| const char *const | DataSectNsCore = "core" |
| Reserved command line data section namespaces. More... | |
| const char *const | DataSectNsOS = "os" |
| OS data section ns. | |
| const char *const | DataSectNsNet = "net" |
| network data section ns | |
| static const char * | RlTabEnd = "" |
| no more matches value (empty string) | |
| static const string | noliteral |
| no literal string | |
| static NameValuePair | ArgTypeLookupTbl [] |
| Argument type - string symbol lookup table. More... | |
| static NameValuePair | ArgFlagLookupTbl [] |
| Argument flag modifiers - name lookup table. More... | |
| static CmdFormDef | noformdef |
| constant "no form def" form definition | |
| static CmdArgDef | noargdef |
| constant "no arg def" argument definition | |
| static CmdDef | nocmddef |
| "no cmd def" command definition | |
| static const string | noprompt |
| "no prompt" prompt value | |
Commands.
| typedef int(* rnr::cmd::CmdExec1Func) (const str::StringVec &argv) |
Command execution function type, variant 1.
With this variant, a vector of command line strings argument are provided to the function.
The arguments have been validated against the associated extended syntax.
This function type is provided as a convenience for application development. It is external to the core CommandLine functionality.
| [in] | argv | Vector of string arguments produced from a successful return from the relevant readCommand() call. The argv[0] argument is the command name. |
Definition at line 119 of file CommandLine.h.
| typedef int(* rnr::cmd::CmdExec2Func) (const CmdExtArgVec &argv) |
Command execution function type, variant 2.
With this variant, a vector of command line extended arguments are provided to the function. Each extended argument provide matched command context. Moreover, each argument has been converted to its basic type.
The arguments have been validated against the associated extended syntax.
This function type is provided as a convenience for application development. It is external to the core CommandLine functionality.
| [in] | argv | Vector of extended arguments produced from a successful return from the relevant readCommand() call. The argv[0] argument is the command name. |
Definition at line 139 of file CommandLine.h.
| typedef int(* rnr::cmd::CmdExec3Func) (CommandLine &cli, const CmdExtArgVec &argv) |
Command execution function type, variant 3.
This is identical to variant 2, but with the additional parameter referencing the common-line interface specification.
| [in] | cli | Command-line interface. |
| [in] | argv | Vector of extended arguments produced from a successful return from the relevant readCommand() call. The argv[0] argument is the command name. |
Definition at line 154 of file CommandLine.h.
| bool rnr::cmd::isIdentifier | ( | const std::string & | str | ) |
Test if string is a valid identifier.
Identifiers adhere to the C syntax.
| [in] | str | String to test. |
Referenced by rnr::cmd::DataSectCore::dealloc(), rnr::cmd::CmdArgDef::match(), and rnr::cmd::CommandLine::tokIdentifier().
|
inlinestatic |
Command usage syntax special characters.
| c | Character to test. |
Definition at line 190 of file CommandLine.cxx.
Referenced by rnr::cmd::CommandLine::lexSyntaxWord(), and rnr::cmd::CommandLine::tokenizeSyntax().
|
static |
Convert ascii character to binary character value.
| c | ASCII character. |
Definition at line 237 of file CommandLine.cxx.
Referenced by rnr::cmd::CommandLine::lexQuotedString().
|
static |
Argument flag modifiers - name lookup table.
Definition at line 117 of file CmdArgDef.cxx.
Referenced by rnr::cmd::CmdArgDef::lookupFlagNames().
| const char* const rnr::cmd::ArgSymLiteral = "literal" |
|
static |
Argument type - string symbol lookup table.
Definition at line 100 of file CmdArgDef.cxx.
Referenced by rnr::cmd::CmdArgDef::lookupArgSymbol(), and rnr::cmd::CmdArgDef::lookupArgType().
| const char* const rnr::cmd::DataSectNsCore = "core" |
Reserved command line data section namespaces.
core data section ns
Definition at line 141 of file CmdCore.h.
Referenced by rnr::cmd::CommandLine::CommandLine(), rnr::cmd::CommandLine::getBtEnable(), rnr::cmd::CommandLine::isReservedDataSection(), rnr::cmd::CommandLine::ok(), rnr::cmd::CommandLine::quit(), and rnr::cmd::CommandLine::setBtEnable().
| const string rnr::cmd::emptystring |
"" empty string
empty string
Definition at line 82 of file CmdCore.cxx.
Referenced by rnr::cmd::CommandLine::rlGeneratorWrapper().
| const int rnr::cmd::NoUid = -1 |
Special values.
no unique id
Definition at line 116 of file CmdCore.h.
Referenced by rnr::cmd::CommandLine::addCommand(), rnr::cmd::CmdArgDef::CmdArgDef(), rnr::cmd::CmdDef::CmdDef(), rnr::cmd::CmdExec::CmdExec(), rnr::cmd::CmdExtArg::CmdExtArg(), rnr::cmd::CmdFormDef::CmdFormDef(), rnr::cmd::addons::execHelp(), execTAdd(), execTDump(), execTRemove(), rnr::cmd::CommandLine::execute(), loadCommands(), rnr::cmd::CommandLine::match(), rnr::cmd::CommandLine::readCommand(), and rnr::cmd::CommandLine::removeCommand().