diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2003-01-06 20:54:16 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2003-01-06 20:54:16 (GMT) |
commit | f781e6dbbaa51edbdbe9b5906be9962968d0ee68 (patch) | |
tree | b008f56412d0734ea397eb4492ddd66c08677dff /src/dot.cpp | |
parent | dfa656f3404e589ad59c47dc1728744efb245a82 (diff) | |
download | Doxygen-f781e6dbbaa51edbdbe9b5906be9962968d0ee68.zip Doxygen-f781e6dbbaa51edbdbe9b5906be9962968d0ee68.tar.gz Doxygen-f781e6dbbaa51edbdbe9b5906be9962968d0ee68.tar.bz2 |
Release-1.3-rc2-20030106
Diffstat (limited to 'src/dot.cpp')
-rw-r--r-- | src/dot.cpp | 53 |
1 files changed, 31 insertions, 22 deletions
diff --git a/src/dot.cpp b/src/dot.cpp index 70fa726..6fedd24 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -881,27 +881,25 @@ void DotGfxHierarchyTable::addClassList(ClassSDict *cl) for (cli.toLast();(cd=cli.current());--cli) { //printf("Trying %s subClasses=%d\n",cd->name().data(),cd->subClasses()->count()); - if (!hasVisibleRoot(cd->baseClasses())) + if (!hasVisibleRoot(cd->baseClasses()) && + cd->isVisibleInHierarchy() + ) // root node in the forest { - if (cd->isVisibleInHierarchy()) // root node in the forest + QCString tmp_url=""; + if (cd->isLinkable()) + tmp_url=cd->getReference()+"$"+cd->getOutputFileBase(); + //printf("Inserting root class %s\n",cd->name().data()); + DotNode *n = new DotNode(m_curNodeNumber++, + cd->displayName(), + tmp_url.data()); + + //m_usedNodes->clear(); + m_usedNodes->insert(cd->name(),n); + m_rootNodes->insert(0,n); + if (!cd->visited && cd->subClasses()->count()>0) { - QCString tmp_url=""; - if (cd->isLinkable()) - tmp_url=cd->getReference()+"$"+cd->getOutputFileBase(); - //printf("Inserting root class %s\n",cd->name().data()); - DotNode *n = new DotNode(m_curNodeNumber++, - cd->displayName(), - tmp_url.data() - ); - - //m_usedNodes->clear(); - m_usedNodes->insert(cd->name(),n); - m_rootNodes->insert(0,n); - if (!cd->visited && cd->subClasses()->count()>0) - { - addHierarchy(n,cd,cd->visited); - cd->visited=TRUE; - } + addHierarchy(n,cd,cd->visited); + cd->visited=TRUE; } } } @@ -911,8 +909,8 @@ DotGfxHierarchyTable::DotGfxHierarchyTable() { m_curNodeNumber=0; m_rootNodes = new QList<DotNode>; - //m_rootNodes->setAutoDelete(TRUE); // rootNodes owns the nodes - m_usedNodes = new QDict<DotNode>(1009); // virtualNodes only aliases nodes + m_usedNodes = new QDict<DotNode>(1009); + m_usedNodes->setAutoDelete(TRUE); m_rootSubgraphs = new DotNodeList; // build a graph with each class as a node and the inheritance relations @@ -964,7 +962,9 @@ DotGfxHierarchyTable::DotGfxHierarchyTable() DotGfxHierarchyTable::~DotGfxHierarchyTable() { //printf("DotGfxHierarchyTable::~DotGfxHierarchyTable\n"); - SDict<DotNode> skipNodes(17); + +#if 0 // TODO: delete this + SDict<DotNode> skipNodes(1009); skipNodes.setAutoDelete(TRUE); DotNode *n = m_rootNodes->first(); while (n) @@ -980,6 +980,15 @@ DotGfxHierarchyTable::~DotGfxHierarchyTable() deleteNodes(n,&skipNodes); n=m_rootNodes->next(); } +#endif + + //QDictIterator<DotNode> di(*m_usedNodes); + //DotNode *n; + //for (;(n=di.current());++di) + //{ + // printf("Node %p: %s\n",n,n->label().data()); + //} + delete m_rootNodes; delete m_usedNodes; delete m_rootSubgraphs; |