#include <ConfigPositionalParameter.h>
Public Member Functions | |
icl_core::String | configKey () const |
ConfigPositionalParameter (const icl_core::String &name, const icl_core::String &config_key, const icl_core::String &help, const bool is_optional=false, const icl_core::String &default_value="") | |
icl_core::String | defaultValue () const |
bool | hasDefaultValue () const |
Private Attributes | |
icl_core::String | m_config_key |
icl_core::String | m_default_value |
Contains information about how to handle a specific positional commandline parameter and how to map it into a configuration parameter.
The option value is stored in the specified config key.
Definition at line 46 of file ConfigPositionalParameter.h.
icl_core::config::ConfigPositionalParameter::ConfigPositionalParameter | ( | const icl_core::String & | name, |
const icl_core::String & | config_key, | ||
const icl_core::String & | help, | ||
const bool | is_optional = false , |
||
const icl_core::String & | default_value = "" |
||
) |
Create a new config postional parameter.
name | The name of the parameter. |
config_key | The configuration key in which the option value should be stored. |
help | A help text that will be used in the generic help. |
is_optional | Iff the parameter is an optional parameter. |
default_value | The default value to be set, if it has neither been set in the config file and on the commandline. |
Definition at line 28 of file ConfigPositionalParameter.cpp.
icl_core::String icl_core::config::ConfigPositionalParameter::configKey | ( | ) | const [inline] |
Get the configuration key in which the option should be stored.
Definition at line 70 of file ConfigPositionalParameter.h.
icl_core::String icl_core::config::ConfigPositionalParameter::defaultValue | ( | ) | const [inline] |
Get the default value of the configuration parameter.
Definition at line 78 of file ConfigPositionalParameter.h.
bool icl_core::config::ConfigPositionalParameter::hasDefaultValue | ( | ) | const [inline] |
Check if a default value has been set.
Definition at line 74 of file ConfigPositionalParameter.h.
Definition at line 81 of file ConfigPositionalParameter.h.
Definition at line 82 of file ConfigPositionalParameter.h.