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

Class GetStringVisitor

src/osvr/Common/GetJSONStringFromTree.h:42–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40namespace common {
41 namespace {
42 struct GetStringVisitor : boost::static_visitor<std::string> {
43 std::string operator()(elements::StringElement const &elt) const {
44 return elt.getString();
45 }
46 template <typename T> std::string operator()(T const &) const {
47 return std::string{};
48 }
49 };
50 }
51 inline std::string getJSONStringAtNode(PathNode const &node) {
52 return boost::apply_visitor(GetStringVisitor(), node.value());

Callers 1

getJSONStringAtNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected