ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
Utils::MemcpyIArchive Class Reference

Archive that deserializes from a buffer via memcpy. More...

#include <memcpy_archive.hpp>

+ Inheritance diagram for Utils::MemcpyIArchive:
+ Collaboration diagram for Utils::MemcpyIArchive:

Public Types

using is_loading = boost::mpl::true_
 
using is_saving = boost::mpl::false_
 

Public Member Functions

 MemcpyIArchive (Utils::Span< char > buf)
 
std::size_t bytes_read () const
 Number of bytes read from the buffer.
 
template<class T >
MemcpyIArchiveoperator& (T &value)
 

Detailed Description

Archive that deserializes from a buffer via memcpy.

Can only process types that have a static serialization size, e.g. that serialize to the same number of bytes independent of the state of the object. This can either be automatically detected for types that are trivially copyable, or by explicitly assured by specializing is_statically_serializable to std::true_type.

Definition at line 165 of file memcpy_archive.hpp.

Member Typedef Documentation

◆ is_loading

using Utils::MemcpyIArchive::is_loading = boost::mpl::true_

Definition at line 170 of file memcpy_archive.hpp.

◆ is_saving

using Utils::MemcpyIArchive::is_saving = boost::mpl::false_

Definition at line 171 of file memcpy_archive.hpp.

Constructor & Destructor Documentation

◆ MemcpyIArchive()

Utils::MemcpyIArchive::MemcpyIArchive ( Utils::Span< char >  buf)
inlineexplicit
Parameters
bufBuffer to read from.

Definition at line 176 of file memcpy_archive.hpp.

Member Function Documentation

◆ bytes_read()

std::size_t Utils::MemcpyIArchive::bytes_read ( ) const
inline

Number of bytes read from the buffer.

Returns
Number of bytes read.

Definition at line 182 of file memcpy_archive.hpp.

◆ operator&()

template<class T >
MemcpyIArchive & Utils::MemcpyIArchive::operator& ( T &  value)
inline

Definition at line 188 of file memcpy_archive.hpp.


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