| 170 | |
| 171 | static const char CHILD_KEY[] = "child"; |
| 172 | JSONTransformVisitor::JSONTransformVisitor(Json::Value const &root) { |
| 173 | std::vector<Json::Value> levels; |
| 174 | Json::Value current = root; |
| 175 | levels.push_back(current); |
| 176 | while (current.isObject() && current.isMember(CHILD_KEY)) { |
| 177 | current = current[CHILD_KEY]; |
| 178 | levels.push_back(current); |
| 179 | } |
| 180 | m_leaf = current; |
| 181 | while (!levels.empty()) { |
| 182 | handleLevel(m_transform, levels.back()); |
| 183 | levels.pop_back(); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | JSONTransformVisitor::~JSONTransformVisitor() {} |
| 188 |
nothing calls this directly
no test coverage detected