ADTF
|
Utility class for a complete valid data definition of one StructType::Element and its dependencies. More...
Public Member Functions | |
DDElementRef () | |
Construct a new DDElement object. | |
DDElementRef (DDElementRef &&) | |
Construct a new DDElement object. | |
DDElementRef (const DDElementRef &)=delete | |
Construct a new DDElement object. | |
DDElementRef & | operator= (DDElementRef &&) |
assignment move operator More... | |
DDElementRef & | operator= (const DDElementRef &)=delete |
assignment copy operator More... | |
~DDElementRef () | |
Destroy the DDElement object. | |
DDElementRef & | setDescription (const std::string &description) |
Set the description to the element. More... | |
DDElementRef & | setComment (const std::string &comment) |
Set additional element information to the given element_name . More... | |
DDElementRef & | setMinMax (const std::string &minimum_value, const std::string &maximum_value) |
Set additional element information to the given element_name . More... | |
DDElementRef & | setValue (const std::string &value) |
Set the constant value information to the element. More... | |
DDElementRef & | setDefaultValue (const std::string &default_value) |
Set the default value information to the element. More... | |
DDElementRef & | setScaleOffset (const std::string &scale, const std::string &offset) |
Set scale and offset information to the element. More... | |
DDElementRef & | setValidElementCount (const std::string &valid_element_count) |
Sets the 'valid_element_count' attribute to the element. More... | |
DDElementRef & | setUnit (const DDUnit &unit) |
Sets additional unit information to the element. More... | |
DDElementRef & | setUnit (const dd::BaseUnit &base_unit) |
Sets additional unit information to the element. More... | |
const dd::StructType::Element & | getElement () const |
Get the Element object. More... | |
const dd::DataDefinition & | getDD () const |
retrieves a valid DataDefinition for the elements datatypes and units. More... | |
Private Member Functions | |
DDElementRef (dd::DataDefinition &dd_ref, std::shared_ptr< dd::StructType::Element > element) | |
Private Attributes | |
dd::DataDefinition & | _dd_ref |
std::shared_ptr< dd::StructType::Element > | _element |
Utility class for a complete valid data definition of one StructType::Element and its dependencies.
This class is for convenience to use it together with ddl::DDStructure .
Definition at line 35 of file ddelement_ref.h.
const dd::DataDefinition& getDD | ( | ) | const |
retrieves a valid DataDefinition for the elements datatypes and units.
const dd::StructType::Element& getElement | ( | ) | const |
Get the Element object.
|
delete |
assignment copy operator
DDElementRef& operator= | ( | DDElementRef && | ) |
assignment move operator
DDElementRef& setComment | ( | const std::string & | comment | ) |
Set additional element information to the given element_name
.
comment | The comment |
DDElementRef& setDefaultValue | ( | const std::string & | default_value | ) |
Set the default value information to the element.
default_value | The default value |
DDElementRef& setDescription | ( | const std::string & | description | ) |
Set the description to the element.
description | The description |
DDElementRef& setMinMax | ( | const std::string & | minimum_value, |
const std::string & | maximum_value | ||
) |
Set additional element information to the given element_name
.
minimum_value | The minimum value |
maximum_value | The maximum value |
DDElementRef& setScaleOffset | ( | const std::string & | scale, |
const std::string & | offset | ||
) |
Set scale and offset information to the element.
scale | The scale |
offset | The offset |
DDElementRef& setUnit | ( | const dd::BaseUnit & | base_unit | ) |
Sets additional unit information to the element.
Any other unit information will be overwritten.
base_unit | The unit to set |
DDElementRef& setUnit | ( | const DDUnit & | unit | ) |
Sets additional unit information to the element.
Any other unit information will be overwritten.
unit | The unit to set |
DDElementRef& setValidElementCount | ( | const std::string & | valid_element_count | ) |
Sets the 'valid_element_count' attribute to the element.
valid_element_count | The valid_element_count name. |
valid_element_count
must be a sibling element within the same structure. You may use the 'valid_element_count' to mark a subset of the array as valid and the other part as invalid. Use this for a virtual dynamic array and take advantage of the performance of the static array support with dynamic content. dd::Error | if element invalidates (i.e. valid_element_count is not a valid sibling element name) |
DDElementRef& setValue | ( | const std::string & | value | ) |
Set the constant value information to the element.
value | The value |
dd::Error | if element invalidates (i.e. the constant value is not part of the type) |