#include <utilmm/configfile/commandline.hh>
Each option description is parsed and transformed in a cmdline_option object. The command_line code then uses these objects
◆ ArgumentType
Argument types Each option may have zero or one option the option is described using a or-ed int of this enum
| Enumerator |
|---|
| None | |
| Optional | no arguments
|
| IntArgument | the argument may be ommitted
|
| BoolArgument | the argument is an integer
|
| StringArgument | the argument is a boolean, that is 0, 1, 'false' or 'true'
|
| DefaultValue | the argument is a string
|
◆ cmdline_option()
| utilmm::cmdline_option::cmdline_option |
( |
const std::string & |
description | ) |
|
Builds an option using the option description syntax as in command_line
- option the option description, see the command_line for its syntax If
option is not a valid description string, the constructor returns and isValid() will return false
◆ ~cmdline_option()
| utilmm::cmdline_option::~cmdline_option |
( |
| ) |
|
◆ checkArgument()
| bool utilmm::cmdline_option::checkArgument |
( |
const std::string & |
value | ) |
const |
Checks that value is a valid string according to the argument type (int, bool or string)
◆ getArgumentFlags()
| int utilmm::cmdline_option::getArgumentFlags |
( |
| ) |
const |
◆ getConfigKey()
| std::string utilmm::cmdline_option::getConfigKey |
( |
| ) |
const |
◆ getDefaultValue()
| std::string utilmm::cmdline_option::getDefaultValue |
( |
| ) |
const |
◆ getHelp()
| std::string utilmm::cmdline_option::getHelp |
( |
| ) |
const |
◆ getLong()
| std::string utilmm::cmdline_option::getLong |
( |
| ) |
const |
◆ getShort()
| std::string utilmm::cmdline_option::getShort |
( |
| ) |
const |
◆ hasArgument()
| bool utilmm::cmdline_option::hasArgument |
( |
| ) |
const |
◆ hasDefaultValue()
| bool utilmm::cmdline_option::hasDefaultValue |
( |
| ) |
const |
◆ isArgumentOptional()
| bool utilmm::cmdline_option::isArgumentOptional |
( |
| ) |
const |
◆ isMultiple()
| bool utilmm::cmdline_option::isMultiple |
( |
| ) |
const |
◆ isRequired()
| bool utilmm::cmdline_option::isRequired |
( |
| ) |
const |
The documentation for this class was generated from the following file: