Add String support
This commit is contained in:
@@ -16,12 +16,32 @@
|
|||||||
#include "Math/RGB565.hpp"
|
#include "Math/RGB565.hpp"
|
||||||
#include "Math/RGBA5551.hpp"
|
#include "Math/RGBA5551.hpp"
|
||||||
#include "Math/Timestamp.hpp"
|
#include "Math/Timestamp.hpp"
|
||||||
|
#include "Data/Containers/String.hpp"
|
||||||
#include <yaml-cpp/yaml.h>
|
#include <yaml-cpp/yaml.h>
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include <c4/format.hpp>
|
#include <c4/format.hpp>
|
||||||
|
|
||||||
namespace YAML
|
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<>
|
template<>
|
||||||
struct convert<OpenVulkano::UUID>
|
struct convert<OpenVulkano::UUID>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user