4 #pragma warning( push ) 5 #pragma warning( disable : 4127) 6 #include <yaml-cpp/yaml.h> 9 #include <Utils\DebugUtils.h> 28 BRE_ASSERT(key !=
nullptr);
30 BRE_ASSERT(attr.IsDefined());
31 BRE_ASSERT(attr.IsScalar());
32 return std::to_string(attr.as<std::string>());
36 static std::string GetScalar(
const YAML::Node& node,
39 BRE_ASSERT(key !=
nullptr);
41 BRE_ASSERT(attr.IsDefined());
42 BRE_ASSERT(attr.IsScalar());
43 return attr.as<std::string>();
47 static void GetSequence(
const YAML::Node& node,
48 T*
const sequenceOutput,
49 const size_t numElems)
51 BRE_ASSERT(sequenceOutput !=
nullptr);
52 BRE_ASSERT(node.IsDefined());
53 BRE_ASSERT(node.IsSequence());
54 size_t currentNumElems = 0;
56 BRE_ASSERT(seqNode.IsScalar());
57 BRE_ASSERT(currentNumElems < numElems);
58 sequenceOutput[currentNumElems] = seqNode.as<T>();
61 BRE_ASSERT(currentNumElems == numElems);
Definition: YamlUtils.h:12