ADTF
3.14.3
|
Decoder for dynamic structures defined by a DataDefinition definition. More...
Public Member Functions | |
Codec ()=default | |
Default constructor. | |
Codec (Codec &&)=default | |
Move constructor. | |
Codec & | operator= (Codec &&)=default |
Move assignment operator. | |
a_util::result::Result | setElementValue (size_t index, const void *value) |
Sets the current value of the given element by copying its data from the passed-in location. More... | |
a_util::result::Result | setElementValue (size_t index, const a_util::variant::Variant &value) |
Sets the current value of the given element to the given value. More... | |
void * | getElementAddress (size_t index) |
a_util::result::Result | setConstants () |
Sets all elements to their constant values defined in the DataDefinition. More... | |
const void * | getElementAddress (size_t index) const |
![]() | |
Decoder ()=default | |
Default constructor. | |
Decoder (Decoder &&)=default | |
Move constructor. | |
Decoder & | operator= (Decoder &&)=default |
Move assignment operator. | |
Decoder (const Decoder &)=delete | |
No copy constructor. | |
Decoder & | operator= (const Decoder &)=delete |
No copy assignment operator. | |
virtual a_util::result::Result | isValid () const |
virtual size_t | getElementCount () const |
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 | |
Default constructor. | |
StaticDecoder (const StaticDecoder &)=delete | |
Noncopyable. | |
StaticDecoder & | operator= (const StaticDecoder &)=delete |
Noncopyable. | |
StaticDecoder (StaticDecoder &&)=default | |
Move constructor. | |
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 | |
Codec (a_util::memory::shared_ptr< const StructLayout > layout, void *data, size_t data_size, DataRepresentation rep) | |
For internal use only. | |
Codec (const Decoder &decoder, void *data, size_t data_size, DataRepresentation rep) | |
For internal use only. | |
![]() | |
Decoder (a_util::memory::shared_ptr< const StructLayout > layout, const void *data, size_t data_size, DataRepresentation rep) | |
For internal use only. | |
Decoder (const Decoder &decoder, const void *data, size_t data_size, DataRepresentation rep) | |
For internal use only. | |
virtual const StructLayoutElement * | getLayoutElement (size_t index) const |
For internal use only. | |
![]() | |
StaticDecoder (a_util::memory::shared_ptr< const StructLayout > layout, const void *data, size_t data_size, DataRepresentation rep) | |
For internal use only. | |
Additional Inherited Members | |
![]() | |
a_util::memory::shared_ptr< std::vector< StructLayoutElement > > | _dynamic_elements |
For internal use only. | |
Offsets | _buffer_sizes |
For internal use only. | |
![]() | |
a_util::memory::shared_ptr< const StructLayout > | _layout |
For internal use only. | |
const void * | _data |
For internal use only. | |
size_t | _data_size |
For internal use only. | |
const ElementAccessor * | _element_accessor |
For internal use only. | |
Decoder for dynamic structures defined by a DataDefinition definition.
Currently the amount of dynamic elements is determined during construction only (by the current values in the structure).
Definition at line 138 of file conan_home_relwithdebinfo/.conan/data/dev_essential/1.1.4/fep/stable/package/5bba22a1f4e8057d230d54fdd86f43a9aa5ca5fe/include/ddl/codec/codec.h.
void* getElementAddress | ( | size_t | index | ) |
[in] | index | The index of the element. |
const void* getElementAddress |
[in] | index | The index of the element. |
a_util::result::Result setConstants | ( | ) |
Sets all elements to their constant values defined in the DataDefinition.
a_util::result::Result setElementValue | ( | size_t | index, |
const a_util::variant::Variant & | value | ||
) |
Sets the current value of the given element to the given value.
[in] | index | The index of the element. |
[in] | value | The value. |
ERR_INVALID_INDEX | Invalid element index. |
a_util::result::Result setElementValue | ( | size_t | index, |
const void * | value | ||
) |
Sets the current value of the given element by copying its data from the passed-in location.
[in] | index | The index of the element. |
[in] | value | The location where the data should be copied from. |
ERR_INVALID_INDEX | Invalid element index. |