| 192 | } |
| 193 | |
| 194 | void |
| 195 | FlatYAMLAccessor::make_tree_node(swoc::TextView variable, swoc::TextView value, swoc::TextView tag, YAML::Emitter &out) |
| 196 | { |
| 197 | auto const key{variable.take_prefix_at('.')}; |
| 198 | auto const key_str = std::string{key.data(), key.size()}; |
| 199 | if (variable.empty()) { |
| 200 | out << YAML::BeginMap << YAML::Key << key_str; |
| 201 | if (!tag.empty()) { |
| 202 | out << YAML::VerbatimTag(get_tag(tag)); |
| 203 | } |
| 204 | out << YAML::Value << std::string{value.data(), value.size()} << YAML::EndMap; |
| 205 | } else { |
| 206 | out << YAML::BeginMap << YAML::Key << key_str; |
| 207 | make_tree_node(variable, value, tag, out); |
| 208 | out << YAML::EndMap; |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | FileConfigCommand::FileConfigCommand(ts::Arguments *args) : CtrlCommand(args) |
| 213 | { |
nothing calls this directly
no test coverage detected