Namespace for the new faster CodecFactory/Decoder/Codec implementation. More...
Classes | |
class | ChildElements |
Iteratable container type for the given Element type in ElementAccessType::element_type. More... | |
class | Codec |
Decoder for dynamic structures defined by a DataDefinition definition. More... | |
class | CodecConstantInfo |
The constant info of a element. More... | |
class | CodecDefaultValueInfo |
The default value info of a element. More... | |
class | CodecElement |
A CodecElement to get and set values. More... | |
class | CodecElementAccess |
A element access type concept template to retrieve element information from the AccessType , get and set the element value. More... | |
class | CodecFactory |
Factory class for ddl codecs. More... | |
class | CodecIndex |
Fast Access Index Type for the coders. More... | |
class | CodecTypeInfo |
Description of the elements Type. More... | |
class | Decoder |
Decoder for dynamic structures defined by a DataDefinition definition. More... | |
class | DecoderElement |
A DecoderElement to get values. More... | |
class | DecoderElementAccess |
A element access type concept template to retrieve element information from the AccessType and get the element value. More... | |
class | ElementIterator |
The element iterator. More... | |
class | ElementIteratorConst |
The const element iterator. More... | |
struct | ElementLayout |
Layout defintion for one element with set array position. More... | |
struct | ElementLayoutBase |
Base layout definition for one element. More... | |
class | FactoryElement |
A FactoryElement. More... | |
class | FactoryElementAccess |
A factory element access type concept template to retrieve element information from the AccessType . More... | |
class | LeafCodecIndex |
The Leaf codec index is a small layout information index to access the decoders/codecs data very fast. More... | |
struct | LeafLayout |
small leaf layout information to access codec data very fast. More... | |
struct | LeafValueGetter |
Value getter to retrieve the current value of the given element as a ValueType if supported from a data area. More... | |
struct | LeafValueSetter |
Value setter to set the current value of the given element from a type ValueType if supported. More... | |
struct | PositionWithAlignedTypeSize |
Position with type size information. More... | |
struct | PositionWithTypeSize |
Position with type size information. More... | |
struct | PositionWithUsedBitsTypeSize |
Position with used bit type size information. More... | |
class | StaticCodec |
Codec for static structures defined by a DataDefinition definition. More... | |
class | StaticDecoder |
Decoder for static structures defined by a DataDefinition definition. More... | |
struct | ValueGetter |
Value getter to retrieve the current value of the given element as a ValueType if supported. More... | |
struct | ValueGetter< DecoderType, std::string > |
Value getter specialization for std::string . More... | |
struct | ValueGetterSelect |
Value getter to retrieve the current value of the given element as a ValueType if supported. More... | |
struct | ValueGetterSelect< DecoderType, ValueType, true > |
Value getter to retrieve the current value of the given element as a ValueType if supported. More... | |
struct | ValueSetter |
Value setter to set the current value of the given element from a type ValueType if supported. More... | |
struct | ValueSetter< CodecType, std::string > |
Value setter specialization for std::string . More... | |
struct | ValueSetterSelect |
Value setter to set the value of the given element as a ValueType if supported. More... | |
struct | ValueSetterSelect< CodecType, ValueType, true > |
Value setter to set the value of the given element as a ValueType if supported. More... | |
Typedefs | |
using | Position = ddl::Position |
Binary compatible reusing of structure for position of elements. | |
using | AccessEnumType = ddl::AccessEnumType |
This is the legacy Access Type for resolving enum names. | |
Enumerations | |
enum class | ElementType { cet_empty = a_util::variant::VariantType::VT_Empty , cet_bool = a_util::variant::VariantType::VT_Bool , cet_int8 = a_util::variant::VariantType::VT_Int8 , cet_uint8 = a_util::variant::VariantType::VT_UInt8 , cet_int16 = a_util::variant::VariantType::VT_Int16 , cet_uint16 = a_util::variant::VariantType::VT_UInt16 , cet_int32 = a_util::variant::VariantType::VT_Int32 , cet_uint32 = a_util::variant::VariantType::VT_UInt32 , cet_int64 = a_util::variant::VariantType::VT_Int64 , cet_uint64 = a_util::variant::VariantType::VT_UInt64 , cet_float = a_util::variant::VariantType::VT_Float , cet_double = a_util::variant::VariantType::VT_Double , cet_sub_codec = cet_double + 1 , cet_user_type = cet_sub_codec + 1 } |
The element type of the value. More... | |
enum class | LeafDataRepresentation : uint8_t { deserialized = 0x00 , serialized = 0x01 , serialized_be = 0x03 , serialized_le = 0x01 } |
LeafLayout data representation flags. More... | |
enum class | LeafElementType : uint8_t { let_bool = static_cast<uint8_t>(ElementType::cet_bool) , let_int8 = static_cast<uint8_t>(ElementType::cet_int8) , let_uint8 , let_int16 , let_uint16 , let_int32 , let_uint32 , let_int64 , let_uint64 , let_float = static_cast<uint8_t>(ElementType::cet_float) , let_double = static_cast<uint8_t>(ElementType::cet_double) } |
Valid ElementTypes for the LeafLayout. More... | |
enum class | TransformOption : uint32_t { by_memory = 0 , by_value = 1 } |
The transform options for transform. More... | |
Functions | |
template<typename T> | |
std::vector< CodecIndex > | getCodecIndices (const T &decoder_or_factory) |
Retrieves all codec indices for the given codec of type T . | |
template<typename T> | |
std::vector< LeafCodecIndex > | getLeafCodecIndices (const T &decoder_or_factory, ddl::DataRepresentation rep) |
Get the leaf indices object. | |
std::string | toString (const CodecIndex &index) |
Converts the index to a string. | |
template<typename ElementsType> | |
void | forEachLeafElement (ElementsType &elements, const std::function< void(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &)> &func) |
Iterates ALL leaf elements within ALL array elements. | |
template<typename ElementsType> | |
void | forEachElement (ElementsType &elements, const std::function< void(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &)> &func) |
Iterates elements without array elements (also structures). | |
_MAKE_RESULT (-3, ERR_AUTIL_UNEXPECTED) | |
Creates an a_util error ERR_AUTIL_UNEXPECTED. | |
template<typename DECODER, typename ENCODER> | |
a_util::result::Result | transform (const DECODER &decoder, ENCODER &encoder, const TransformOption transform_option) |
Copies all elements memory content from decoder elements to codec elements The encoders element count must be at least decoders element count or greater, otherwise it fails with an error result. | |
template<typename DECODER, typename ENCODER> | |
a_util::result::Result | transform (const DECODER &decoder, ENCODER &encoder) |
Copies all elements memory content from decoder elements to codec elements. | |
a_util::result::Result | transformToBuffer (const codec::Decoder &decoder, a_util::memory::MemoryBuffer &buffer, bool zero=false) |
Tranforms the data from a given decoder into the opposite data representation. | |
Namespace for the new faster CodecFactory/Decoder/Codec implementation.
using AccessEnumType = ddl::AccessEnumType |
This is the legacy Access Type for resolving enum names.
Definition at line 49 of file codec_type_info.h.
using Position = ddl::Position |
Binary compatible reusing of structure for position of elements.
Definition at line 46 of file codec_index.h.
|
strong |
The element type of the value.
Definition at line 29 of file codec_type_info.h.
|
strong |
LeafLayout data representation flags.
Definition at line 34 of file leaf_value_access.h.
|
strong |
Valid ElementTypes for the LeafLayout.
Enumerator | |
---|---|
let_bool | LeafElementType type is bool. |
let_int8 | LeafElementType type is std::int8_t. |
let_uint8 | LeafElementType type is std::uint8_t. |
let_int16 | LeafElementType type is std::int16_t. |
let_uint16 | LeafElementType type is std::uint16_t. |
let_int32 | LeafElementType type is std::int32_t. |
let_uint32 | LeafElementType type is std::uint32_t. |
let_int64 | LeafElementType type is std::int64_t. |
let_uint64 | LeafElementType type is std::uint64_t. |
let_float | LeafElementType type is float. |
let_double | LeafElementType type is double. |
Definition at line 60 of file leaf_value_access.h.
|
strong |
The transform options for transform.
Enumerator | |
---|---|
by_memory | Transform each element by memory. |
by_value | Transform each element by value. |
Definition at line 35 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/serialization/serialization.h.
void forEachElement | ( | ElementsType & | elements, |
const std::function< void(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &)> & | func ) |
Iterates elements without array elements (also structures).
Usage:
ElementsType | The type of elements. |
elements | The elements |
func | The function to call per leaf element |
Definition at line 1528 of file codec_iterator.h.
References forEachElement().
Referenced by forEachElement().
void forEachLeafElement | ( | ElementsType & | elements, |
const std::function< void(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &)> & | func ) |
Iterates ALL leaf elements within ALL array elements.
Usage:
ElementsType | The type of elements. |
elements | The elements |
func | The function to call per leaf element |
Definition at line 1449 of file codec_iterator.h.
References forEachLeafElement().
Referenced by forEachLeafElement(), getCodecIndices(), getLeafCodecIndices(), and transform().
std::vector< CodecIndex > getCodecIndices | ( | const T & | decoder_or_factory | ) |
Retrieves all codec indices for the given codec of type T
.
T | The codec type or factory. |
[in] | decoder_or_factory | the codec or factory of type T |
Definition at line 356 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/codec_factory.h.
References forEachLeafElement().
std::vector< LeafCodecIndex > getLeafCodecIndices | ( | const T & | decoder_or_factory, |
ddl::DataRepresentation | rep ) |
Get the leaf indices object.
T | The type of the decoder or factory to retrieve all leaf indices from. |
decoder_or_factory | The decoder or factory to retrieve all indices from. |
rep | The data representation to extract the leaf codec index for |
Definition at line 374 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/codec_factory.h.
References forEachLeafElement().
std::string toString | ( | const CodecIndex & | index | ) |
Converts the index to a string.
index | the index to convert |
a_util::result::Result transform | ( | const DECODER & | decoder, |
ENCODER & | encoder ) |
Copies all elements memory content from decoder elements to codec elements.
The encoders element count must be at least decoders element count or greater, otherwise it fails with an error result.
[in] | decoder | The source decoder. |
[out] | encoder | The destination codec. |
Definition at line 106 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/serialization/serialization.h.
References by_value, and transform().
a_util::result::Result transform | ( | const DECODER & | decoder, |
ENCODER & | encoder, | ||
const TransformOption | transform_option ) |
Copies all elements memory content from decoder elements to codec elements The encoders element count must be at least decoders element count or greater, otherwise it fails with an error result.
[in] | decoder | The source decoder. |
[out] | encoder | The destination codec. |
[in] | transform_option | use by_memory for values with same type only. use by_value for transform different types. |
Definition at line 57 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/serialization/serialization.h.
References by_memory, by_value, forEachLeafElement(), and RETURN_ERROR_DESCRIPTION.
Referenced by transform().
a_util::result::Result transformToBuffer | ( | const codec::Decoder & | decoder, |
a_util::memory::MemoryBuffer & | buffer, | ||
bool | zero = false ) |
Tranforms the data from a given decoder into the opposite data representation.
Allocates the buffer accordingly.
[in] | decoder | The source decoder. |
[out] | buffer | The destination buffer object. |
[in] | zero | Whether or not to memzero the buffer before writing the elements to it. |