15 #ifndef DDL_STATIC_CODEC_LEGACY_CLASS_HEADER
16 #define DDL_STATIC_CODEC_LEGACY_CLASS_HEADER
19 #include <ddl/codec/static_codec.h>
22 #define DEV_ESSENTIAL_DEPRECATED_STATIC_DECODER \
23 DEV_ESSENTIAL_DEPRECATED("Use the new ddl::codec::StaticDecoder() instead.")
25 #define DEV_ESSENTIAL_DEPRECATED_STATIC_CODEC \
26 DEV_ESSENTIAL_DEPRECATED("Use the new ddl::codec::StaticCodec() instead.")
32 struct LegacyCodecAccess;
46 DEV_ESSENTIAL_DEPRECATED_STATIC_DECODER
66 DEV_ESSENTIAL_DEPRECATED_STATIC_DECODER
133 StaticDecoder(
const std::shared_ptr<LegacyCodecAccess>& legacy_codec_access);
158 DEV_ESSENTIAL_DEPRECATED_STATIC_CODEC
178 DEV_ESSENTIAL_DEPRECATED_STATIC_CODEC
A common result class usable as return value throughout.
Container type, able to store any primitive data type (and arrays thereof)
Factory class for ddl codecs.
Codec for static structures defined by a DataDefinition definition.
StaticCodec(const StaticCodec &)=delete
Noncopyable.
StaticCodec & operator=(const StaticCodec &)=delete
Noncopyable.
a_util::result::Result setConstants()
Sets all elements to their constant values defined in the DataDefinition.
a_util::result::Result setElementValue(size_t index, const void *value)
Sets the current value of the given element by copying its data from the passed-in location.
StaticCodec(std::shared_ptr< const StructLayout > layout, void *data, size_t data_size, DataRepresentation rep)
For internal use only.
StaticCodec(StaticCodec &&)=default
Move constructor.
DEV_ESSENTIAL_DEPRECATED_STATIC_CODEC StaticCodec()
Default constructor.
void * getElementAddress(size_t index)
DEV_ESSENTIAL_DEPRECATED_STATIC_CODEC StaticCodec & operator=(StaticCodec &&)=default
Move assignment operator.
a_util::result::Result setElementValue(size_t index, const a_util::variant::Variant &value)
Sets the current value of the given element to the given value.
Decoder for static structures defined by a DataDefinition definition.
size_t _compat_data_size
For internal use only.
StaticDecoder(const StaticDecoder &)=delete
Noncopyable.
a_util::result::Result getElement(size_t index, const StructElement *&element) const
Access information about an element.
const void * _compat_element_accessor
For internal use only.
StaticDecoder(std::shared_ptr< const StructLayout > layout, const void *data, size_t data_size, DataRepresentation rep)
For internal use only.
virtual size_t getElementCount() const
StaticDecoder(StaticDecoder &&)=default
Move constructor.
a_util::result::Result getElementValue(size_t index, a_util::variant::Variant &value) const
Returns the current value of the given element as a variant.
DEV_ESSENTIAL_DEPRECATED_STATIC_DECODER StaticDecoder & operator=(StaticDecoder &&)=default
Move assignment operator.
virtual a_util::result::Result isValid() const
~StaticDecoder()=default
virtual DTOR
StaticDecoder & operator=(const StaticDecoder &)=delete
Noncopyable.
const void * _compat_data
For internal use only.
StaticDecoder(const std::shared_ptr< LegacyCodecAccess > &legacy_codec_access)
For internal use only.
DEV_ESSENTIAL_DEPRECATED_STATIC_DECODER StaticDecoder()
Default constructor.
std::shared_ptr< LegacyCodecAccess > _legacy_access
For internal use only.
const void * getElementAddress(size_t index) const
DataRepresentation getRepresentation() const
a_util::result::Result getElementValue(size_t index, void *value) const
Returns the current value of the given element by copying its data to the passed-in location.
size_t getStaticBufferSize(DataRepresentation rep=deserialized) const
Definition of preprocessor macro DEV_ESSENTIAL_DEPRECATED.
definition of the ddl namespace
DataRepresentation
Enumeration for the data representation.
@ deserialized
deserialized data, c-structs, arrays, ...
Information about an element accessible with a decoder or codec.