QDebug CoreException::PrintChildren(IStatus *status, QDebug dbg) const { QList<IStatus::Pointer> children = status->GetChildren(); for (int i = 0; i < children.size(); ++i) { dbg << "Contains: " << qPrintable(children[i]->GetMessage()) << '\n'; const ctkException* exc = children[i]->GetException(); if (exc != nullptr) { dbg << exc->printStackTrace(); } PrintChildren(children[i].GetPointer(), dbg); } return dbg; }
string Node::PrintEverything() { string output; output += "\t<NODE>\n"; output += PrintName(); output += PrintDefault(); output += PrintNodeNum(); output += PrintIPAddress(); output += PrintLocation(); output += PrintType(); output += PrintZone(); output += PrintParentNodeNum(); output += PrintParentDistance(); output += PrintStateChangeTime(); output += PrintChildren(); output += "\t</NODE>\n"; return output; }
void CTrieHolder::PrintChildren(size_t NodeNo) const { printf("%" PRISZT, NodeNo); if (m_Nodes[NodeNo].m_FailureFunction != -1) printf(" failure(%i) ", m_Nodes[NodeNo].m_FailureFunction); printf(" -> "); size_t i=0; size_t Count = GetChildrenCount(NodeNo); for (; i<Count; i++) { const CTrieRelation& p = GetChildren(NodeNo)[i]; SymbolInformationType::const_iterator it = m_pSymbolInformation->find(p.m_RelationChar); assert (it != m_pSymbolInformation->end()); printf("%i %s,", p.m_ChildNo, it->second.c_str()); }; printf("\n"); for (; i<Count; i++) PrintChildren(GetChildren(NodeNo)[i].m_ChildNo); };
QDebug CoreException::printStackTrace(QDebug dbg) const { return PrintChildren(status.GetPointer(), ctkException::printStackTrace(dbg)); }