#include <option_parser.h>
List of all members.
Public Member Functions |
int | parse (int n, char *items[]) |
bool | get_value (const std::string &name, std::string &value) |
void | output_params () |
const std::vector< const char * > & | get_args () const |
Detailed Description
Option Parser: Parse an array of strings. It only consumes pairs of a parameter type and a parameter value. A parameter type begins with '-' symbol and its corresponding parameter value is the next string.
Member Function Documentation
const std::vector<const char*>& NER::OPTION_PARSER::get_args |
( |
| ) |
const [inline] |
Get parameters as an array (not including option parameters)
- Returns:
- Array of parameters
bool NER::OPTION_PARSER::get_value |
( |
const std::string & |
name, |
|
|
std::string & |
value |
|
) |
| [inline] |
Get the value of a given parameter name
- Parameters:
-
[in] | name | Name of parameter |
[out] | value | Value for the parameter if found |
- Returns:
- true if parameter found
void NER::OPTION_PARSER::output_params |
( |
| ) |
[inline] |
Output parameters to std::cout
int NER::OPTION_PARSER::parse |
( |
int |
n, |
|
|
char * |
items[] |
|
) |
| [inline] |
Parse input parameters
- Parameters:
-
[in] | n | Number of arguments |
[in] | items | Array of arguments |
- Returns:
- Count of parameters parsed
The documentation for this class was generated from the following file: