diff --git a/include/Athena/DNAYaml.hpp b/include/Athena/DNAYaml.hpp index adc4927..f5af691 100644 --- a/include/Athena/DNAYaml.hpp +++ b/include/Athena/DNAYaml.hpp @@ -45,6 +45,13 @@ struct YAMLNode std::vector> m_seqChildren; std::vector>> m_mapChildren; YAMLNode(yaml_node_type_t type) : m_type(type) {} + inline const YAMLNode* findMapChild(const char* key) const + { + for (const auto& item : m_mapChildren) + if (!item.first.compare(key)) + return item.second.get(); + return nullptr; + } }; template