7 #ifndef _DDL_CODEC_CLASS_HEADER_
8 #define _DDL_CODEC_CLASS_HEADER_
65 cDecoder(std::shared_ptr<const cStructLayout> pLayout,
const void* pData,
size_t nDataSize,
78 tOffsets& sOverallOffsets,
83 tOffsets& sOverallOffsets,
88 tOffsets& sOverallOffsets,
93 tOffsets& sOverallOffsets,
165 cCodec(std::shared_ptr<const cStructLayout> pLayout,
void* pData,
size_t nDataSize,
A common result class usable as return value throughout.
Variant class which can handle all base data types.
Factory class for ddl codecs.
Codec for dynamic structures defined by a DDL definition.
cCodec()=default
Default constructor.
cCodec & operator=(cCodec &&)=default
Move assignment operator.
cCodec(std::shared_ptr< const cStructLayout > pLayout, void *pData, size_t nDataSize, tDataRepresentation eRep)
For internal use only.
void * GetElementAddress(size_t nIndex)
tResult SetConstants()
Sets all elements to their constant values defined in the DDL.
tResult SetElementValue(size_t nIndex, const void *pValue)
Sets the current value of the given element by copying its data from the passed-in location.
cCodec(cCodec &&)=default
Move constructor.
tResult SetElementValue(size_t nIndex, const A_UTILS_NS::cVariant &oValue)
Sets the current value of the given element to the given value.
cCodec(const cDecoder &oDecoder, void *pData, size_t nDataSize, tDataRepresentation eRep)
For internal use only.
Decoder for dynamic structures defined by a DDL definition.
tResult CalculateDynamicElements()
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.
virtual const tStructLayoutElement * GetLayoutElement(size_t nIndex) const override
For internal use only.
virtual size_t GetElementCount() const override
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.
tOffsets m_sBufferSizes
For internal use only.
size_t GetBufferSize(tDataRepresentation eRep=tDataRepresentation::Deserialized) const
tResult AddDynamicElements(const tDynamicStructLayoutElement &sDynamicElement, tOffsets &sOverallOffsets, const A_UTILS_NS::cString &strPrefix)
For internal use only.
cDecoder(cDecoder &&)=default
Move constructor.
cDecoder(std::shared_ptr< const cStructLayout > pLayout, const void *pData, size_t nDataSize, tDataRepresentation eRep)
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.
cDecoder & operator=(cDecoder &&)=default
Move assignment operator.
cDecoder()=default
Default constructor.
tResult AddDynamicStructElement(const tStructLayoutElement &sElement)
For internal use only.
cDecoder(const cDecoder &oDecoder, const void *pData, size_t nDataSize, tDataRepresentation eRep)
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.
void MoveToAlignment(size_t &nBitOffset, size_t nAlignment)
For internal use only.
std::shared_ptr< std::vector< tStructLayoutElement > > m_pDynamicElements
For internal use only.
virtual tResult IsValid() const override
Decoder for static structures defined by a DDL definition.
const void * GetElementAddress(size_t nIndex) const
Namespace for the mainpage_pkg_ddl.
DataRepresentation
Enumeration for the data representation.
@ Deserialized
alias names for legacy reasons
Information about an element accessible with a decoder or codec.