| 176 | } |
| 177 | |
| 178 | std::pair<bool, YAML::Node> |
| 179 | FlatYAMLAccessor::find_node(swoc::TextView variable) |
| 180 | { |
| 181 | if (_docs.size() > 0) { // make sure there is something |
| 182 | // We start from the bottom. |
| 183 | for (auto iter = std::rbegin(_docs); iter != std::rend(_docs); ++iter) { |
| 184 | if (auto [found, node] = search_node(variable, *iter, DO_NOT_CREATE_IF_NOT_EXIST); found) { |
| 185 | // found it. |
| 186 | return {true, node}; |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | return NOT_FOUND; // couldn't find the node; |
| 192 | } |
| 193 | |
| 194 | void |
| 195 | FlatYAMLAccessor::make_tree_node(swoc::TextView variable, swoc::TextView value, swoc::TextView tag, YAML::Emitter &out) |
nothing calls this directly
no test coverage detected