-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParseUtil.hpp
More file actions
43 lines (32 loc) · 1.26 KB
/
Copy pathParseUtil.hpp
File metadata and controls
43 lines (32 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef RUNCPP2_PARSE_UTIL_HPP
#define RUNCPP2_PARSE_UTIL_HPP
#include "runcpp2/YamlLib.hpp"
#include <vector>
namespace runcpp2
{
struct NodeRequirement
{
std::string Name;
ryml::NodeType NodeType;
bool Required;
bool Nullable;
NodeRequirement();
NodeRequirement(const std::string& name,
ryml::NodeType nodeType,
bool required,
bool nullable);
};
bool CheckNodeRequirements( ryml::ConstNodeRef& node,
const std::vector<NodeRequirement>& requirements);
bool GetParsableInfo(const std::string& contentToParse, std::string& outParsableInfo);
bool ResolveYAML_Stream(ryml::Tree& rootTree,
ryml::ConstNodeRef& outRootNode);
bool ExistAndHasChild( const ryml::ConstNodeRef& node,
const std::string& childName,
bool nullable = false);
std::string GetValue(ryml::ConstNodeRef node);
std::string GetKey(ryml::ConstNodeRef node);
std::string GetEscapedYAMLString(const std::string& input);
bool ParseIncludes(const std::string& line, std::string& outIncludePath);
}
#endif