Zserio C++ runtime library  1.2.0
Built for Zserio 2.16.0
zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type > Class Template Reference

#include <ArrayTraits.h>

Public Types

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

Static Public Member Functions

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

Detailed Description

template<typename ARRAY_TRAITS>
class zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type >

Specialization of packed array traits for traits which needs the array's owner.

This packed array traits are used for all packable built-in types which needs the array's owner.

Definition at line 1908 of file ArrayTraits.h.

Member Typedef Documentation

◆ ArrayTraits

template<typename ARRAY_TRAITS >
using zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type >::ArrayTraits = ARRAY_TRAITS

Typedef for array traits.

Definition at line 1912 of file ArrayTraits.h.

◆ ElementType

template<typename ARRAY_TRAITS >
using zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type >::ElementType = typename ARRAY_TRAITS::ElementType

Element type.

Definition at line 1915 of file ArrayTraits.h.

◆ OwnerType

template<typename ARRAY_TRAITS >
using zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type >::OwnerType = typename ARRAY_TRAITS::OwnerType

Typedef for the array's owner type.

Definition at line 1918 of file ArrayTraits.h.

Member Function Documentation

◆ bitSizeOf()

template<typename ARRAY_TRAITS >
static size_t zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type >::bitSizeOf ( const OwnerType owner,
DeltaContext deltaContext,
size_t  ,
ElementType  element 
)
inlinestatic

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

Available for traits which need the owner.

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

Definition at line 1945 of file ArrayTraits.h.

◆ initContext()

template<typename ARRAY_TRAITS >
static void zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type >::initContext ( const OwnerType owner,
DeltaContext deltaContext,
ElementType  element 
)
inlinestatic

Calls context initialization step for the current element.

Available for traits which need the owner.

Parameters
ownerOwner of the current array.
deltaContextDelta context node which keeps the context.
elementCurrent element.

Definition at line 1929 of file ArrayTraits.h.

◆ initializeOffsets()

template<typename ARRAY_TRAITS >
static size_t zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type >::initializeOffsets ( const OwnerType owner,
DeltaContext deltaContext,
size_t  bitPosition,
ElementType  element 
)
inlinestatic

Calls indexed offsets initialization for the current element.

Available for traits which need the owner.

Parameters
ownerOwner of the current array.
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 1962 of file ArrayTraits.h.

◆ read()

template<typename ARRAY_TRAITS >
static ElementType zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type >::read ( const OwnerType owner,
DeltaContext deltaContext,
BitStreamReader in,
size_t  = 0 
)
inlinestatic

Reads an element from the bit stream.

Available for traits which need the owner.

Parameters
ownerOwner of the current array.
deltaContextDelta context.
inBit stream reader.
Returns
Read element value.

Definition at line 1979 of file ArrayTraits.h.

◆ write()

template<typename ARRAY_TRAITS >
static void zserio::PackedArrayTraits< ARRAY_TRAITS, typename std::enable_if< has_owner_type< ARRAY_TRAITS >::value >::type >::write ( const OwnerType owner,
DeltaContext deltaContext,
BitStreamWriter out,
ElementType  element 
)
inlinestatic

Writes the element to the bit stream.

Available for traits which need the owner.

Parameters
ownerOwner of the current array.
deltaContextDelta context.
outBit stream writer.
elementElement to write.

Definition at line 1994 of file ArrayTraits.h.


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