summaryrefslogtreecommitdiffstats
path: root/src/dot.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-12-09 20:40:34 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-12-09 20:40:34 (GMT)
commit414d7b3bbfad8ec16237c3708af188ecaee62886 (patch)
treebbe6210f1426dabef9dcedc0d7d025f79fae6225 /src/dot.cpp
parentcce8b9505201c95443798341d3d6176922db9253 (diff)
downloadDoxygen-414d7b3bbfad8ec16237c3708af188ecaee62886.zip
Doxygen-414d7b3bbfad8ec16237c3708af188ecaee62886.tar.gz
Doxygen-414d7b3bbfad8ec16237c3708af188ecaee62886.tar.bz2
Doxygen-1.2.12-20011209
Diffstat (limited to 'src/dot.cpp')
-rw-r--r--src/dot.cpp74
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;