26 #ifndef GRIDCONTAINER_SERIALIZATION_GRIDCONTAINER_H
27 #define GRIDCONTAINER_SERIALIZATION_GRIDCONTAINER_H
33 #include <boost/serialization/split_free.hpp>
34 #include <boost/serialization/vector.hpp>
36 #include <type_traits>
39 namespace serialization {
43 template <
class Archive,
typename GridCellManager,
typename... AxesTypes>
47 for (
auto& cell : grid) {
54 template <
class Archive,
typename GridCellManager,
typename... AxesTypes>
58 for (
auto& cell : grid) {
68 template <
class Archive,
typename GridCellManager,
typename... AxesTypes>
72 for (
auto& cell : grid) {
79 template <
class Archive,
typename GridCellManager,
typename... AxesTypes>
83 for (
auto& cell : grid) {
96 template <
class Archive,
typename GridCellManager,
typename... AxesTypes>
99 "Boost serialization of GridContainer with unsupported GridCellManager");
100 split_free(ar, grid, version);
108 template <
class Archive,
typename GridCellManager,
typename... AxesTypes>
110 const unsigned int) {
117 template <
typename T>
127 template <
class Archive,
typename GridCellManager,
typename... AxesTypes>
const std::tuple< GridAxis< AxesTypes >...> & getAxesTuple() const
Returns a tuple containing the information of all the grid axes.
void save_construct_data(Archive &ar, const Euclid::GridContainer::GridAxis< T > *t, const unsigned int)
void save(Archive &ar, const Euclid::GridContainer::GridContainer< GridCellManager, AxesTypes...> &grid, const unsigned int, typename std::enable_if< std::is_default_constructible< typename Euclid::GridContainer::GridCellManagerTraits< GridCellManager >::data_type >::value >::type *=0)
Class used by the GridContainer to access the different CellManagers.
void load(Archive &ar, Euclid::GridContainer::GridContainer< GridCellManager, AxesTypes...> &grid, const unsigned int, typename std::enable_if< std::is_default_constructible< typename Euclid::GridContainer::GridCellManagerTraits< GridCellManager >::data_type >::value >::type *=0)
Provides information related with an axis of a GridContainer.
void serialize(Archive &archive, std::array< CellType, ND > &array, const unsigned int)
void load_construct_data(Archive &ar, Euclid::GridContainer::GridAxis< T > *t, const unsigned int)
GridCellManager::data_type data_type
The type of the data kept by the GridCellManager.
Euclid::GridContainer::GridAxis< T > emptyGridAxis()