Zserio C++17 runtime library  0.5.0
Built for Zserio 2.17.0
zserio::DataView< T > Class Template Reference

#include <DataView.h>

Inheritance diagram for zserio::DataView< T >:
Collaboration diagram for zserio::DataView< T >:

Public Member Functions

template<typename... ARGS>
 DataView (BitStreamReader &reader, T &&data, ARGS &&... arguments)
 
template<typename... ARGS>
 DataView (const T &data, ARGS &&... arguments)
 
template<typename... ARGS>
 DataView (T &&data, ARGS &&... arguments)
 
 DataView (const DataView &other)
 
 DataView (DataView &&other)
 
 ~DataView ()=default
 
DataViewoperator= (const DataView &other)=delete
 
DataViewoperator= (DataView &&other)=delete
 

Detailed Description

template<class T>
class zserio::DataView< T >

DataView utility class which has interface of View but includes data as well. Data access is read only. This utility is useful to manage data lifetime while working with view.

Definition at line 15 of file DataView.h.

Constructor & Destructor Documentation

◆ DataView() [1/5]

template<class T >
template<typename... ARGS>
zserio::DataView< T >::DataView ( BitStreamReader reader,
T &&  data,
ARGS &&...  arguments 
)
inline

Read constructor used from deserialize (doesn't need to do validation).

Parameters
readerBit stream reader.
dataData structure.
argumentsParameters in case of parameterized types.

Definition at line 26 of file DataView.h.

◆ DataView() [2/5]

template<class T >
template<typename... ARGS>
zserio::DataView< T >::DataView ( const T &  data,
ARGS &&...  arguments 
)
inlineexplicit

Data constructor which performs validation.

Parameters
dataData structure l-value to be copied into the new DataView.
argumentsParameters in case of parameterized types.

Definition at line 40 of file DataView.h.

◆ DataView() [3/5]

template<class T >
template<typename... ARGS>
zserio::DataView< T >::DataView ( T &&  data,
ARGS &&...  arguments 
)
inlineexplicit

Data constructor which performs validation.

Parameters
dataData structure r-value to be moved into the new DataView.
argumentsParameters in case of parameterized types.

Definition at line 55 of file DataView.h.

◆ DataView() [4/5]

template<class T >
zserio::DataView< T >::DataView ( const DataView< T > &  other)
inline

Copy constructor.

Parameters
otherOther data view to copy construct from.

Definition at line 68 of file DataView.h.

◆ DataView() [5/5]

template<class T >
zserio::DataView< T >::DataView ( DataView< T > &&  other)
inline

Move constructor.

Parameters
otherOther data view to move construct from.

Definition at line 78 of file DataView.h.

◆ ~DataView()

template<class T >
zserio::DataView< T >::~DataView ( )
default

Member Function Documentation

◆ operator=() [1/2]

template<class T >
DataView& zserio::DataView< T >::operator= ( const DataView< T > &  other)
delete

Explicitly deleted assignment operator.

◆ operator=() [2/2]

template<class T >
DataView& zserio::DataView< T >::operator= ( DataView< T > &&  other)
delete

Explicitly deleted assignment operator.


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