@@ -615,6 +615,7 @@ void ProjMgrYamlParser::ParseDebugger(const YAML::Node& parent, const string& fi
615615 ParseNumber (debuggerNode, file, YAML_CLOCK, debugger.clock );
616616 ParsePortablePath (debuggerNode, file, YAML_DBGCONF, debugger.dbgconf );
617617 ParseString (debuggerNode, YAML_START_PNAME, debugger.startPname );
618+ ParseCustom (debuggerNode, { YAML_NAME, YAML_PROTOCOL, YAML_CLOCK, YAML_DBGCONF, YAML_START_PNAME }, debugger.custom );
618619 }
619620}
620621
@@ -631,6 +632,7 @@ void ProjMgrYamlParser::ParseDebugDefaults(const YAML::Node& parent, const strin
631632 ParseNumber (defaultsNode, file, YAML_PORT, defaults.port );
632633 ParseString (defaultsNode, YAML_PROTOCOL, defaults.protocol );
633634 ParseNumber (defaultsNode, file, YAML_CLOCK, defaults.clock );
635+ ParseCustom (defaultsNode, { YAML_PORT, YAML_PROTOCOL, YAML_CLOCK }, defaults.custom );
634636 }
635637}
636638
@@ -1074,6 +1076,34 @@ void ProjMgrYamlParser::ParseImages(const YAML::Node& parent, const string& file
10741076 }
10751077}
10761078
1079+ CustomItem ProjMgrYamlParser::GetCustomValue (const YAML::Node& node) {
1080+ CustomItem value;
1081+ if (node.IsScalar ()) {
1082+ value.scalar = node.as <string>();
1083+ }
1084+ else if (node.IsSequence ()) {
1085+ for (const auto & item : node) {
1086+ value.vec .push_back (GetCustomValue (item));
1087+ }
1088+ }
1089+ else if (node.IsMap ()) {
1090+ for (const auto & item : node) {
1091+ value.map .push_back ({ item.first .as <string>(), GetCustomValue (item.second ) });
1092+ }
1093+ }
1094+ return value;
1095+ }
1096+
1097+ void ProjMgrYamlParser::ParseCustom (const YAML::Node& parent, const vector<string>& skip, CustomItem& custom) {
1098+ for (const auto & node : parent) {
1099+ const auto & key = node.first .as <string>();
1100+ if (find (skip.begin (), skip.end (), key) != skip.end ()) {
1101+ continue ;
1102+ }
1103+ custom.map .push_back ({ key, GetCustomValue (node.second ) });
1104+ }
1105+ }
1106+
10771107// Validation Maps
10781108const set<string> defaultKeys = {
10791109 YAML_COMPILER,
0 commit comments