MCPcopy Create free account
hub / github.com/amule-project/amule / StatTree2Text

Function StatTree2Text

src/TextClient.cpp:721–734  ·  view source on GitHub ↗

Formats a statistics (sub)tree to text

Source from the content-addressed store, hash-verified

719
720// Formats a statistics (sub)tree to text
721static wxString StatTree2Text(const CEC_StatTree_Node_Tag *tree, int depth)
722{
723 if (!tree) {
724 return "";
725 }
726 wxString result = wxString(wxChar(' '), depth) + tree->GetDisplayString() + "\n";
727 for (CECTag::const_iterator it = tree->begin(); it != tree->end(); ++it) {
728 const CEC_StatTree_Node_Tag *tmp = static_cast<const CEC_StatTree_Node_Tag*>(&*it);
729 if (tmp->GetTagName() == EC_TAG_STATTREE_NODE) {
730 result += StatTree2Text(tmp, depth + 1);
731 }
732 }
733 return result;
734}
735
736/*
737 * Format EC packet into text form for output to console

Callers 1

Process_Answer_v2Method · 0.85

Calls 5

GetTagNameMethod · 0.80
wxStringClass · 0.70
GetDisplayStringMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected