DIY 3.0 data-parallel out-of-core C++ library

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Typedefs Groups Pages
Static Public Member Functions | List of all members
diy::Serialization< T > Struct Template Reference
Serialization

Main interface to serialization, meant to be specialized for the types that require special handling. `diy::save()` and `diy::load()` call the static member functions of this class. More...

`#include <diy/serialization.hpp>`

Inheritance diagram for diy::Serialization< T >:

## Static Public Member Functions
static void | save (BinaryBuffer &bb, const T &x)
static void | load (BinaryBuffer &bb, T &x)

## Detailed Description

### template<class T>
struct diy::Serialization< T >

Main interface to serialization, meant to be specialized for the types that require special handling. `diy::save()` and `diy::load()` call the static member functions of this class.

The default (unspecialized) version copies `sizeof(T)` bytes from `&x` to or from `bb` via its `diy::BinaryBuffer::save_binary()` and `diy::BinaryBuffer::load_binary()` functions. This works out perfectly for plain old data (e.g., simple structs). To save a more complicated type, one has to specialize `diy::Serialization<T>` for that type. Specializations are already provided for `std::vector<T>`, `std::map<K,V>`, and `std::pair<T,U>`. As a result one can quickly add a specialization of one's own

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

- include/diy/serialization.hpp