DefaultValue
template <class Element, class ValueType> class DefaultValue
The DefaultValue class defines a default value for element.
Functions
| Name | Description |
|---|---|
| setElement | Set the element this DefaultValue refers to el : |
| defaultValue | The defaultValue method serves for setting up the default value to be used when User configuration does not specify another value. |
| defaultValueFromString | The defaultValueFromString method enables setting up a default value in a form of a string. |
| noDefaultValue | The noDefaultValue serves for setting up the element that does not have a default value. |
Function Details
defaultValue
Element& defaultValue(const ValueType& defaultValue)
The defaultValue method serves for setting up the default value to be used when User configuration does not specify another value.
val
: Default value
Return : reference to the Element for proper methods chaining
defaultValueFromString
Element& defaultValueFromString(const std::string& defaultValue)
The defaultValueFromString method enables setting up a default value in a form of a string. This may, for example, be convenient for vector elements.
defaultValue
: A string representation of the default value
Return : reference to the Element for proper methods chaining
noDefaultValue
Element& noDefaultValue()
The noDefaultValue serves for setting up the element that does not have a default value.
Return : reference to the Element for proper methods chaining
setElement
void setElement(Element* el)
Set the element this DefaultValue refers to
el
: