Zserio C++ runtime library  1.1.0
Built for Zserio 2.15.0
zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename > Class Template Reference

#include <ArrayTraits.h>

Public Types

using ElementType = T
 

Static Public Member Functions

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

Static Public Attributes

static constexpr bool IS_BITSIZEOF_CONSTANT = true
 

Detailed Description

template<typename T, typename ELEMENT_BIT_SIZE, typename = void>
class zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename >

Array traits for dynamic bit field Zserio types with dynamic bit size (int<bitSize> or bit<bitSize>).

Used for dynamic bit fields with length known at compile time - i.e. which depends on a constant expression and doesn't need an owner.

Definition at line 216 of file ArrayTraits.h.

Member Typedef Documentation

◆ ElementType

template<typename T , typename ELEMENT_BIT_SIZE , typename = void>
using zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename >::ElementType = T

Element type.

Definition at line 220 of file ArrayTraits.h.

Member Function Documentation

◆ bitSizeOf() [1/3]

template<typename T , typename ELEMENT_BIT_SIZE , typename = void>
static size_t zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename >::bitSizeOf ( )
inlinestatic

Calculates bit size of the array element.

Returns
Bit size of the array element.

Definition at line 227 of file ArrayTraits.h.

◆ bitSizeOf() [2/3]

template<typename T , typename ELEMENT_BIT_SIZE , typename = void>
static size_t zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename >::bitSizeOf ( ElementType  )
inlinestatic

Calculates bit size of the array element.

Returns
Bit size of the array element.

Definition at line 237 of file ArrayTraits.h.

◆ bitSizeOf() [3/3]

template<typename T , typename ELEMENT_BIT_SIZE , typename = void>
static size_t zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename >::bitSizeOf ( size_t  ,
ElementType   
)
inlinestatic

Calculates bit size of the array element.

Returns
Bit size of the array element.

Definition at line 247 of file ArrayTraits.h.

◆ initializeOffsets()

template<typename T , typename ELEMENT_BIT_SIZE , typename = void>
static size_t zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename >::initializeOffsets ( size_t  bitPosition,
ElementType   
)
inlinestatic

Initializes indexed offsets of the single array element.

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

Definition at line 259 of file ArrayTraits.h.

◆ read()

template<typename T , typename ELEMENT_BIT_SIZE , typename = void>
static ElementType zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename >::read ( BitStreamReader in,
size_t  = 0 
)
inlinestatic

Reads the single array element.

Parameters
inBit stream reader.
Returns
Read element.

Definition at line 271 of file ArrayTraits.h.

◆ write()

template<typename T , typename ELEMENT_BIT_SIZE , typename = void>
static void zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename >::write ( BitStreamWriter out,
ElementType  element 
)
inlinestatic

Writes the single array element.

Parameters
outBit stream writer to use.
elementElement to write.

Definition at line 282 of file ArrayTraits.h.

Member Data Documentation

◆ IS_BITSIZEOF_CONSTANT

template<typename T , typename ELEMENT_BIT_SIZE , typename = void>
constexpr bool zserio::DynamicBitFieldArrayTraits< T, ELEMENT_BIT_SIZE, typename >::IS_BITSIZEOF_CONSTANT = true
staticconstexpr

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

Definition at line 288 of file ArrayTraits.h.


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