Decoder for static structures defined by a DataDefinition definition.
More...
|
| 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 ddl::codec::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 |
- Parameters
-
[in] | index | The index of the element. |
- Returns
- A pointer to the element or NULL in case of an error.
◆ 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.
◆ isValid()
- Returns
- Whether or not the decoder is valid.
- Return values
-
ERR_INVALID_ARG | The passed data is not large enough. |
Reimplemented in Decoder.