25 #ifndef GRIDCONTAINER_SERIALIZE_H
26 #define GRIDCONTAINER_SERIALIZE_H
30 #include <boost/archive/binary_iarchive.hpp>
31 #include <boost/archive/binary_oarchive.hpp>
32 #include <boost/filesystem.hpp>
37 namespace GridContainer {
57 template<
typename OArchive,
typename GridCellManager,
typename... AxesTypes>
60 const GridContainer<GridCellManager, AxesTypes...>* ptr = &grid;
82 template<
typename Gr
idType,
typename IArchive>
102 template<
typename GridCellManager,
typename... AxesTypes>
104 gridExport<boost::archive::binary_oarchive>(out, grid);
114 template<
typename Gr
idType>
116 return gridImport<GridType, boost::archive::binary_iarchive>(in);
142 template<
typename GridCellManager,
typename... AxesTypes>
145 const GridContainer<GridCellManager, AxesTypes...>& grid);
158 template<
typename Gr
idType>
159 GridType
gridFitsImport(
const boost::filesystem::path& filename,
int hdu_index);
void gridExport(std::ostream &out, const GridContainer< GridCellManager, AxesTypes...> &grid)
Export to the given output stream the given grid. The archive type is templated.
GridType gridImport(std::istream &in)
Imports from the given stream a grid.
void gridBinaryExport(std::ostream &out, const GridContainer< GridCellManager, AxesTypes...> &grid)
Exports to the given output stream the given grid.
void gridFitsExport(const boost::filesystem::path &filename, const std::string &hdu_name, const GridContainer< GridCellManager, AxesTypes...> &grid)
Exports a Grid as a FITS file.
GridType gridBinaryImport(std::istream &in)
Imports from the given stream a grid.
GridType gridFitsImport(const boost::filesystem::path &filename, int hdu_index)
Imports a Grid from a FITS file.