diff --git a/openVulkanoCpp/Extensions/YamlCppConverters.hpp b/openVulkanoCpp/Extensions/YamlCppConverters.hpp new file mode 100644 index 0000000..06cf32d --- /dev/null +++ b/openVulkanoCpp/Extensions/YamlCppConverters.hpp @@ -0,0 +1,32 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include +#include + +namespace YAML +{ + template<> + struct convert + { + static Node encode(const stud::uuid& uuid) + { + return Node(uuid.string()); + } + + static bool decode(const Node& node, stud::uuid& uuid) + { + if (node.IsScalar()) + { + uuid.assign(node.Scalar()); + return true; + } + return false; + } + }; +} \ No newline at end of file