Decoder for static structures defined by a DataDefinition definition.
More...
#include <static_codec_legacy.h>
|
| 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.
|
|
Decoder for static structures defined by a DataDefinition definition.
- Deprecated
- Use the new StaticDecoder() instead.
Definition at line 39 of file static_codec_legacy.h.
◆ getElement()
Access information about an element.
- Parameters
-
[in] | index | The index of the element. |
[out] | element | Pointer that will be updated to point to the element information. |
- Return values
-
ERR_INVALID_INDEX | Invalid element index. |
◆ getElementAddress()
const void * getElementAddress |
( |
size_t | index | ) |
const |
◆ getElementCount()
virtual size_t getElementCount |
( |
| ) |
const |
|
virtual |
- Returns
- The amount of elements contained in the data structure.
Reimplemented in Decoder.
◆ getElementValue() [1/2]
Returns the current value of the given element as a variant.
- Parameters
-
[in] | index | The index of the element. |
[out] | value | The will be set to the current value. |
- Return values
-
ERR_INVALID_INDEX | Invalid element index. |
◆ getElementValue() [2/2]
Returns the current value of the given element by copying its data to the passed-in location.
- Parameters
-
[in] | index | The index of the element. |
[out] | value | The location where the value should be copied to. |
- Return values
-
ERR_INVALID_INDEX | Invalid element index. |
◆ getRepresentation()
- Returns
- The data representation which this decoder handles.
◆ getStaticBufferSize()
- Parameters
-
[in] | rep | The data representation for which the buffer size should be returned. |
- Returns
- The size of the structure in the requested data representation.
References ddl::deserialized.
◆ isValid()
- Returns
- Whether or not the decoder is valid.
- Return values
-
ERR_INVALID_ARG | The passed data is not large enough. |
Reimplemented in Decoder.
◆ _compat_data
◆ _compat_data_size
◆ _compat_element_accessor
const void* _compat_element_accessor |
|
protected |
◆ _legacy_access
std::shared_ptr<LegacyCodecAccess> _legacy_access |
|
protected |