The Leaf codec index is a small layout information index to access the decoders/codecs data very fast. More...
#include <leaf_value_access.h>
Public Member Functions | |
LeafCodecIndex ()=delete | |
no CTOR | |
LeafCodecIndex (const CodecIndex &codec_index, ddl::DataRepresentation rep) | |
CTOR. | |
const LeafLayout & | getLayout () const noexcept |
Get the leaf layout. | |
Static Public Member Functions | |
template<bool ThrowError> | |
static bool | convertToLeafLayout (const CodecIndex &codec_index, LeafLayout &leaf_layout, ddl::DataRepresentation rep) |
Retrieves a valid, small, 8-bytes LeafLayout from a CodecIndex. | |
Private Types | |
template<bool ThrowError> | |
using | throw_error = std::integral_constant<bool, ThrowError> |
Static Private Member Functions | |
static bool | convertToLeafLayout (const CodecIndex &codec_index, LeafLayout &leaf_layout, ddl::DataRepresentation rep, throw_error< false >) noexcept |
For internal use only. | |
static bool | convertToLeafLayout (const CodecIndex &codec_index, LeafLayout &leaf_layout, ddl::DataRepresentation rep, throw_error< true >) |
For internal use only. | |
template<typename T> | |
static bool | checkTypeSize (const CodecIndex &codec_index, ddl::DataRepresentation rep, bool exact_check_on_serialized, throw_error< false >) noexcept |
For internal use only. | |
template<typename T> | |
static bool | checkTypeSize (const CodecIndex &codec_index, ddl::DataRepresentation rep, bool exact_check, throw_error< true >) |
For internal use only. | |
template<bool ThrowError> | |
static bool | checkLeafLayout (const CodecIndex &codec_index, ddl::DataRepresentation rep) |
For internal use only. | |
Private Attributes | |
LeafLayout | _leaf_layout |
For internal use only. | |
The Leaf codec index is a small layout information index to access the decoders/codecs data very fast.
There are following constraints:
Definition at line 117 of file leaf_value_access.h.
|
private |
Definition at line 120 of file leaf_value_access.h.
|
inline |
CTOR.
codec_index | the valid codec index to create the LeafCodecIndex from |
rep | the data representation to extract for decoding |
Definition at line 132 of file leaf_value_access.h.
References _leaf_layout, and convertToLeafLayout().
|
inlinestaticprivate |
For internal use only.
Definition at line 259 of file leaf_value_access.h.
References ddl::codec::cet_bool, ddl::codec::cet_double, ddl::codec::cet_empty, ddl::codec::cet_float, ddl::codec::cet_int16, ddl::codec::cet_int32, ddl::codec::cet_int64, ddl::codec::cet_int8, ddl::codec::cet_sub_codec, ddl::codec::cet_uint16, ddl::codec::cet_uint32, ddl::codec::cet_uint64, ddl::codec::cet_uint8, ddl::codec::cet_user_type, checkTypeSize(), and CodecIndex::getType().
Referenced by convertToLeafLayout().
|
inlinestaticprivate |
For internal use only.
Definition at line 244 of file leaf_value_access.h.
References checkTypeSize().
|
inlinestaticprivatenoexcept |
For internal use only.
Definition at line 226 of file leaf_value_access.h.
References ddl::codec::deserialized.
Referenced by checkLeafLayout(), and checkTypeSize().
|
inlinestatic |
Retrieves a valid, small, 8-bytes LeafLayout from a CodecIndex.
ThrowError | Throws if the conversion is not possible. (If set to false, the return value must be checked!) |
codec_index | The CodecIndex to retrieve the lyout information from |
leaf_layout | The new small leaf layout |
rep | The layout information for a serialzed or deserialized representation |
Definition at line 158 of file leaf_value_access.h.
References checkLeafLayout(), and convertToLeafLayout().
Referenced by LeafCodecIndex(), convertToLeafLayout(), convertToLeafLayout(), ValueGetterSelect< DecoderType, ValueType, true >::getValue(), and ValueSetterSelect< CodecType, ValueType, true >::setValue().
|
inlinestaticprivatenoexcept |
For internal use only.
Definition at line 170 of file leaf_value_access.h.
References ddl::codec::deserialized, ByteOrderDefault::getPlatformDefault(), ddl::codec::serialized_be, and ddl::codec::serialized_le.
|
inlinestaticprivate |
For internal use only.
Definition at line 211 of file leaf_value_access.h.
References convertToLeafLayout().
|
inlinenoexcept |
Get the leaf layout.
Definition at line 141 of file leaf_value_access.h.
References _leaf_layout.
Referenced by StaticDecoder::getElementValue(), Codec::setElementValue(), and StaticCodec::setElementValue().
|
private |
For internal use only.
Definition at line 315 of file leaf_value_access.h.
Referenced by LeafCodecIndex(), and getLayout().