33 lines
726 B
C++
Executable File
33 lines
726 B
C++
Executable File
#pragma once
|
|
#include "DeerCore/DataStore/DataStructure.h"
|
|
#include "DeerCore/Tools/Path.h"
|
|
|
|
#include "cereal/cereal.hpp"
|
|
#include "cereal/types/string.hpp"
|
|
|
|
#include <string>
|
|
|
|
namespace cereal {
|
|
template <class Archive>
|
|
void save(Archive& archive,
|
|
std::filesystem::path const& path) {
|
|
archive(path.generic_string());
|
|
}
|
|
|
|
template <class Archive>
|
|
void load(Archive& archive,
|
|
std::filesystem::path& path) {
|
|
std::string _path;
|
|
archive(_path);
|
|
path = std::filesystem::path(_path);
|
|
}
|
|
} // namespace cereal
|
|
|
|
namespace Deer {
|
|
|
|
template <class Archive>
|
|
void serialize(Archive& archive,
|
|
DataStructure& ds) {
|
|
archive(ds.dataPath, ds.dataStart, ds.dataSize);
|
|
}
|
|
} // namespace Deer
|