KaMPIng 0.1.0
(Near) zero-overhead C++ MPI bindings.
Loading...
Searching...
No Matches
kamping::internal::SerializationBuffer< OutArchive, InArchive, Allocator, DataBufferType > Class Template Reference

Buffer holding serialized data. More...

#include <serialization.hpp>

Public Types

using data_type
 Type of the encapsulated object to serialize/deserialize.
 
using value_type = char
 Type of the elements in the buffer.
 

Public Member Functions

 SerializationBuffer (DataBufferType &&object)
 Construct a serialization buffer from a GenericDataBuffer containing the object to serialize/deserialize into.
 
void serialize ()
 Serialize the object into the character buffer stored internally.
 
DataBufferType extract () &&
 Extract the GenericDataBuffer containing the encapsulated object.
 
void deserialize ()
 Deserialize from the character buffer stored internally into the encapsulated object.
 
chardata () noexcept
 Access the underlying buffer.
 
char constdata () const noexcept
 Access the underlying buffer.
 
void resize (size_t size)
 Resize the underlying buffer.
 
size_t size () const
 Access the size of the underlying buffer.
 

Detailed Description

template<typename OutArchive, typename InArchive, typename Allocator, typename DataBufferType>
class kamping::internal::SerializationBuffer< OutArchive, InArchive, Allocator, DataBufferType >

Buffer holding serialized data.

This uses cereal to serialize and deserialize objects.

Template Parameters
OutArchiveType of the archive to use for serialization.
InArchiveType of the archive to use for deserialization.
AllocatorType of the allocator to use for the buffer holding the serialized data.
DataBufferTypeType of the GenericDataBuffer holding the data to serialize/deserialize into.

Member Typedef Documentation

◆ data_type

Initial value:
typename DataBufferType::value_type

Type of the encapsulated object to serialize/deserialize.

Member Function Documentation

◆ resize()

Resize the underlying buffer.

Parameters
sizeNew size of the buffer.

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