Add String support

This commit is contained in:
Georg Hagen
2025-02-09 02:13:35 +01:00
parent ba475e6696
commit e53b402a4c

View File

@@ -16,12 +16,32 @@
#include "Math/RGB565.hpp"
#include "Math/RGBA5551.hpp"
#include "Math/Timestamp.hpp"
#include "Data/Containers/String.hpp"
#include <yaml-cpp/yaml.h>
#include <fmt/format.h>
#include <c4/format.hpp>
namespace YAML
{
template<>
struct convert<OpenVulkano::String>
{
static Node encode(const OpenVulkano::String& string)
{
return Node(static_cast<const std::string&>(string));
}
static bool decode(const Node& node, OpenVulkano::String& string)
{
if (node.IsScalar())
{
string = node.as<std::string>();
return true;
}
return false;
}
};
template<>
struct convert<OpenVulkano::UUID>
{