diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2001-12-09 20:40:34 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2001-12-09 20:40:34 (GMT) |
commit | 7e4d434c3650bb9f7e5f460b1dbf6fed8be04a5f (patch) | |
tree | bbe6210f1426dabef9dcedc0d7d025f79fae6225 /src/dot.cpp | |
parent | 79959c79850830e90aa7e00e72d3718785e29214 (diff) | |
download | Doxygen-7e4d434c3650bb9f7e5f460b1dbf6fed8be04a5f.zip Doxygen-7e4d434c3650bb9f7e5f460b1dbf6fed8be04a5f.tar.gz Doxygen-7e4d434c3650bb9f7e5f460b1dbf6fed8be04a5f.tar.bz2 |
Doxygen-1.2.12-20011209
Diffstat (limited to 'src/dot.cpp')
-rw-r--r-- | src/dot.cpp | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/dot.cpp b/src/dot.cpp index 9849426..d1494a7 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -490,6 +490,70 @@ void DotNode::writeXML(QTextStream &t) } +void DotNode::writeDEF(QTextStream &t) +{ + char* nodePrefix = " node-"; + + t << " node = {" << endl; + t << nodePrefix << "id = " << m_number << ';' << endl; + t << nodePrefix << "label = '" << m_label << "';" << endl; + + if (!m_url.isEmpty()) + { + QCString url(m_url); + char *refPtr = url.data(); + char *urlPtr = strchr(url.data(),'$'); + if (urlPtr) + { + *urlPtr++='\0'; + t << nodePrefix << "link = {" << endl << " " + << nodePrefix << "link-id = '" << urlPtr << "';" << endl; + + if (*refPtr!='\0') + { + t << " " << nodePrefix << "link-external = '" + << refPtr << "';" << endl; + } + t << " };" << endl; + } + } + if (m_children) + { + QListIterator<DotNode> nli(*m_children); + QListIterator<EdgeInfo> eli(*m_edgeInfo); + DotNode *childNode; + EdgeInfo *edgeInfo; + for (;(childNode=nli.current());++nli,++eli) + { + edgeInfo=eli.current(); + t << " node-child = {" << endl; + t << " child-id = '" << childNode->m_number << "';" << endl; + t << " relation = "; + + switch(edgeInfo->m_color) + { + case EdgeInfo::Blue: t << "public-inheritance"; break; + case EdgeInfo::Green: t << "protected-inheritance"; break; + case EdgeInfo::Red: t << "private-inheritance"; break; + case EdgeInfo::Purple: t << "usage"; break; + case EdgeInfo::Orange: t << "template-instance"; break; + case EdgeInfo::Grey: ASSERT(0); break; + } + t << ';' << endl; + + if (!edgeInfo->m_label.isEmpty()) + { + t << " edgelabel = <<_EnD_oF_dEf_TeXt_" << endl + << edgeInfo->m_label << endl + << "_EnD_oF_dEf_TeXt_;" << endl; + } + t << " }; /* node-child */" << endl; + } /* for (;childNode...) */ + } + t << " }; /* node */" << endl; +} + + void DotNode::clearWriteFlag() { m_written=FALSE; @@ -1313,6 +1377,16 @@ void DotClassGraph::writeXML(QTextStream &t) } } +void DotClassGraph::writeDEF(QTextStream &t) +{ + QDictIterator<DotNode> dni(*m_usedNodes); + DotNode *node; + for (;(node=dni.current());++dni) + { + node->writeDEF(t); + } +} + //-------------------------------------------------------------------- int DotInclDepGraph::m_curNodeNumber; |