ADTF
|
Decoder for dynamic structures defined by a DataDefinition definition. More...
Public Member Functions | |
DEV_ESSENTIAL_DEPRECATED_DECODER | Decoder ()=default |
Default constructor. | |
Decoder (Decoder &&)=default | |
Move constructor. | |
DEV_ESSENTIAL_DEPRECATED_DECODER Decoder & | operator= (Decoder &&)=default |
Move assignment operator. | |
Decoder (const Decoder &)=delete | |
No copy constructor. | |
Decoder & | operator= (const Decoder &)=delete |
No copy assignment operator. | |
a_util::result::Result | isValid () const override |
size_t | getElementCount () const override |
size_t | getBufferSize (DataRepresentation rep=deserialized) const |
Codec | makeCodecFor (void *data, size_t data_size, DataRepresentation rep) const |
Create a new codec with the current dynamic structure layout for a new data buffer. More... | |
![]() | |
~StaticDecoder ()=default | |
virtual DTOR | |
DEV_ESSENTIAL_DEPRECATED_STATIC_DECODER | StaticDecoder () |
Default constructor. | |
StaticDecoder (const StaticDecoder &)=delete | |
Noncopyable. | |
StaticDecoder & | operator= (const StaticDecoder &)=delete |
Noncopyable. | |
StaticDecoder (StaticDecoder &&)=default | |
Move constructor. | |
DEV_ESSENTIAL_DEPRECATED_STATIC_DECODER StaticDecoder & | operator= (StaticDecoder &&)=default |
Move assignment operator. | |
a_util::result::Result | getElement (size_t index, const StructElement *&element) const |
Access information about an element. More... | |
a_util::result::Result | getElementValue (size_t index, void *value) const |
Returns the current value of the given element by copying its data to the passed-in location. More... | |
a_util::result::Result | getElementValue (size_t index, a_util::variant::Variant &value) const |
Returns the current value of the given element as a variant. More... | |
const void * | getElementAddress (size_t index) const |
size_t | getStaticBufferSize (DataRepresentation rep=deserialized) const |
DataRepresentation | getRepresentation () const |
Protected Member Functions | |
virtual const void * | getLayoutElement (size_t index) const |
this virtual pointer must stay for binary compatiblity. | |
Decoder (const std::shared_ptr< LegacyCodecAccess > &legacy_codec_access) | |
For internal use only. | |
Decoder (std::shared_ptr< const StructLayout >, const void *data, size_t data_size, DataRepresentation rep) | |
This CTOR must stay there for binary compatible reason due to an inline usage within old CodecFactory. | |
![]() | |
StaticDecoder (std::shared_ptr< const StructLayout > layout, const void *data, size_t data_size, DataRepresentation rep) | |
For internal use only. | |
StaticDecoder (const std::shared_ptr< LegacyCodecAccess > &legacy_codec_access) | |
For internal use only. | |
Private Attributes | |
std::shared_ptr< std::vector< int32_t > > | _compat_dynamic_elements |
For internal use only. | |
LegacyOffsets | _compat_buffer_sizes |
For internal use only. | |
Additional Inherited Members | |
![]() | |
std::shared_ptr< LegacyCodecAccess > | _legacy_access |
For internal use only. | |
const void * | _compat_data |
For internal use only. | |
size_t | _compat_data_size |
For internal use only. | |
const void * | _compat_element_accessor |
For internal use only. | |
Decoder for dynamic structures defined by a DataDefinition definition.
Definition at line 46 of file codec_legacy.h.
size_t getBufferSize | ( | DataRepresentation | rep = deserialized | ) | const |
[in] | rep | The data representation for which the buffer size should be returned. |
|
overridevirtual |
Reimplemented from StaticDecoder.
|
overridevirtual |
ERR_INVALID_ARG | The passed data is not large enough. |
Reimplemented from StaticDecoder.
Codec makeCodecFor | ( | void * | data, |
size_t | data_size, | ||
DataRepresentation | rep | ||
) | const |
Create a new codec with the current dynamic structure layout for a new data buffer.
[in] | data | The pointer to the new raw data. |
[in] | data_size | The size of the new raw data. |
[in] | rep | The representation that the data should be encoded in. |