ADTF
Loading...
Searching...
No Matches
ddelement_ref.h
Go to the documentation of this file.
1
14
15#ifndef DDELEMREF_H_INCLUDED
16#define DDELEMREF_H_INCLUDED
17
18#include <ddl/dd/dd.h>
19#include <ddl/dd/dddatatype.h>
20#include <ddl/dd/ddenum.h>
21
22#include <string>
23
24namespace ddl {
25
27class DDStructure;
29
36public:
37
52 DDElementRef(const DDElementRef&) = delete;
70
77 DDElementRef& setDescription(const std::string& description);
78
85 DDElementRef& setComment(const std::string& comment);
93 DDElementRef& setMinMax(const std::string& minimum_value, const std::string& maximum_value);
94
103 DDElementRef& setValue(const std::string& value);
104
111 DDElementRef& setDefaultValue(const std::string& default_value);
112
120 DDElementRef& setScaleOffset(const std::string& scale, const std::string& offset);
121
134 DDElementRef& setValidElementCount(const std::string& valid_element_count);
135
144
153
165 const dd::DataDefinition& getDD() const;
166
167private:
168 friend class DDStructure;
169
171 std::shared_ptr<dd::StructType::Element> element);
172
173 // the data definition
174 dd::DataDefinition& _dd_ref;
175 // the element to add to the struct
176 std::shared_ptr<dd::StructType::Element> _element;
177};
178
179} // namespace ddl
180
181#endif // DDELEM_H_INCLUDED
DDElementRef(const DDElementRef &)=delete
Construct a new DDElement object.
const dd::DataDefinition & getDD() const
retrieves a valid DataDefinition for the elements datatypes and units.
DDElementRef()
Construct a new DDElement object.
DDElementRef & setMinMax(const std::string &minimum_value, const std::string &maximum_value)
Set additional element information to the given element_name.
DDElementRef & setDefaultValue(const std::string &default_value)
Set the default value information to the element.
DDElementRef & setComment(const std::string &comment)
Set additional element information to the given element_name.
~DDElementRef()
Destroy the DDElement object.
DDElementRef & setDescription(const std::string &description)
Set the description to the element.
DDElementRef & operator=(DDElementRef &&)
assignment move operator
DDElementRef(DDElementRef &&)
Construct a new DDElement object.
const dd::StructType::Element & getElement() const
Get the Element object.
DDElementRef & setValidElementCount(const std::string &valid_element_count)
Sets the 'valid_element_count' attribute to the element.
DDElementRef & setScaleOffset(const std::string &scale, const std::string &offset)
Set scale and offset information to the element.
DDElementRef & setUnit(const DDUnit &unit)
Sets additional unit information to the element. Any other unit information will be overwritten.
DDElementRef & setValue(const std::string &value)
Set the constant value information to the element.
DDElementRef & setUnit(const dd::BaseUnit &base_unit)
Sets additional unit information to the element. Any other unit information will be overwritten.
DDElementRef & operator=(const DDElementRef &)=delete
assignment copy operator
Utility class for a complete valid data definition of one StructType and its dependencies....
Definition ddstructure.h:57
The unit class holding a reference to its complete DD (references to baseunits and prefixes)
Definition ddunit.h:92
The Data Definiton class uses the validation model to keep a Data Definition datamodel (ddl::dd::data...
Definition dd.h:92
observable DataDefinition object class for a Element of a StructType.
Definition datamodel_types.h:736
datamodel::BaseUnit BaseUnit
Definition dd.h:39
definiton of the unit namespace
Definition dd_predefined_units.h:55
definition of the ddl namespace
Definition codec.h:21