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

Method TreeNodePrinter

apps/osvr_print_tree.cpp:61–71  ·  view source on GitHub ↗

@brief Constructor

Source from the content-addressed store, hash-verified

59 public:
60 /// @brief Constructor
61 TreeNodePrinter(Options opts)
62 : boost::static_visitor<>(), m_opts(opts),
63 m_maxTypeLen(osvr::common::elements::getMaxTypeNameLength()),
64 m_os(std::cout), m_indentStream{m_maxTypeLen + 2 + 1 + 2, m_os} {
65 // Some initial space to set the output off.
66 m_os << "\n\n";
67
68 // Computation for initializing the indent stream above:
69 // Indents type name size, +2 for the brackets, +1 for the space, and +2
70 // so it doesn't line up with the path.
71 }
72
73 /// @brief print nothing for a null element.
74 void operator()(osvr::common::PathNode const &,

Callers

nothing calls this directly

Calls 1

getMaxTypeNameLengthFunction · 0.85

Tested by

no test coverage detected