Add UUID.hpp

This commit is contained in:
2023-10-30 16:18:20 +01:00
parent 45cb095561
commit ee8a6cb222
2 changed files with 18 additions and 4 deletions

View File

@@ -0,0 +1,14 @@
/*
* 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 <libstud/uuid.hxx>
namespace OpenVulkano
{
typedef stud::uuid UUID;
}

View File

@@ -6,20 +6,20 @@
#pragma once
#include "Base/UUID.hpp"
#include <yaml-cpp/yaml.h>
#include <libstud/uuid.hxx>
namespace YAML
{
template<>
struct convert<stud::uuid>
struct convert<OpenVulkano::UUID>
{
static Node encode(const stud::uuid& uuid)
static Node encode(const OpenVulkano::UUID& uuid)
{
return Node(uuid.string());
}
static bool decode(const Node& node, stud::uuid& uuid)
static bool decode(const Node& node, OpenVulkano::UUID& uuid)
{
if (node.IsScalar())
{