26 #ifndef GRIDCONTAINER_SERIALIZATION_GRIDCONTAINER_H 27 #define GRIDCONTAINER_SERIALIZATION_GRIDCONTAINER_H 29 #include <type_traits> 31 #include <boost/serialization/vector.hpp> 32 #include <boost/serialization/split_free.hpp> 39 namespace serialization {
43 template<
class Archive,
typename GridCellManager,
typename... AxesTypes>
46 for (
auto& cell : grid) {
53 template<
class Archive,
typename GridCellManager,
typename... AxesTypes>
56 for (
auto& cell : grid) {
66 template<
class Archive,
typename GridCellManager,
typename... AxesTypes>
69 for (
auto& cell : grid) {
76 template<
class Archive,
typename GridCellManager,
typename... AxesTypes>
79 for (
auto& cell : grid) {
92 template<
class Archive,
typename GridCellManager,
typename... AxesTypes>
95 "Boost serialization of GridContainer with unsupported GridCellManager");
96 split_free(ar, grid, version);
104 template<
class Archive,
typename GridCellManager,
typename... AxesTypes>
106 const unsigned int) {
113 template <
typename T>
123 template<
class Archive,
typename GridCellManager,
typename... AxesTypes>
125 const unsigned int) {
void save_construct_data(Archive &ar, const Euclid::GridContainer::GridAxis< T > *t, const unsigned int)
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 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)
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()
const std::tuple< GridAxis< AxesTypes >... > & getAxesTuple() const
Returns a tuple containing the information of all the grid axes.