ADTF  3.15.1
DecoderElementAccess< AccessType >

A element access type concept template to retrieve element information from the AccessType and get the element value. More...

Inheritance diagram for DecoderElementAccess< AccessType >:
[legend]

Public Types

using access_type = AccessType
 access type in use
 
using self_type = DecoderElementAccess< AccessType >
 self type
 
using element_type = DecoderElement< self_type, ChildElements< self_type > >
 supported element type
 
- Public Types inherited from FactoryElementAccess< AccessType >
using access_type = AccessType
 The access type (CodecFactory, Codec, Decoder, etc.)
 
using self_type = FactoryElementAccess< AccessType >
 self type
 
using element_type = FactoryElement< self_type, ChildElements< self_type > >
 element type
 

Static Public Member Functions

static element_type getElement (access_type &access, const std::string &full_element_name)
 Get a element object for the given full_element_name. More...
 
static element_type getElement (access_type &access, const CodecIndex &index)
 Get a element object for the given index. More...
 
template<typename T >
static T getValue (access_type &access, const CodecIndex &index)
 Get the value as type T. More...
 
static a_util::variant::Variant getVariantValue (access_type &access, const CodecIndex &index)
 Get the value as variant. More...
 
static std::string getStringValue (access_type &access, const CodecIndex &index)
 Get the value as type string. More...
 
static void getRawValue (access_type &access, const CodecIndex &index, void *value, size_t value_size)
 Get the value by copy to the given value buffer. More...
 
static const void * getAddress (access_type &access, const CodecIndex &index)
 Get the address of the element. More...
 
- Static Public Member Functions inherited from FactoryElementAccess< AccessType >
static element_type getElement (access_type &access, const std::string &full_element_name)
 Get a element object for the given full_element_name. More...
 
static element_type getElement (access_type &access, const CodecIndex &index)
 Get a element object for the given index. More...
 
static size_t getChildCount (access_type &access, const CodecIndex &index)
 Get the Child Count. More...
 
static std::string getFullName (access_type &access, const CodecIndex &index)
 Get the full name of the element within its main structure. More...
 
static std::string getName (access_type &access, const CodecIndex &index)
 Get the name of the element within its level structure. More...
 
static std::string getBaseName (access_type &access, const CodecIndex &index)
 Get the name of the element within its level structure. More...
 
static void resolve (access_type &access, CodecIndex &index)
 Resolves the given CodecIndex and set the layout information. More...
 

Detailed Description

template<typename AccessType>
class ddl::codec::DecoderElementAccess< AccessType >

A element access type concept template to retrieve element information from the AccessType and get the element value.

This class is to retrieve common information of the element and get the element value content.

See also
DecoderElement.
Template Parameters
AccessTypeThe AccessType for the element (Codec, Decoder, etc. )

Definition at line 840 of file codec_iterator.h.

Member Function Documentation

◆ getAddress()

static const void* getAddress ( access_type access,
const CodecIndex index 
)
inlinestatic

Get the address of the element.

Parameters
accessdefined access type.
indexThe codec index.
Returns
const void*

Definition at line 931 of file codec_iterator.h.

◆ getElement() [1/2]

static element_type getElement ( access_type access,
const CodecIndex index 
)
inlinestatic

Get a element object for the given index.

Parameters
accessdefined access type.
indexThe codec index.
Returns
element_type

Definition at line 866 of file codec_iterator.h.

◆ getElement() [2/2]

static element_type getElement ( access_type access,
const std::string &  full_element_name 
)
inlinestatic

Get a element object for the given full_element_name.

Parameters
accessdefined access type.
full_element_nameThe full name of the element in point notation (i.e. "element1.child_element[4].element_value").
Returns
element_type

Definition at line 855 of file codec_iterator.h.

◆ getRawValue()

static void getRawValue ( access_type access,
const CodecIndex index,
void *  value,
size_t  value_size 
)
inlinestatic

Get the value by copy to the given value buffer.

Parameters
accessdefined access type.
indexThe codec index.
valuethe value buffer pointer.
value_sizethe size of the value buffer in bytes.

Definition at line 917 of file codec_iterator.h.

◆ getStringValue()

static std::string getStringValue ( access_type access,
const CodecIndex index 
)
inlinestatic

Get the value as type string.

Parameters
accessdefined access type.
indexThe codec index.
Returns
value as string, it is set to the enums element name in case of enum type
See also
StaticDecoder::getElementStringValue

Definition at line 905 of file codec_iterator.h.

◆ getValue()

static T getValue ( access_type access,
const CodecIndex index 
)
inlinestatic

Get the value as type T.

Parameters
accessdefined access type.
indexThe codec index.
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 881 of file codec_iterator.h.

◆ getVariantValue()

static a_util::variant::Variant getVariantValue ( access_type access,
const CodecIndex index 
)
inlinestatic

Get the value as variant.

Parameters
accessdefined access type.
indexThe codec index.
Returns
value as variant converted from elements type
See also
StaticDecoder::getElementVariantValue

Definition at line 893 of file codec_iterator.h.