15#ifndef DDL_STATIC_CODEC_CLASS_HEADER
16#define DDL_STATIC_CODEC_CLASS_HEADER
111 std::string_view relative_path)
const;
176 template <
typename T>
189 template <
typename T>
301 friend class CodecFactory;
400 std::string_view relative_path);
424 template <
typename T>
438 template <
typename T>
496 friend class CodecFactory;
498 StaticCodec(std::shared_ptr<const StructAccess> codec_access,
508#include <ddl/codec/legacy/static_codec_legacy.h>
Definition result_type_decl.h:34
Iteratable container type for the given Element type in ElementAccessType::element_type.
Definition codec_iterator.h:257
A CodecElement to get and set values.
Definition codec_iterator.h:1221
Definition codec_factory.h:31
Definition codec_index.h:276
A DecoderElement to get values.
Definition codec_iterator.h:969
The Leaf codec index is a small layout information index to access the decoders/codecs data very fast...
Definition leaf_value_access.h:43
const LeafLayout & getLayout() const noexcept
Get the leaf layout.
Definition leaf_value_access.h:66
void * getElementAddress(const CodecIndex &codec_index)
StaticCodec & operator=(const StaticCodec &)=delete
void setElementValue(const LeafCodecIndex &leaf_codec_index, const T &value)
Definition static_codec.h:439
void setElementStringValue(const CodecIndex &codec_index, const std::string &value)
CodecElement< CodecElementAccess< StaticCodec > > Element
Definition static_codec.h:359
void resetValues(bool zero_values=false)
Element getChildElement(const CodecIndex &parent_codec_index, std::string_view relative_path)
ChildElements< CodecElementAccess< StaticCodec > > Elements
Definition static_codec.h:408
StaticCodec(StaticCodec &&)
void * getData() noexcept
Get the current set data.
StaticCodec(const StaticCodec &)=delete
StaticCodec & operator=(StaticCodec &&)
void setElementVariantValue(const CodecIndex &codec_index, const a_util::variant::Variant &value)
void setElementRawValue(const CodecIndex &codec_index, const void *value, size_t value_size)
Element getElement(const CodecIndex &codec_index)
Element getElement(std::string_view full_path)
void setElementValue(const CodecIndex &codec_index, const T &value)
Definition static_codec.h:425
size_t getDataSize() const noexcept
Get the current size (in bytes) of the data.
size_t _data_size
For internal use only.
Definition static_codec.h:315
StaticDecoder & operator=(StaticDecoder &&)
const std::string & getElementBaseName(const CodecIndex &codec_index) const
Retrieves the base name of the element within its structured element.
T getElementValue(const CodecIndex &codec_index) const
Definition static_codec.h:177
size_t getElementChildCount(const CodecIndex &codec_index=CodecIndex()) const
Element getElement(std::string_view full_path) const
std::string getElementFullName(const CodecIndex &codec_index) const
Retrieves the full name of the element within its main structure.
std::string getElementName(const CodecIndex &codec_index) const
Retrieves the name of the element within its structured element.
std::string getElementStringValue(const CodecIndex &codec_index) const
size_t getStaticBufferSize(DataRepresentation rep) const
Gets the static buffer size in bytes for the main structure.
void getElementVariantValue(const CodecIndex &codec_index, a_util::variant::Variant &value) const
const void * _data
For internal use only.
Definition static_codec.h:313
CodecIndex resolve(size_t leaf_index) const
StaticDecoder(StaticDecoder &&)
ChildElements< DecoderElementAccess< const StaticDecoder > > Elements
Definition static_codec.h:117
const void * getData() const noexcept
Get the current set data.
StaticDecoder & operator=(const StaticDecoder &)=delete
StaticDecoder(const StaticDecoder &)=delete
std::shared_ptr< const StructAccess > _codec_access
For internal use only.
Definition static_codec.h:311
a_util::result::Result getElement(size_t leaf_index, const ddl::StructElement *&legacy_struct_element) const
Element getElement(const CodecIndex &codec_index) const
DecoderElement< DecoderElementAccess< const StaticDecoder > > Element
Definition static_codec.h:70
DataRepresentation getRepresentation() const
T getElementValue(const LeafCodecIndex &leaf_codec_index) const
Definition static_codec.h:190
~StaticDecoder()=default
DTOR.
const ddl::codec::ElementAccessor * _element_accessor
For internal use only.
Definition static_codec.h:317
a_util::variant::Variant getElementVariantValue(const CodecIndex &codec_index) const
void resolve(CodecIndex &codec_index) const
size_t getStaticBufferSize() const
Gets the static buffer size in bytes for the main structure.
size_t getElementCount() const
Element getChildElement(const CodecIndex &parent_codec_index, std::string_view relative_path) const
const Elements & getElements() const
const void * getElementAddress(const CodecIndex &index) const
virtual a_util::result::Result isValid() const
CodecIndex resolve(size_t leaf_index, std::string &element_full_name) const
void getElementRawValue(const CodecIndex &index, void *value, size_t value_size) const
definition of the access_element namespace (codecs)
Definition access_element.h:25
Namespace for the new faster CodecFactory/Decoder/Codec implementation.
Definition codec.h:22
definition of the ddl namespace
Definition codec.h:21
DataRepresentation
Definition data_representation.h:25
Definition struct_element.h:32
static ValueType getValue(const void *data, const size_t data_size, const LeafLayout &leaf_layout)
Definition leaf_value_access.h:789
static void setValue(void *data, const size_t data_size, const LeafLayout &leaf_layout, const ValueType &value)
Definition leaf_value_access.h:820
static ValueType getValue(const DecoderType &decoder, const CodecIndex &codec_index)
Definition value_access.h:168
static void setValue(CodecType &codec, const CodecIndex &codec_index, const ValueType &value)
Definition value_access.h:227