The PropertyBuilder class is an easy way to define a property with additional meta information. Multiple properties can be easily linked to an entire configuration using the "+" operator.
More...
#include <configuration.h>
|
| | PropertyBuilder (std::string name, T default_value) |
| | Sets a property with name and default value. Hierarchically grouped properties are created with the '/'.
|
| |
| PropertyBuilder & | setDescription (const std::string &description) |
| | Sets a description for the property.
|
| |
| PropertyBuilder & | setDisplayName (const std::string &display_name) |
| | Sets a display name for the property. Please note that '/' is used for hierarchical grouping of properties.
|
| |
| PropertyBuilder & | setValueList (const std::vector< std::pair< T, std::string > > &value_list, bool restrict_to_values) |
| | Sets a value list for the property.
|
| |
| PropertyBuilder & | setMinMax (const T &min, const T &max) |
| | Sets a minimum/maximum range for the property value.
|
| |
template<typename T = std::string>
class adtf_file::PropertyBuilder< T >
The PropertyBuilder class is an easy way to define a property with additional meta information. Multiple properties can be easily linked to an entire configuration using the "+" operator.
◆ PropertyBuilder()
template<typename T = std::string>
Sets a property with name and default value. Hierarchically grouped properties are created with the '/'.
- Parameters
-
| name | Name of the property. Please consider the naming convention: "lower_snake_case". |
| default_value | Default value of the property. |
◆ setDescription()
template<typename T = std::string>
Sets a description for the property.
- Parameters
-
- Returns
- Self-Reference.
◆ setDisplayName()
template<typename T = std::string>
Sets a display name for the property. Please note that '/' is used for hierarchical grouping of properties.
- Parameters
-
| display_name | Display name. |
- Returns
- Self-Reference.
◆ setMinMax()
template<typename T = std::string>
Sets a minimum/maximum range for the property value.
- Parameters
-
| min | Minimum limit. |
| max | Maximum limit. |
- Returns
- Self-Reference.
◆ setValueList()
template<typename T = std::string>
Sets a value list for the property.
- Parameters
-
| value_list | List of values with descriptiones. |
| restrict_to_values | true, only the values from the list are valid. false, the values from the list are only suggestions for reasonable values. |
- Returns
- Self-Reference.
The documentation for this class was generated from the following file: