SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Private Attributes | List of all members
sirius::serializer Class Reference

Serialize and deserialize objects. More...

#include <serializer.hpp>

Public Member Functions

void copyin (uint8_t const *ptr__, size_t nbytes__)
 Copy n bytes into a serialization stream. More...
 
void copyout (uint8_t *ptr__, size_t nbytes__)
 Copy n bytes from the serialization stream. More...
 
void send_recv (mpi::Communicator const &comm__, int source__, int dest__)
 
std::vector< uint8_t > const & stream () const
 

Private Attributes

size_t pos_ {0}
 Position in the stream. This is used during unpacking. More...
 
std::vector< uint8_t > stream_
 Data stream is represendted as a sequence of characters. More...
 

Detailed Description

Serialize and deserialize objects.

Definition at line 35 of file serializer.hpp.

Member Function Documentation

◆ copyin()

void sirius::serializer::copyin ( uint8_t const *  ptr__,
size_t  nbytes__ 
)
inline

Copy n bytes into a serialization stream.

Definition at line 45 of file serializer.hpp.

◆ copyout()

void sirius::serializer::copyout ( uint8_t *  ptr__,
size_t  nbytes__ 
)
inline

Copy n bytes from the serialization stream.

When data is copied out, the position inside a stream is shifted to n bytes forward.

Definition at line 55 of file serializer.hpp.

◆ send_recv()

void sirius::serializer::send_recv ( mpi::Communicator const &  comm__,
int  source__,
int  dest__ 
)
inline

Definition at line 61 of file serializer.hpp.

◆ stream()

std::vector< uint8_t > const & sirius::serializer::stream ( ) const
inline

Definition at line 92 of file serializer.hpp.

Member Data Documentation

◆ pos_

size_t sirius::serializer::pos_ {0}
private

Position in the stream. This is used during unpacking.

Definition at line 39 of file serializer.hpp.

◆ stream_

std::vector<uint8_t> sirius::serializer::stream_
private

Data stream is represendted as a sequence of characters.

Definition at line 41 of file serializer.hpp.


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