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

Archive that serializes to a buffer via memcpy. More...

#include <memcpy_archive.hpp>

+ Inheritance diagram for Utils::MemcpyOArchive:
+ Collaboration diagram for Utils::MemcpyOArchive:

Public Types

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

Public Member Functions

 MemcpyOArchive (Utils::Span< char > buf)
 
std::size_t bytes_written () const
 Number of bytes written to the buffer.
 
template<class T >
MemcpyOArchiveoperator& (T &value)
 

Detailed Description

Archive that serializes to 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 200 of file memcpy_archive.hpp.

Member Typedef Documentation

◆ is_loading

using Utils::MemcpyOArchive::is_loading = boost::mpl::false_

Definition at line 204 of file memcpy_archive.hpp.

◆ is_saving

using Utils::MemcpyOArchive::is_saving = boost::mpl::true_

Definition at line 205 of file memcpy_archive.hpp.

Constructor & Destructor Documentation

◆ MemcpyOArchive()

Utils::MemcpyOArchive::MemcpyOArchive ( Utils::Span< char >  buf)
inlineexplicit
Parameters
bufBuffer to write to.

Definition at line 210 of file memcpy_archive.hpp.

Member Function Documentation

◆ bytes_written()

std::size_t Utils::MemcpyOArchive::bytes_written ( ) const
inline

Number of bytes written to the buffer.

Returns
Number of bytes written.

Definition at line 216 of file memcpy_archive.hpp.

◆ operator&()

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

Definition at line 222 of file memcpy_archive.hpp.


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