Zserio C++ runtime library  1.1.0
Built for Zserio 2.15.0
zserio::PackedArrayTraits< ARRAY_TRAITS, typename > Class Template Reference

#include <ArrayTraits.h>

Public Types

using ArrayTraits = ARRAY_TRAITS
 
using ElementType = typename ARRAY_TRAITS::ElementType
 

Static Public Member Functions

static void initContext (DeltaContext &deltaContext, ElementType element)
 
static size_t bitSizeOf (DeltaContext &deltaContext, size_t, ElementType element)
 
static size_t initializeOffsets (DeltaContext &deltaContext, size_t bitPosition, ElementType element)
 
static ElementType read (DeltaContext &deltaContext, BitStreamReader &in, size_t=0)
 
static void write (DeltaContext &deltaContext, BitStreamWriter &out, ElementType element)
 

Detailed Description

template<typename ARRAY_TRAITS, typename = void>
class zserio::PackedArrayTraits< ARRAY_TRAITS, typename >

Packed array traits.

Packed array traits are used for all packable built-in types. Works with a single DeltaContext.

Definition at line 1819 of file ArrayTraits.h.

Member Typedef Documentation

◆ ArrayTraits

template<typename ARRAY_TRAITS , typename = void>
using zserio::PackedArrayTraits< ARRAY_TRAITS, typename >::ArrayTraits = ARRAY_TRAITS

Typedef for array traits.

Definition at line 1823 of file ArrayTraits.h.

◆ ElementType

template<typename ARRAY_TRAITS , typename = void>
using zserio::PackedArrayTraits< ARRAY_TRAITS, typename >::ElementType = typename ARRAY_TRAITS::ElementType

Element type.

Definition at line 1826 of file ArrayTraits.h.

Member Function Documentation

◆ bitSizeOf()

template<typename ARRAY_TRAITS , typename = void>
static size_t zserio::PackedArrayTraits< ARRAY_TRAITS, typename >::bitSizeOf ( DeltaContext deltaContext,
size_t  ,
ElementType  element 
)
inlinestatic

Returns length of the array element stored in the bit stream in bits.

Available for traits which do not need the owner.

Parameters
deltaContextDelta context.
elementCurrent element.
Returns
Length of the array element stored in the bit stream in bits.

Definition at line 1851 of file ArrayTraits.h.

◆ initContext()

template<typename ARRAY_TRAITS , typename = void>
static void zserio::PackedArrayTraits< ARRAY_TRAITS, typename >::initContext ( DeltaContext deltaContext,
ElementType  element 
)
inlinestatic

Calls context initialization step for the current element.

Available for traits which do not need the owner.

Parameters
deltaContextDelta context.
elementCurrent element.

Definition at line 1836 of file ArrayTraits.h.

◆ initializeOffsets()

template<typename ARRAY_TRAITS , typename = void>
static size_t zserio::PackedArrayTraits< ARRAY_TRAITS, typename >::initializeOffsets ( DeltaContext deltaContext,
size_t  bitPosition,
ElementType  element 
)
inlinestatic

Calls indexed offsets initialization for the current element.

Available for traits which do not need the owner.

Parameters
deltaContextDelta context.
bitPositionCurrent bit stream position.
elementCurrent element.
Returns
Updated bit stream position which points to the first bit after this element.

Definition at line 1867 of file ArrayTraits.h.

◆ read()

template<typename ARRAY_TRAITS , typename = void>
static ElementType zserio::PackedArrayTraits< ARRAY_TRAITS, typename >::read ( DeltaContext deltaContext,
BitStreamReader in,
size_t  = 0 
)
inlinestatic

Reads an element from the bit stream.

Available for traits which do not need the owner.

Parameters
deltaContextDelta context.
inBit stream reader.
Returns
Read element value.

Definition at line 1882 of file ArrayTraits.h.

◆ write()

template<typename ARRAY_TRAITS , typename = void>
static void zserio::PackedArrayTraits< ARRAY_TRAITS, typename >::write ( DeltaContext deltaContext,
BitStreamWriter out,
ElementType  element 
)
inlinestatic

Writes the element to the bit stream.

Available for traits which do not need the owner.

Parameters
deltaContextDelta context.
outBit stream writer.
elementElement to write.

Definition at line 1896 of file ArrayTraits.h.


The documentation for this class was generated from the following file: