GenericElement
template <class Derived> class GenericElement
The GenericElement class is a base class for various element types: simple, vector, choice, list and single.
Functions
| Name | Description |
|---|---|
| key | The key method serves for setting up a unique name for the element. |
| alias | The alias method serves for setting up just another name for the element. |
| tags | The tags method allows to tag some expected parameters for later grouping/sorting tags : a vector of strings Return : reference to the Element (to allow method's chaining) |
| tags | The tags/b> method allows to tag some expected parameters for later grouping/sorting tags : as a string separated by any of the characters in 'sep' sep : a string interpreted as a list of separator characters Return : reference to the Element (to allow method's chaining) |
| displayedName | The displayedName method serves for setting up an user friendly name for the element to be used by GUI name : User friendly name for the element Return : reference to the Element (to allow method's chaining) Example: SOME_ELEMENT(expected) ... .displayedName("Connection Type") ... .commit(); |
| description | The description method serves for setting up a description of the element desc : Short description of the element Return : reference to the Element (to allow method's chaining) Example: SOME_ELEMENT(expected) ... .description("Decide whether the connection is used to implement a TCP Server or TCP Client") ... .commit(); |
| observerAccess | The observerAccess method serves for setting up the required access level attribute to be OBSERVER. |
| operatorAccess | The operatorAccess method serves for setting up the required access level attribute to be OPERATOR. |
| expertAccess | The expertAccess method serves for setting up the required access level attribute to be EXPERT. |
| overwriteRestrictions | The overWriteRestrictions allows for setting restrictions to overwrite element. |
| setSpecialDisplayType | The setSpecialDisplayType allows for setting modification of the displayType of the element This attribute is a string and contains a hint to graphical user interfaces that a display mode is possible. |
| commit | The commit method injects the element to the expected parameters list. |
Function Details
alias
template <class AliasType> Derived& alias(const AliasType& alias)
The alias method serves for setting up just another name for the element. Note: this another name may not be necessarily a string. Just any type!
alias
: Another name for this element
Return : reference to the Element (to allow method's chaining)
commit
virtual void commit()
The commit method injects the element to the expected parameters list. If not called the element is not usable. This must be called after the element is fully defined.
description
Derived& description(const std::string& description)
The description method serves for setting up a description of the element
desc
: Short description of the element
Return : reference to the Element (to allow method's chaining)
Example:
SOME_ELEMENT(expected)
...
.description("Decide whether the connection is used to implement a TCP Server or TCP Client")
...
.commit();
displayedName
Derived& displayedName(const std::string& name)
The displayedName method serves for setting up an user friendly name for the element to be used by GUI
name
: User friendly name for the element
Return : reference to the Element (to allow method's chaining)
Example:
SOME_ELEMENT(expected)
...
.displayedName("Connection Type")
...
.commit();
expertAccess
Derived& expertAccess()
The expertAccess method serves for setting up the required access level attribute to be EXPERT.
Return : reference to the Element (to allow method's chaining)
key
virtual Derived& key(const std::string& name)
The key method serves for setting up a unique name for the element.
name
: Unique name for the key - can be a nested path if all but its last sub-key are
added as node elements before. Must not be an empty string.
Return : reference to the Element (to allow method's chaining)
Example:
SOME_ELEMENT(expected)
.key("type")
...
.commit();
observerAccess
Derived& observerAccess()
The observerAccess method serves for setting up the required access level attribute to be OBSERVER.
Return : reference to the Element (to allow method's chaining)
operatorAccess
Derived& operatorAccess()
The operatorAccess method serves for setting up the required access level attribute to be OPERATOR.
Return : reference to the Element (to allow method's chaining)
overwriteRestrictions
Derived& overwriteRestrictions(OverwriteElement::Restrictions& restrictions)
The overWriteRestrictions allows for setting restrictions to overwrite element. Any attributes specified here cannot be altered through use of overwrite element.
After execution restrictions contains the new applicable restrictions, e.g. those resulting from merging with previously existing restrictions. This means, one can add restrictions but not cancel existing ones.
setSpecialDisplayType
Derived& setSpecialDisplayType(const std::string& displaytype)
The setSpecialDisplayType allows for setting modification of the displayType of the element
This attribute is a string and contains a hint to graphical user interfaces that a display mode is possible.
displayType
:
Return : reference to the Element (to allow method's chaining)
tags
Derived& tags(const std::vector<std::string>& tags)
The tags method allows to tag some expected parameters for later grouping/sorting
tags
: a vector of strings
Return : reference to the Element (to allow method's chaining)
Derived& tags(const std::string& tags, const std::string& sep = " ,;")
The tags/b> method allows to tag some expected parameters for later grouping/sorting
tags
: as a string separated by any of the characters in 'sep'
sep
: a string interpreted as a list of separator characters
Return : reference to the Element (to allow method's chaining)