ECSTASY
All in the name
Loading...
Searching...
No Matches
TomlConversion.hpp
Go to the documentation of this file.
1
11
12#ifndef UTIL_SERIALIZATION_TOML_TOMLCONVERSION_HPP_
13#define UTIL_SERIALIZATION_TOML_TOMLCONVERSION_HPP_
14
16#include <toml++/toml.h>
17
18namespace util::serialization
19{
21 public:
32 [[nodiscard]] static toml::date toToml(const INode::Date &date) noexcept;
33
44 [[nodiscard]] static toml::time toToml(const INode::Time &time) noexcept;
45
56 [[nodiscard]] static toml::date_time toToml(const INode::DateTime &dateTime) noexcept;
57
68 [[nodiscard]] static INode::Date fromToml(const toml::date &date) noexcept;
69
80 [[nodiscard]] static INode::Time fromToml(const toml::time &time) noexcept;
81
92 [[nodiscard]] static INode::DateTime fromToml(const toml::date_time &dateTime) noexcept;
93
94 private:
95 TomlConversion() = default;
96 };
97} // namespace util::serialization
98
99#endif /* !UTIL_SERIALIZATION_TOML_TOMLCONVERSION_HPP_ */
Serialization node interface.
std::chrono::high_resolution_clock::time_point DateTime
Type::DateTime underlying type.
Definition INode.hpp:64
static toml::date toToml(const INode::Date &date) noexcept
Convert a INode::Date to a toml::date.
static INode::Date fromToml(const toml::date &date) noexcept
Convert a toml::date to a INode::Date.