fastdo
0.5.12
|
命令行变量解析器 更多...
#include <system.hpp>
Public 成员函数 | |
CommandLineVars (int argc, char const **argv, Mixed const &desiredParams, Mixed const &desiredOptions, Mixed const &desiredFlags, Mixed const &optionSymbols="=,:") | |
构造函数 更多... | |
int | getParamsCount () const |
int | getOptionsCount () const |
int | getFlagsCount () const |
int | getValuesCount () const |
bool | hasParam (String const &name) const |
bool | hasOption (String const &name) const |
bool | hasFlag (String const &name) const |
bool | hasValue (String const &value) const |
Mixed const & | getParam (String const &name, Mixed const &defValue="") const |
Mixed const & | getOption (String const &name, Mixed const &defValue="") const |
Mixed const & | getFlag (int i) const |
Mixed const & | getValue (int i) const |
int | getParamIndexInArgv (String const &name) const |
int | getOptionIndexInArgv (String const &name) const |
int | getFlagIndexInArgv (String const &name) const |
int | getValueIndexInArgv (String const &value) const |
Mixed & | getParams () |
Mixed & | getOptions () |
Mixed & | getFlags () |
Mixed & | getValues () |
int | getArgc () const |
char const ** | getArgv () const |
命令行变量解析器
该解析器定义了四种变量
在文件 system.hpp 第 67 行定义.
winux::CommandLineVars::CommandLineVars | ( | int | argc, |
char const ** | argv, | ||
Mixed const & | desiredParams, | ||
Mixed const & | desiredOptions, | ||
Mixed const & | desiredFlags, | ||
Mixed const & | optionSymbols = "=,:" |
||
) |
构造函数
[in] | argc | 命令行参数个数,可由main()参数传入 |
[in] | argv | 命令行参数,可由main()参数传入 |
[in] | desiredParams | 要识别的参数名(逗号分割的String类型、或者Array类型) |
[in] | desiredOptions | 要识别的选项名(逗号分割的String类型、或者Array类型) |
[in] | desiredFlags | 要识别的旗标名(逗号分割的String类型、或者Array类型) |
[in] | optionSymbols | 选项赋值符号(逗号分割的String类型、或者Array类型)。默认是'='和':' |
|
inline |
在文件 system.hpp 第 111 行定义.
|
inline |
在文件 system.hpp 第 112 行定义.
|
inline |
在文件 system.hpp 第 98 行定义.
|
inline |
在文件 system.hpp 第 103 行定义.
|
inline |
在文件 system.hpp 第 108 行定义.
|
inline |
在文件 system.hpp 第 88 行定义.
|
inline |
在文件 system.hpp 第 97 行定义.
|
inline |
在文件 system.hpp 第 102 行定义.
|
inline |
在文件 system.hpp 第 107 行定义.
|
inline |
在文件 system.hpp 第 87 行定义.
|
inline |
在文件 system.hpp 第 96 行定义.
|
inline |
在文件 system.hpp 第 101 行定义.
|
inline |
在文件 system.hpp 第 106 行定义.
|
inline |
在文件 system.hpp 第 86 行定义.
|
inline |
在文件 system.hpp 第 99 行定义.
|
inline |
在文件 system.hpp 第 104 行定义.
|
inline |
在文件 system.hpp 第 109 行定义.
|
inline |
在文件 system.hpp 第 89 行定义.
|
inline |
在文件 system.hpp 第 93 行定义.
|
inline |
在文件 system.hpp 第 92 行定义.
|
inline |
在文件 system.hpp 第 91 行定义.
|
inline |
在文件 system.hpp 第 94 行定义.