MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / JSONTransformVisitor

Method JSONTransformVisitor

src/osvr/Common/JSONTransformVisitor.cpp:172–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

handleLevelFunction · 0.85
backMethod · 0.80
push_backMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected