Option parser for SET command.
More...
|
| static const OptionDef * | FindOption (const std::string &name) |
| | Find a supported option definition by token.
|
| |
| static bool | ParseOptions (const std::vector< std::string > &tokens, std::vector< std::pair< OptionType, std::vector< std::string > > > &options) |
| | Parse SET command options from a token sequence.
|
| |
| static const OptionDef * | GetOptionDef (OptionType type) |
| | Get an option definition by OptionType.
|
| |
Option parser for SET command.
◆ FindOption()
| static const OptionDef * OptionParser::FindOption |
( |
const std::string & | name | ) |
|
|
inlinestatic |
Find a supported option definition by token.
- Parameters
-
| name | Token such as "-f", "--frequency", etc. |
- Returns
- Pointer to the matching definition, or nullptr if unknown.
◆ GetOptionDef()
Get an option definition by OptionType.
- Parameters
-
- Returns
- Pointer to the definition, or nullptr if not found.
◆ ParseOptions()
| static bool OptionParser::ParseOptions |
( |
const std::vector< std::string > & | tokens, |
|
|
std::vector< std::pair< OptionType, std::vector< std::string > > > & | options ) |
|
inlinestatic |
Parse SET command options from a token sequence.
Supports both flag-style (e.g. -f 0.5) and word-style (e.g. frequency 0.5) options. Multiple options may be specified.
- Parameters
-
| tokens | Tokens following the "set" verb. |
| options | Output vector of parsed options and their argument strings. |
- Returns
- true if parsing succeeded; false if tokens are malformed.
The documentation for this class was generated from the following file: