Zserio C++ runtime library  1.1.0
Built for Zserio 2.15.0
zserio::DeltaContext Class Reference

#include <DeltaContext.h>

Public Member Functions

template<typename ARRAY_TRAITS , typename OWNER_TYPE >
void init (const OWNER_TYPE &owner, typename ARRAY_TRAITS::ElementType element)
 
template<typename ARRAY_TRAITS , typename OWNER_TYPE >
size_t bitSizeOf (const OWNER_TYPE &owner, typename ARRAY_TRAITS::ElementType element)
 
template<typename ARRAY_TRAITS , typename OWNER_TYPE >
ARRAY_TRAITS::ElementType read (const OWNER_TYPE &owner, BitStreamReader &in)
 
template<typename ARRAY_TRAITS , typename OWNER_TYPE >
void write (const OWNER_TYPE &owner, BitStreamWriter &out, typename ARRAY_TRAITS::ElementType element)
 
template<typename ARRAY_TRAITS >
void init (typename ARRAY_TRAITS::ElementType element)
 
template<typename ARRAY_TRAITS >
size_t bitSizeOf (typename ARRAY_TRAITS::ElementType element)
 
template<typename ARRAY_TRAITS >
ARRAY_TRAITS::ElementType read (BitStreamReader &in)
 
template<typename ARRAY_TRAITS >
void write (BitStreamWriter &out, typename ARRAY_TRAITS::ElementType element)
 
 DeltaContext ()=default
 
 ~DeltaContext ()=default
 
 DeltaContext (DeltaContext &&other)=default
 
DeltaContextoperator= (DeltaContext &&other)=default
 
 DeltaContext (const DeltaContext &other)=default
 
DeltaContextoperator= (const DeltaContext &other)=default
 

Detailed Description

Context for delta packing created for each packable field.

Contexts are always newly created for each array operation (bitSizeOfPacked, initializeOffsetsPacked, readPacked, writePacked). They must be initialized at first via calling the init method for each packable element present in the array. After the full initialization, only a single method (bitSizeOf, read, write) can be repeatedly called for exactly the same sequence of packable elements.

Definition at line 62 of file DeltaContext.h.

Constructor & Destructor Documentation

◆ DeltaContext() [1/3]

zserio::DeltaContext::DeltaContext ( )
default

Method generated by default.

◆ ~DeltaContext()

zserio::DeltaContext::~DeltaContext ( )
default

Method generated by default.

◆ DeltaContext() [2/3]

zserio::DeltaContext::DeltaContext ( DeltaContext &&  other)
default

Method generated by default.

◆ DeltaContext() [3/3]

zserio::DeltaContext::DeltaContext ( const DeltaContext other)
default

Method generated by default.

Member Function Documentation

◆ bitSizeOf() [1/2]

template<typename ARRAY_TRAITS , typename OWNER_TYPE >
size_t zserio::DeltaContext::bitSizeOf ( const OWNER_TYPE &  owner,
typename ARRAY_TRAITS::ElementType  element 
)
inline

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

Parameters
ownerOwner of the packed element.
elementValue of the current element.
Returns
Length of the packed element stored in the bit stream in bits.

Definition at line 127 of file DeltaContext.h.

◆ bitSizeOf() [2/2]

template<typename ARRAY_TRAITS >
size_t zserio::DeltaContext::bitSizeOf ( typename ARRAY_TRAITS::ElementType  element)
inline

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

Parameters
elementValue of the current element.
Returns
Length of the packed element stored in the bit stream in bits.

Definition at line 238 of file DeltaContext.h.

◆ init() [1/2]

template<typename ARRAY_TRAITS , typename OWNER_TYPE >
void zserio::DeltaContext::init ( const OWNER_TYPE &  owner,
typename ARRAY_TRAITS::ElementType  element 
)
inline

Calls the initialization step for a single element.

Parameters
ownerOwner of the packed element.
elementCurrent element.

Definition at line 87 of file DeltaContext.h.

◆ init() [2/2]

template<typename ARRAY_TRAITS >
void zserio::DeltaContext::init ( typename ARRAY_TRAITS::ElementType  element)
inline

Calls the initialization step for a single element.

Parameters
elementCurrent element.

Definition at line 225 of file DeltaContext.h.

◆ operator=() [1/2]

DeltaContext& zserio::DeltaContext::operator= ( const DeltaContext other)
default

Method generated by default.

◆ operator=() [2/2]

DeltaContext& zserio::DeltaContext::operator= ( DeltaContext &&  other)
default

Method generated by default.

◆ read() [1/2]

template<typename ARRAY_TRAITS >
ARRAY_TRAITS::ElementType zserio::DeltaContext::read ( BitStreamReader in)
inline

Reads a packed element from the bit stream.

Parameters
inBit stream reader.
Returns
Value of the packed element.

Definition at line 251 of file DeltaContext.h.

◆ read() [2/2]

template<typename ARRAY_TRAITS , typename OWNER_TYPE >
ARRAY_TRAITS::ElementType zserio::DeltaContext::read ( const OWNER_TYPE &  owner,
BitStreamReader in 
)
inline

Reads a packed element from the bit stream.

Parameters
ownerOwner of the packed element.
inBit stream reader.
Returns
Value of the packed element.

Definition at line 155 of file DeltaContext.h.

◆ write() [1/2]

template<typename ARRAY_TRAITS >
void zserio::DeltaContext::write ( BitStreamWriter out,
typename ARRAY_TRAITS::ElementType  element 
)
inline

Writes the packed element to the bit stream.

Parameters
outBit stream writer.
elementValue of the current element.

Definition at line 263 of file DeltaContext.h.

◆ write() [2/2]

template<typename ARRAY_TRAITS , typename OWNER_TYPE >
void zserio::DeltaContext::write ( const OWNER_TYPE &  owner,
BitStreamWriter out,
typename ARRAY_TRAITS::ElementType  element 
)
inline

Writes the packed element to the bit stream.

Parameters
ownerOwner of the packed element.
outBit stream writer.
elementValue of the current element.

Definition at line 191 of file DeltaContext.h.


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