15 #ifndef DDL_CODEC_LEGACY_CLASS_HEADER
16 #define DDL_CODEC_LEGACY_CLASS_HEADER
20 #include <ddl/codec/codec.h>
24 #define DEV_ESSENTIAL_DEPRECATED_DECODER \
25 DEV_ESSENTIAL_DEPRECATED("Use the new ddl::codec::Decoder() instead.")
27 #define DEV_ESSENTIAL_DEPRECATED_CODEC \
28 DEV_ESSENTIAL_DEPRECATED("Use the new ddl::codec::Codec() instead.")
51 DEV_ESSENTIAL_DEPRECATED_DECODER
62 DEV_ESSENTIAL_DEPRECATED_DECODER
105 Decoder(
const std::shared_ptr<LegacyCodecAccess>& legacy_codec_access);
134 DEV_ESSENTIAL_DEPRECATED_CODEC
145 DEV_ESSENTIAL_DEPRECATED_CODEC
184 Codec(std::shared_ptr<const StructLayout> layout,
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.
Decoder for dynamic structures defined by a DataDefinition definition.
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.
Codec(std::shared_ptr< const StructLayout > layout, void *data, size_t data_size, DataRepresentation rep)
For internal use only.
void * getElementAddress(size_t index)
DEV_ESSENTIAL_DEPRECATED_CODEC Codec & operator=(Codec &&)=default
Move assignment operator.
Codec(codec::Codec &&codec)
For internal use only.
Codec(Codec &&)=default
Move constructor.
DEV_ESSENTIAL_DEPRECATED_CODEC Codec()=default
Default constructor.
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 dynamic structures defined by a DataDefinition definition.
Codec makeCodecFor(void *data, size_t data_size, DataRepresentation rep) const
Create a new codec with the current dynamic structure layout for a new data buffer.
size_t getElementCount() const override
LegacyOffsets _compat_buffer_sizes
For internal use only.
Decoder(Decoder &&)=default
Move constructor.
DEV_ESSENTIAL_DEPRECATED_DECODER Decoder()=default
Default constructor.
Decoder(std::shared_ptr< const StructLayout >, const void *data, size_t data_size, DataRepresentation rep)
This CTOR must stay there for binary compatible reason due to an inline usage within old CodecFactory...
size_t getBufferSize(DataRepresentation rep=deserialized) const
Decoder(const Decoder &)=delete
No copy constructor.
Decoder & operator=(const Decoder &)=delete
No copy assignment operator.
virtual const void * getLayoutElement(size_t index) const
this virtual pointer must stay for binary compatiblity.
a_util::result::Result isValid() const override
DEV_ESSENTIAL_DEPRECATED_DECODER Decoder & operator=(Decoder &&)=default
Move assignment operator.
std::shared_ptr< std::vector< int32_t > > _compat_dynamic_elements
For internal use only.
Decoder(const std::shared_ptr< LegacyCodecAccess > &legacy_codec_access)
For internal use only.
Decoder for static structures defined by a DataDefinition definition.
const void * getElementAddress(size_t index) const
Decoder for dynamic structures defined by a DataDefinition definition.
Definition of preprocessor macro DEV_ESSENTIAL_DEPRECATED.
definition of the ddl namespace
DataRepresentation
Enumeration for the data representation.
@ deserialized
deserialized data, c-structs, arrays, ...
Definition of old StaticCodec legacy header for old Codec API.
Legacy offset structure for binary compatiblity.
size_t deserialized
legacy value
size_t serialized
legacy value
Common include for component a_util::result.