MCPcopy Create free account
hub / github.com/comaps/comaps / Print

Function Print

libs/indexer/complex/tree_node.hpp:224–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222
223template <typename Data>
224void Print(types::Ptr<Data> const & node, std::ostream & stream, std::string prefix = "", bool isTail = true)
225{
226 stream << prefix;
227 if (isTail)
228 {
229 stream << "└───";
230 prefix += " ";
231 }
232 else
233 {
234 stream << "├───";
235 prefix += "│ ";
236 }
237 auto str = DebugPrint(node->GetData());
238 std::replace(std::begin(str), std::end(str), '\n', '|');
239 stream << str << '\n';
240 auto const & children = node->GetChildren();
241 size_t size = children.size();
242 for (size_t i = 0; i < size; ++i)
243 Print(children[i], stream, prefix, i == size - 1 /* isTail */);
244}
245
246template <typename Data>
247std::string DebugPrint(types::Ptr<Data> const & node)

Callers 4

DebugPrintFunction · 0.70
CombineAnimationMethod · 0.50
PushAnimationMethod · 0.50
FinishAnimationsMethod · 0.50

Calls 7

replaceFunction · 0.85
GetChildrenMethod · 0.80
DebugPrintFunction · 0.70
beginFunction · 0.50
endFunction · 0.50
GetDataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected