Zserio C++ runtime library  1.3.0
Built for Zserio 2.18.0
zserio::StdIntArrayTraits< T > Struct 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>
struct zserio::StdIntArrayTraits< T >

Array traits for fixed integer Zserio types (int16, uint16, int32, uint32, etc...).

Definition at line 391 of file ArrayTraits.h.

Member Typedef Documentation

◆ ElementType

template<typename T >
using zserio::StdIntArrayTraits< T >::ElementType = T

Element type.

Definition at line 394 of file ArrayTraits.h.

Member Function Documentation

◆ bitSizeOf() [1/3]

template<typename T >
static size_t zserio::StdIntArrayTraits< T >::bitSizeOf ( )
inlinestatic

Calculates bit size of the array element.

Returns
Bit size of the array element.

Definition at line 401 of file ArrayTraits.h.

◆ bitSizeOf() [2/3]

template<typename T >
static size_t zserio::StdIntArrayTraits< T >::bitSizeOf ( ElementType  )
inlinestatic

Calculates bit size of the array element.

Returns
Bit size of the array element.

Definition at line 411 of file ArrayTraits.h.

◆ bitSizeOf() [3/3]

template<typename T >
static size_t zserio::StdIntArrayTraits< T >::bitSizeOf ( size_t  ,
ElementType   
)
inlinestatic

Calculates bit size of the array element.

Returns
Bit size of the array element.

Definition at line 421 of file ArrayTraits.h.

◆ initializeOffsets()

template<typename T >
static size_t zserio::StdIntArrayTraits< T >::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 433 of file ArrayTraits.h.

◆ read()

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

Reads the single array element.

Parameters
inBit stream reader.
Returns
Read element.

Definition at line 445 of file ArrayTraits.h.

◆ write()

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

Writes the single array element.

Parameters
outBit stream writer to use.
elementElement to write.

Definition at line 456 of file ArrayTraits.h.

Member Data Documentation

◆ IS_BITSIZEOF_CONSTANT

template<typename T >
constexpr bool zserio::StdIntArrayTraits< T >::IS_BITSIZEOF_CONSTANT = true
staticconstexpr

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

Definition at line 462 of file ArrayTraits.h.


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