Public Member Functions | Private Attributes
icl_core::config::ConfigParameter Class Reference

#include <ConfigParameter.h>

Inheritance diagram for icl_core::config::ConfigParameter:
Inheritance graph

List of all members.

Public Member Functions

icl_core::String configKey () const
 ConfigParameter (const icl_core::String &option, const icl_core::String &short_option, const icl_core::String &config_key, const icl_core::String &help, 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

Detailed Description

Contains information about how to handle a specific commandline parameter and how to map it into a configuration parameter.

For key/value parameters the option value is stored in the specified config key. For presence parameters (without a value) the value "yes" is stored in the config key if the option is present on the commandline; otherweise the value "no" is stored in the config key.

Definition at line 49 of file ConfigParameter.h.

Constructor & Destructor Documentation

icl_core::config::ConfigParameter::ConfigParameter ( const icl_core::String option,
const icl_core::String short_option,
const icl_core::String config_key,
const icl_core::String help,
const icl_core::String default_value = "" 

Create a new config parameter.

optionThe long option name of this parameter. If option ends with a colon (":") then the parameter also expects a value.
short_optionThe short option name of this parameter. If this is set to the empty string then no short option is used.
config_keyThe configuration key in which the option value should be stored.
helpThe help text for this parameter.
default_valueThe default value to be set, if it has neither been set in the config file and on the commandline.

See GetoptParameter for details about the syntax of the option parameter.

Definition at line 27 of file ConfigParameter.cpp.

Member Function Documentation

Get the configuration key in which the option should be stored.

Definition at line 76 of file ConfigParameter.h.

Get the default value of the configuration parameter.

Definition at line 84 of file ConfigParameter.h.

Check if a default value has been set.

Definition at line 80 of file ConfigParameter.h.

Member Data Documentation

Definition at line 111 of file ConfigParameter.h.

Definition at line 112 of file ConfigParameter.h.

The documentation for this class was generated from the following files:

autogenerated on Tue Aug 8 2017 02:28:05