String and YAML utilities

This commit is contained in:
Nav
2022-07-23 15:36:05 +01:00
parent cf0a103ba4
commit cb577c7acd
4 changed files with 67 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include <yaml-cpp/yaml.h>
namespace Bloom
{
class YamlUtilities
{
public:
template <typename Type>
static bool isType(const YAML::Node& node) {
try {
node.as<Type>();
return true;
} catch (YAML::BadConversion&) {
return false;
}
}
};
}