MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / dumpNode

Method dumpNode

src/DOM.cpp:606–622  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

604
605////////////////////////////////////////////////////////////////////////////////
606std::string DOM::Node::dumpNode(const DOM::Node* node, int depth) const {
607 std::stringstream out;
608
609 // Indent.
610 out << std::string(depth * 2, ' ');
611
612 out << "\033[31m" << node->_name << "\033[0m";
613
614 if (node->_provider) out << " 0x" << std::hex << (long long)(void*)node->_provider;
615
616 out << '\n';
617
618 // Recurse for branches.
619 for (auto& b : node->_branches) out << dumpNode(b, depth + 1);
620
621 return out.str();
622}
623
624////////////////////////////////////////////////////////////////////////////////
625std::string DOM::Node::dump() const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected