From e53b402a4cb0952691343c76c9124b0169ec29ba Mon Sep 17 00:00:00 2001 From: Georg Hagen Date: Sun, 9 Feb 2025 02:13:35 +0100 Subject: [PATCH] Add String support --- .../Extensions/YamlCppConverters.hpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/openVulkanoCpp/Extensions/YamlCppConverters.hpp b/openVulkanoCpp/Extensions/YamlCppConverters.hpp index 3586dac..6f44676 100644 --- a/openVulkanoCpp/Extensions/YamlCppConverters.hpp +++ b/openVulkanoCpp/Extensions/YamlCppConverters.hpp @@ -16,12 +16,32 @@ #include "Math/RGB565.hpp" #include "Math/RGBA5551.hpp" #include "Math/Timestamp.hpp" +#include "Data/Containers/String.hpp" #include #include #include namespace YAML { + template<> + struct convert + { + static Node encode(const OpenVulkano::String& string) + { + return Node(static_cast(string)); + } + + static bool decode(const Node& node, OpenVulkano::String& string) + { + if (node.IsScalar()) + { + string = node.as(); + return true; + } + return false; + } + }; + template<> struct convert {