ADTF  3.14.3
DecoderElement< ElementAccessType, ChildElementsType >

A DecoderElement to get values. More...

Inheritance diagram for DecoderElement< ElementAccessType, ChildElementsType >:
[legend]

Public Types

typedef FactoryElement< ElementAccessType, ChildElementsType > base_type
 Used base type.
 
typedef DecoderElement< ElementAccessType, ChildElementsType > 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.
 
- Public Types inherited from FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >
typedef FactoryElement< ElementAccessType, ChildElements< ElementAccessType > > self_type
 Used self_type.
 
typedef ElementAccessType::access_type access_type
 Used access_type.
 
typedef ChildElements< ElementAccessType > 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

 DecoderElement ()=delete
 CTOR.
 
 DecoderElement (DecoderElement &&)=default
 move CTOR
 
DecoderElementoperator= (DecoderElement &&)=default
 move operator More...
 
 DecoderElement (const DecoderElement &)=default
 copy CTOR
 
DecoderElementoperator= (const DecoderElement &)=default
 copy operator More...
 
 ~DecoderElement ()=default
 DTOR.
 
template<typename 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...
 
- Public Member Functions inherited from FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >
 FactoryElement ()=delete
 no CTOR
 
 FactoryElement (FactoryElement &&other)
 move CTOR
 
 FactoryElement (const FactoryElement &other)
 copy CTOR
 
FactoryElementoperator= (FactoryElement &&other)
 copy operator More...
 
FactoryElementoperator= (const FactoryElement &other)
 move operator More...
 
 ~FactoryElement ()=default
 DTOR.
 
const CodecIndexgetIndex () 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_typegetChildElements () 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 CodecElement< ElementAccessType, ChildElementsType >
 
- Public Attributes inherited from FactoryElement< ElementAccessType, ChildElements< ElementAccessType > >
friend access_type
 
friend child_elements_type
 
friend iterator_type
 
friend const_iterator_type
 
friend DecoderElement< ElementAccessType, ChildElementsType >
 
friend CodecElement< ElementAccessType, ChildElementsType >
 

Private Member Functions

 DecoderElement (CodecIndex &&index, size_t end_element_index, size_t child_elements_count, access_type &access)
 
 DecoderElement (CodecIndex &&index, size_t end_element_index, access_type &access)
 
 DecoderElement (const std::string &element_name, access_type &access)
 
 DecoderElement (CodecIndex &&index, access_type &access)
 
 DecoderElement (access_type &access)
 
void next ()
 

Detailed Description

template<typename ElementAccessType, typename ChildElementsType = ChildElements<ElementAccessType>>
class ddl::codec::DecoderElement< ElementAccessType, ChildElementsType >

A DecoderElement to get values.

Template Parameters
ElementAccessTypeThe element access concept type. (see concept templates DecoderElementAccess, CodecElementAccess)

Definition at line 967 of file codec_iterator.h.

Member Function Documentation

◆ getAddress()

const void* getAddress ( ) const
inline

Get the address of the element.

Returns
const void*

Definition at line 1075 of file codec_iterator.h.

References FactoryElement< ElementAccessType, ChildElementsType >::getIndex().

◆ getArrayElement()

self_type getArrayElement ( size_t  array_pos = 0) const
inline

Get the array element of the given array_pos.

Parameters
array_posThe array pos of the element to retrieve
Returns
self_type

Definition at line 1096 of file codec_iterator.h.

References FactoryElement< ElementAccessType, ChildElementsType >::getIndex().

◆ getChildElement()

self_type getChildElement ( const std::string &  name) const
inline

Get the child element with the given name.

Parameters
nameName of the child element.
Returns
self_type

Definition at line 1084 of file codec_iterator.h.

References FactoryElement< ElementAccessType, ChildElementsType >::getFullName().

◆ getRawValue()

void getRawValue ( void *  value,
size_t  value_size 
) const
inline

Get the as copy to the valu buffer.

Parameters
valueThe value buffer to copy to
value_sizeThe size of the value buffer (if 0 its unsafe usage without size check!)

Definition at line 1067 of file codec_iterator.h.

References FactoryElement< ElementAccessType, ChildElementsType >::getIndex().

◆ getStringValue()

std::string getStringValue ( ) const
inline

Get the value as string.

Parameters
accessdefined access type.
indexThe codec index.
Returns
value as string (the value is returned as element name in case of enum type)

Definition at line 1058 of file codec_iterator.h.

References FactoryElement< ElementAccessType, ChildElementsType >::getIndex().

◆ getValue()

T getValue ( ) const
inline

Get the value as type T.

Template Parameters
TType of the value to return
Returns
value in type T (supported types: all int types, bool, float, double, std::string)
Remarks
for T = std::string the value is returned as element name in case of enum type
See also
StaticCodec::getElementValue

Definition at line 1036 of file codec_iterator.h.

References FactoryElement< ElementAccessType, ChildElementsType >::getIndex().

◆ getVariantValue()

a_util::variant::Variant getVariantValue ( ) const
inline

Get the value as variant.

Parameters
accessdefined access type.
indexThe codec index.
Returns
value as variant (supported types: all int types, bool, float, double, std::string)

Definition at line 1047 of file codec_iterator.h.

References FactoryElement< ElementAccessType, ChildElementsType >::getIndex().

◆ operator=() [1/2]

DecoderElement& operator= ( const DecoderElement< ElementAccessType, ChildElementsType > &  )
default

copy operator

Returns
DecoderElement&

◆ operator=() [2/2]

DecoderElement& operator= ( DecoderElement< ElementAccessType, ChildElementsType > &&  )
default

move operator

Returns
DecoderElement&

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)