-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocalSource.cpp
More file actions
38 lines (31 loc) · 991 Bytes
/
Copy pathLocalSource.cpp
File metadata and controls
38 lines (31 loc) · 991 Bytes
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
#include "runcpp2/Data/LocalSource.hpp"
#include "runcpp2/Data/ParseCommon.hpp"
#include "runcpp2/ParseUtil.hpp"
#include "ssLogger/ssLog.hpp"
bool runcpp2::Data::LocalSource::ParseYAML_Node(ryml::ConstNodeRef& node)
{
INTERNAL_RUNCPP2_SAFE_START();
std::vector<NodeRequirement> requirements =
{
NodeRequirement("Path", ryml::NodeType_e::KEYVAL, true, false)
};
if(!CheckNodeRequirements(node, requirements))
{
ssLOG_ERROR("LocalSource: Failed to meet requirements");
return false;
}
node["Path"] >> Path;
return true;
INTERNAL_RUNCPP2_SAFE_CATCH_RETURN(false);
}
std::string runcpp2::Data::LocalSource::ToString(std::string indentation) const
{
std::string out;
out += indentation + "Local:\n";
out += indentation + " Path: " + GetEscapedYAMLString(Path) + "\n";
return out;
}
bool runcpp2::Data::LocalSource::Equals(const LocalSource& other) const
{
return Path == other.Path;
}