HIBF 1.0.0-rc.1
Loading...
Searching...
No Matches
path.hpp
1// SPDX-FileCopyrightText: 2006-2024, Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024, Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
5#pragma once
6
7#include <filesystem> // for path
8#include <string> // for string
9
10#include <cereal/macros.hpp> // for CEREAL_LOAD_FUNCTION_NAME, CEREAL_SAVE_FUNCTION_NAME
11#include <cereal/types/string.hpp> // IWYU pragma: keep
12
13#include <hibf/platform.hpp>
14
15namespace cereal
16{
17
18template <typename archive_t>
19void CEREAL_SAVE_FUNCTION_NAME(archive_t & archive, std::filesystem::path const & path)
20{
21 std::string const str{path.string()};
22 archive(str);
23}
24
25template <typename archive_t>
26void CEREAL_LOAD_FUNCTION_NAME(archive_t & archive, std::filesystem::path & path)
27{
28 std::string str;
29 archive(str);
30 path.assign(str);
31}
32
33} // namespace cereal
Provides platform and dependency checks.