ADTF
|
Decoder for dynamic structures defined by a DDL definition. More...
Public Types | |
typedef adtf_ddl::tStructElement | DefinedStructElementType |
![]() | |
typedef adtf_ddl::tStructElement | DefinedStructElementType |
Public Member Functions | |
cDecoder ()=default | |
Default constructor. | |
cDecoder (cDecoder &&)=default | |
Move constructor. | |
cDecoder & | operator= (cDecoder &&)=default |
Move assignment operator. | |
virtual tResult | IsValid () const override |
virtual size_t | GetElementCount () const override |
size_t | GetBufferSize (tDataRepresentation eRep=tDataRepresentation::Deserialized) const |
cCodec | MakeCodecFor (void *pData, size_t nDataSize, tDataRepresentation eRep) const |
Create a new codec with the current dynamic structure layout for a new data buffer. More... | |
![]() | |
cStaticDecoder () | |
Default constructor. | |
cStaticDecoder (cStaticDecoder &&)=default | |
Move constructor. | |
cStaticDecoder & | operator= (cStaticDecoder &&)=default |
Move assignment operator. | |
tResult | GetElement (size_t nIndex, const tStructElement *&pElement) const |
Access information about an element. More... | |
tResult | GetElementValue (size_t nIndex, void *pValue) const |
Returns the current value of the given element by copying its data to the passed-in location. More... | |
tResult | GetElementValue (size_t nIndex, A_UTILS_NS::cVariant &oValue) const |
Returns the current value of the given element as a variant. More... | |
const void * | GetElementAddress (size_t nIndex) const |
size_t | GetStaticBufferSize (tDataRepresentation eRep=tDataRepresentation::Deserialized) const |
tDataRepresentation | GetRepresentation () const |
A_UTILS_NS::cString | GetElementValueString (size_t nIndex) const |
Returns the current value of the given element as a string. More... | |
Protected Member Functions | |
cDecoder (std::shared_ptr< const cStructLayout > pLayout, const void *pData, size_t nDataSize, tDataRepresentation eRep) | |
For internal use only. | |
cDecoder (const cDecoder &oDecoder, const void *pData, size_t nDataSize, tDataRepresentation eRep) | |
For internal use only. | |
virtual const tStructLayoutElement * | GetLayoutElement (size_t nIndex) const override |
For internal use only. | |
![]() | |
cStaticDecoder (std::shared_ptr< const cStructLayout > pLayout, const void *pData, size_t nDataSize, tDataRepresentation eRep) | |
For internal use only. | |
Protected Attributes | |
std::shared_ptr< std::vector< tStructLayoutElement > > | m_pDynamicElements |
For internal use only. | |
tOffsets | m_sBufferSizes |
For internal use only. | |
![]() | |
std::shared_ptr< const cStructLayout > | m_pLayout |
For internal use only. | |
const void * | m_pData |
For internal use only. | |
size_t | m_nDataSize |
For internal use only. | |
const cElementAccessor * | m_pElementAccessor |
For internal use only. | |
Private Member Functions | |
tResult | CalculateDynamicElements () |
For internal use only. | |
tResult | AddDynamicElements (const tDynamicStructLayoutElement &sDynamicElement, tOffsets &sOverallOffsets, const A_UTILS_NS::cString &strPrefix) |
For internal use only. | |
tResult | AddDynamicElement (const tDynamicStructLayoutElement &sDynamicElement, const A_UTILS_NS::cString &strArrayIndex, tOffsets &sOverallOffsets, const A_UTILS_NS::cString &strPrefix) |
For internal use only. | |
tResult | AddStaticStructElements (const tDynamicStructLayoutElement &sDynamicElement, const A_UTILS_NS::cString &strArrayIndex, tOffsets &sOverallOffsets, const A_UTILS_NS::cString &strPrefix) |
For internal use only. | |
tResult | AddDynamicStructElements (const tDynamicStructLayoutElement &sDynamicElement, const A_UTILS_NS::cString &strArrayIndex, tOffsets &sOverallOffsets, const A_UTILS_NS::cString &strPrefix) |
For internal use only. | |
tResult | AddDynamicStructElement (const tStructLayoutElement &sElement) |
For internal use only. | |
void | MoveToAlignment (size_t &nBitOffset, size_t nAlignment) |
For internal use only. | |
Additional Inherited Members | |
![]() | |
static const char * | GetStructElementName (const tStructElement *pElement) |
Access information about an element. More... | |
Decoder for dynamic structures defined by a DDL definition.
Definition at line 18 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/codec.h.
size_t GetBufferSize | ( | tDataRepresentation | eRep = tDataRepresentation::Deserialized | ) | const |
[in] | eRep | The data representation for which the buffer size should be returned. |
|
overridevirtual |
Reimplemented from cStaticDecoder.
|
overridevirtual |
ERR_INVALID_ARG | The passed data is not large enough. |
Reimplemented from cStaticDecoder.
Referenced by decoding_sample_reader< ReaderImplementation >::GetLastDecoder(), and decoding_sample_reader< ReaderImplementation >::GetNextDecoder().
cCodec MakeCodecFor | ( | void * | pData, |
size_t | nDataSize, | ||
tDataRepresentation | eRep | ||
) | const |
Create a new codec with the current dynamic structure layout for a new data buffer.
[in] | pData | The pointer to the new raw data. |
[in] | nDataSize | The size of the new raw data. |
[in] | eRep | The representation that the data should be encoded in. |