Add UUID.hpp
This commit is contained in:
14
openVulkanoCpp/Base/UUID.hpp
Normal file
14
openVulkanoCpp/Base/UUID.hpp
Normal 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;
|
||||||
|
}
|
||||||
@@ -6,20 +6,20 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "Base/UUID.hpp"
|
||||||
#include <yaml-cpp/yaml.h>
|
#include <yaml-cpp/yaml.h>
|
||||||
#include <libstud/uuid.hxx>
|
|
||||||
|
|
||||||
namespace YAML
|
namespace YAML
|
||||||
{
|
{
|
||||||
template<>
|
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());
|
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())
|
if (node.IsScalar())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user