Formats a statistics (sub)tree to text
| 719 | |
| 720 | // Formats a statistics (sub)tree to text |
| 721 | static 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 |
no test coverage detected