|
| Property () |
| Construct a property holding a any value.
|
|
void | setValue (const boost::any &value) |
| set current value and default value
|
|
void | setCurrentValue (const boost::any &value) |
|
void | setDefaultValue (const boost::any &value) |
|
void | reset () |
| reset to default value (which can be empty)
|
|
bool | defined () const |
| the current value defined or will the fallback be used?
|
|
const boost::any & | value () const |
| get current value (or default if not defined)
|
|
boost::any & | value () |
|
const boost::any & | defaultValue () const |
| get default value
|
|
std::string | serialize () const |
|
const std::string & | description () const |
| get description text
|
|
void | setDescription (const std::string &desc) |
|
std::string | typeName () const |
|
bool | initsFrom (SourceFlags source) const |
| return true, if property initialized from given SourceId
|
|
Property & | configureInitFrom (SourceFlags source, const InitializerFunction &f) |
| configure initialization from source using an arbitrary function
|
|
Property & | configureInitFrom (SourceFlags source, const std::string &name) |
| configure initialization from source using given other property name
|
|
Property is a wrapper for a boost::any value, also providing a default value and a description.
Properties can be configured to be initialized from another PropertyMap - if still undefined. A source id allows to distinguish different initialization methods (e.g. using a different reference name) as well as to define a priority order between sources.
Setting the value via setValue() updates both, the current value and the default value. Using reset() the default value can be restored. setCurrentValue() and setDefaultValue() only set the specific value.