Zserio C++ runtime library  1.2.0
Built for Zserio 2.16.0
zserio::ObjectArrayTraits< T, ELEMENT_FACTORY > Class Template Reference

#include <ArrayTraits.h>

Public Types

using ElementType = T
 
using allocator_type = typename ElementType::allocator_type
 
using OwnerType = typename ELEMENT_FACTORY::OwnerType
 

Static Public Member Functions

static size_t bitSizeOf (const OwnerType &, size_t bitPosition, const ElementType &element)
 
static size_t initializeOffsets (OwnerType &, size_t bitPosition, ElementType &element)
 
template<typename RAW_ARRAY >
static void read (OwnerType &owner, RAW_ARRAY &rawArray, BitStreamReader &in, size_t index)
 
static void write (const OwnerType &, BitStreamWriter &out, const ElementType &element)
 

Static Public Attributes

static constexpr bool IS_BITSIZEOF_CONSTANT = false
 

Detailed Description

template<typename T, typename ELEMENT_FACTORY>
class zserio::ObjectArrayTraits< T, ELEMENT_FACTORY >

Array traits for Zserio structure, choice and union types.

Definition at line 1733 of file ArrayTraits.h.

Member Typedef Documentation

◆ allocator_type

template<typename T , typename ELEMENT_FACTORY >
using zserio::ObjectArrayTraits< T, ELEMENT_FACTORY >::allocator_type = typename ElementType::allocator_type

Allocator type.

Definition at line 1740 of file ArrayTraits.h.

◆ ElementType

template<typename T , typename ELEMENT_FACTORY >
using zserio::ObjectArrayTraits< T, ELEMENT_FACTORY >::ElementType = T

Element type.

Definition at line 1737 of file ArrayTraits.h.

◆ OwnerType

template<typename T , typename ELEMENT_FACTORY >
using zserio::ObjectArrayTraits< T, ELEMENT_FACTORY >::OwnerType = typename ELEMENT_FACTORY::OwnerType

Typedef for the array's owner type.

Definition at line 1743 of file ArrayTraits.h.

Member Function Documentation

◆ bitSizeOf()

template<typename T , typename ELEMENT_FACTORY >
static size_t zserio::ObjectArrayTraits< T, ELEMENT_FACTORY >::bitSizeOf ( const OwnerType ,
size_t  bitPosition,
const ElementType element 
)
inlinestatic

Calculates bit size of the array element.

Parameters
bitPositionCurrent bit position.
elementElement to use for calculation.
Returns
Bit size of the array element.

Definition at line 1753 of file ArrayTraits.h.

◆ initializeOffsets()

template<typename T , typename ELEMENT_FACTORY >
static size_t zserio::ObjectArrayTraits< T, ELEMENT_FACTORY >::initializeOffsets ( OwnerType ,
size_t  bitPosition,
ElementType element 
)
inlinestatic

Initializes indexed offsets of the single array element.

Parameters
bitPositionCurrent bit position.
elementElement to use.
Returns
Updated bit position which points to the first bit after the array element.

Definition at line 1766 of file ArrayTraits.h.

◆ read()

template<typename T , typename ELEMENT_FACTORY >
template<typename RAW_ARRAY >
static void zserio::ObjectArrayTraits< T, ELEMENT_FACTORY >::read ( OwnerType owner,
RAW_ARRAY &  rawArray,
BitStreamReader in,
size_t  index 
)
inlinestatic

Reads the single array element.

Parameters
ownerOwner of the array.
rawArrayRaw array to use.
inBit stream reader.
indexIndex need in case of parameterized type which depends on the current index.

Definition at line 1780 of file ArrayTraits.h.

◆ write()

template<typename T , typename ELEMENT_FACTORY >
static void zserio::ObjectArrayTraits< T, ELEMENT_FACTORY >::write ( const OwnerType ,
BitStreamWriter out,
const ElementType element 
)
inlinestatic

Writes the single array element.

Parameters
outBit stream writer to use.
elementElement to write.

Definition at line 1791 of file ArrayTraits.h.

Member Data Documentation

◆ IS_BITSIZEOF_CONSTANT

template<typename T , typename ELEMENT_FACTORY >
constexpr bool zserio::ObjectArrayTraits< T, ELEMENT_FACTORY >::IS_BITSIZEOF_CONSTANT = false
staticconstexpr

Determines whether the bit size of the single element is constant.

Definition at line 1797 of file ArrayTraits.h.


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