22 lines
524 B
C++
22 lines
524 B
C++
#include "data.hpp"
|
|
#include "dynamic_grid.hpp"
|
|
|
|
#include <boost/archive/text_oarchive.hpp>
|
|
#include <boost/archive/text_iarchive.hpp>
|
|
#include <fstream>
|
|
|
|
AnalyzedGrid<DynamicGrid> grid_from_file(std::string file_path){
|
|
std::ifstream file(file_path);
|
|
boost::archive::text_iarchive ar(file);
|
|
|
|
AnalyzedGrid<DynamicGrid> ret;
|
|
ar >> ret;
|
|
return ret;
|
|
}
|
|
|
|
void grid_to_file(const AnalyzedGrid<DynamicGrid>& grid, std::string file_path){
|
|
std::ofstream file(file_path);
|
|
boost::archive::text_oarchive ar(file);
|
|
|
|
ar << grid;
|
|
}
|