7 #ifndef _DDL_STATIC_CODEC_CLASS_HEADER_
8 #define _DDL_STATIC_CODEC_CLASS_HEADER_
15 class cElementAccessor;
111 const void* pData,
size_t nDataSize,
182 cStaticCodec(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 static structures defined by a DDL definition.
cStaticCodec & operator=(cStaticCodec &&)=default
Move assignment operator.
cStaticCodec(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.
cStaticCodec()=default
Default constructor.
tResult SetElementValue(size_t nIndex, const A_UTILS_NS::cVariant &oValue)
Sets the current value of the given element to the given value.
cStaticCodec(cStaticCodec &&)=default
Move constructor.
Decoder for static structures defined by a DDL definition.
const void * GetElementAddress(size_t nIndex) const
const void * m_pData
For internal use only.
cStaticDecoder(cStaticDecoder &&)=default
Move constructor.
cStaticDecoder & operator=(cStaticDecoder &&)=default
Move assignment operator.
size_t GetStaticBufferSize(tDataRepresentation eRep=tDataRepresentation::Deserialized) const
size_t m_nDataSize
For internal use only.
virtual tResult IsValid() const
tResult GetElementValue(size_t nIndex, A_UTILS_NS::cVariant &oValue) const
Returns the current value of the given element as a variant.
std::shared_ptr< const cStructLayout > m_pLayout
For internal use only.
tDataRepresentation GetRepresentation() const
A_UTILS_NS::cString GetElementValueString(size_t nIndex) const
Returns the current value of the given element as a string.
tResult GetElement(size_t nIndex, const tStructElement *&pElement) const
Access information about an element.
cStaticDecoder(std::shared_ptr< const cStructLayout > pLayout, const void *pData, size_t nDataSize, tDataRepresentation eRep)
For internal use only.
virtual size_t GetElementCount() const
virtual const tStructLayoutElement * GetLayoutElement(size_t nIndex) const
For internal use only.
static const char * GetStructElementName(const tStructElement *pElement)
Access information about an element.
cStaticDecoder()
Default constructor.
const cElementAccessor * m_pElementAccessor
For internal use only.
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.
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.