ADTF
3.14.3
|
A CodecElement to get and set values. More...
Public Types | |
typedef FactoryElement< ElementAccessType, ChildElementsType > | factory_base_type |
used base type. | |
typedef DecoderElement< ElementAccessType, ChildElementsType > | base_type |
used base type. | |
typedef CodecElement< ElementAccessType, ChildElementsType > | self_type |
used self type | |
typedef ElementAccessType::access_type | access_type |
The access type from concept. | |
typedef factory_base_type::child_elements_type | child_elements_type |
allowed container type. | |
typedef child_elements_type::iterator | iterator_type |
allowed iterator type. | |
typedef child_elements_type::const_iterator | const_iterator_type |
allowed const iterator type. | |
![]() | |
typedef FactoryElement< ElementAccessType, ChildElements< ElementAccessType > > | base_type |
Used base type. | |
typedef DecoderElement< ElementAccessType, ChildElements< ElementAccessType > > | self_type |
Used self type. | |
typedef ElementAccessType::access_type | access_type |
Used access type from concept template. | |
typedef base_type::child_elements_type | child_elements_type |
allowed container type. | |
typedef child_elements_type::iterator | iterator_type |
allowed iterator type. | |
typedef child_elements_type::const_iterator | const_iterator_type |
allowed const iterator type. | |
![]() | |
typedef FactoryElement< ElementAccessType, ChildElementsType > | self_type |
Used self_type. | |
typedef ElementAccessType::access_type | access_type |
Used access_type. | |
typedef ChildElementsType | child_elements_type |
The allowed container type. | |
typedef child_elements_type::iterator | iterator_type |
The allowed iterator type. | |
typedef child_elements_type::const_iterator | const_iterator_type |
The allowed const iterator type. | |
Public Member Functions | |
CodecElement ()=delete | |
CTOR. | |
CodecElement (CodecElement &&)=default | |
move CTOR | |
CodecElement & | operator= (CodecElement &&)=default |
move operator More... | |
CodecElement (const CodecElement &)=default | |
copy CTOR | |
CodecElement & | operator= (const CodecElement &)=default |
copy operator More... | |
~CodecElement ()=default | |
DTOR. | |
template<typename T > | |
void | setValue (const T &value) |
Sets the value from value of type T . More... | |
void | setVariantValue (const a_util::variant::Variant &value) |
Sets the value from value as variant. More... | |
void | setStringValue (const std::string &value) |
Sets the value from value as string. More... | |
void | setRawValue (const void *value, size_t value_size) |
Set the value by copying from a value buffer. More... | |
void | reset (bool zero_value=false) |
Reset the elements value to their default values, constant values defined in the data definition or zero if zero_value is set. More... | |
void * | getAddress () |
Get the address (with writing access) More... | |
child_elements_type & | getChildElements () |
self_type | getChildElement (const std::string &name) const |
Get the child element with the given name. More... | |
self_type | getChildElement (const std::string &name) |
Get the child element with the given name. More... | |
self_type | getArrayElement (size_t array_pos=0) const |
Get the array element of the given array_pos . More... | |
self_type | getArrayElement (size_t array_pos=0) |
Get the array element of the given array_pos . More... | |
const void * | getAddress () const |
Get the address of the element. More... | |
const child_elements_type & | getChildElements () const |
Get the ChildElements. More... | |
![]() | |
DecoderElement ()=delete | |
CTOR. | |
DecoderElement (DecoderElement &&)=default | |
move CTOR | |
DecoderElement (const DecoderElement &)=default | |
copy CTOR | |
DecoderElement & | operator= (DecoderElement &&)=default |
move operator More... | |
DecoderElement & | operator= (const DecoderElement &)=default |
copy operator More... | |
~DecoderElement ()=default | |
DTOR. | |
T | getValue () const |
Get the value as type T. More... | |
a_util::variant::Variant | getVariantValue () const |
Get the value as variant. More... | |
std::string | getStringValue () const |
Get the value as string. More... | |
void | getRawValue (void *value, size_t value_size) const |
Get the as copy to the valu buffer. More... | |
const void * | getAddress () const |
Get the address of the element. More... | |
self_type | getChildElement (const std::string &name) const |
Get the child element with the given name. More... | |
self_type | getArrayElement (size_t array_pos=0) const |
Get the array element of the given array_pos . More... | |
![]() | |
FactoryElement ()=delete | |
no CTOR | |
FactoryElement (FactoryElement &&other) | |
move CTOR | |
FactoryElement & | operator= (FactoryElement &&other) |
copy operator More... | |
FactoryElement (const FactoryElement &other) | |
copy CTOR | |
FactoryElement & | operator= (const FactoryElement &other) |
move operator More... | |
~FactoryElement ()=default | |
DTOR. | |
const CodecIndex & | getIndex () const |
Get the codec index of the element. More... | |
size_t | getArraySize () const |
Get the array size. More... | |
ddl::codec::ElementType | getType () const |
Get the type of the element. More... | |
std::string | getFullName () const |
Get the full name of the element. More... | |
std::string | getName () const |
Get the name of the element If the element is an array you get the elements array name respresentation: "element_name[0]" or element_name[1] ... More... | |
std::string | getBaseName () const |
Get the base name of the element. More... | |
bool | isArray () const |
Get array information. More... | |
bool | hasChildren () const |
Get children information. More... | |
const child_elements_type & | getChildElements () const |
Get the ChildElements. More... | |
self_type | getChildElement (const std::string &name) const |
Get the child element with the given name. More... | |
self_type | getArrayElement (size_t array_pos=0) const |
Get the array element of the given array_pos . More... | |
bool | isValid () const |
Get validation indormation. More... | |
Public Attributes | |
friend | child_elements_type |
friend | iterator_type |
friend | const_iterator_type |
friend | access_type |
friend | base_type |
friend | factory_base_type |
![]() | |
friend | base_type |
friend | access_type |
friend | child_elements_type |
friend | iterator_type |
friend | const_iterator_type |
friend | CodecElement< ElementAccessType, ChildElementsType > |
![]() | |
friend | child_elements_type |
friend | iterator_type |
friend | const_iterator_type |
friend | access_type |
friend | DecoderElement< ElementAccessType, ChildElementsType > |
friend | CodecElement< ElementAccessType, ChildElementsType > |
Private Member Functions | |
CodecElement (CodecIndex &&index, size_t end_element_index, size_t child_elements_count, access_type &access) | |
CodecElement (CodecIndex &&index, size_t end_element_index, access_type &access) | |
CodecElement (const std::string &element_name, access_type &access) | |
CodecElement (CodecIndex &&index, access_type &access) | |
CodecElement (access_type &access) | |
void | next () |
A CodecElement to get and set values.
ElementAccessType | The element access concept type. (see concept templates CodecElementAccess) |
Definition at line 1241 of file codec_iterator.h.
|
inline |
Get the address (with writing access)
Definition at line 1386 of file codec_iterator.h.
References FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getIndex().
|
inline |
Get the address of the element.
Definition at line 1075 of file codec_iterator.h.
|
inline |
Get the array element of the given array_pos
.
array_pos | The array pos of the element to retrieve |
Definition at line 1436 of file codec_iterator.h.
References FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getIndex().
|
inline |
Get the array element of the given array_pos
.
array_pos | The array pos of the element to retrieve |
Definition at line 1426 of file codec_iterator.h.
References FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getIndex().
|
inline |
Get the child element with the given name.
name | Name of the child element. |
Definition at line 1414 of file codec_iterator.h.
References FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getFullName().
|
inline |
Get the child element with the given name.
name | Name of the child element. |
Definition at line 1401 of file codec_iterator.h.
References FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getFullName().
|
inline |
Get the ChildElements.
std::runtime_error | if index is invalid |
Definition at line 741 of file codec_iterator.h.
|
default |
move operator
|
default |
copy operator
|
inline |
Reset the elements value to their default values, constant values defined in the data definition or zero if zero_value
is set.
[in] | zero_value | set the value to 0 if no constant or default value set in data definition. |
Definition at line 1352 of file codec_iterator.h.
References ddl::codec::cet_empty, ddl::codec::cet_sub_codec, ddl::codec::cet_user_type, FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getIndex(), CodecIndex::getLayout(), and FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getType().
|
inline |
Set the value by copying from a value
buffer.
[in] | value | The value buffer |
[in] | value_size | the size of the value buffer in bytes. |
Definition at line 1341 of file codec_iterator.h.
References FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getIndex().
|
inline |
Sets the value from value
as string.
[in] | value | The value to set as string. string will be converted to the elements type. |
Definition at line 1332 of file codec_iterator.h.
References FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getIndex().
|
inline |
Sets the value from value
of type T
.
T | Type of the value |
[in] | value | The value in type T |
Definition at line 1314 of file codec_iterator.h.
References FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getIndex().
|
inline |
Sets the value from value
as variant.
[in] | value | The value to set as variant |
Definition at line 1323 of file codec_iterator.h.
References FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >::getIndex().