diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2003-03-30 19:53:04 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2003-03-30 19:53:04 (GMT) |
commit | b69146af8dce22431fc50dc3fcea6c7fd5fb1063 (patch) | |
tree | dcb3e2354df7b19ebd9458aca416a61d4922bc5c /src/dot.cpp | |
parent | fc0deb3d8c9dad128e1d5f5c90a5dfc0b9d60eea (diff) | |
download | Doxygen-b69146af8dce22431fc50dc3fcea6c7fd5fb1063.zip Doxygen-b69146af8dce22431fc50dc3fcea6c7fd5fb1063.tar.gz Doxygen-b69146af8dce22431fc50dc3fcea6c7fd5fb1063.tar.bz2 |
Release-1.3-rc3-20030330
Diffstat (limited to 'src/dot.cpp')
-rw-r--r-- | src/dot.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/dot.cpp b/src/dot.cpp index 928692b..ac0f645 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -775,7 +775,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) DotNode *node; for (;(node=dnli2.current());++dnli2) { - if (node->m_subgraphId==n->m_subgraphId) node->write(t,BITMAP,FALSE,TRUE); + if (node->m_subgraphId==n->m_subgraphId) + node->write(t,BITMAP,FALSE,TRUE,1000,TRUE); } t << "}" << endl; f.close(); @@ -1062,7 +1063,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, } m_usedNodes->insert(className,bn); //printf(" add new child node `%s' to %s\n",className.data(),n->m_label.data()); - if (distance<m_recDepth) buildGraph(cd,bn,distance+1,base); + + // we use <=, i.s.o < to cause one more level than intended which is used to + // detect truncated nodes + if (distance<=m_recDepth) buildGraph(cd,bn,distance+1,base); } } @@ -1374,7 +1378,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out, } baseName = convertNameToFile(diskName()); - findMaximalDotGraph(m_startNode,m_maxDistance,baseName, + findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName, thisDir,format,!isTBRank,m_graphType==Inheritance); if (format==BITMAP) // run dot to create a bitmap image @@ -1548,15 +1552,19 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance) n->addChild(bn,0,0,0); bn->addParent(n); m_usedNodes->insert(in,bn); - if (bfd) buildGraph(bn,bfd,distance+1); + + // we use <=, i.s.o < to cause one more level than intended which is used to + // detect truncated nodes + if (bfd && distance<=m_recDepth) buildGraph(bn,bfd,distance+1); } } } } -DotInclDepGraph::DotInclDepGraph(FileDef *fd,bool inverse) +DotInclDepGraph::DotInclDepGraph(FileDef *fd,int maxRecursionDepth,bool inverse) { m_maxDistance = 0; + m_recDepth = maxRecursionDepth; m_inverse = inverse; ASSERT(fd!=0); m_diskName = fd->getFileBase().copy(); @@ -1610,7 +1618,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, QCString mapName=m_startNode->m_label.copy(); if (m_inverse) mapName+="dep"; - findMaximalDotGraph(m_startNode,m_maxDistance,baseName,thisDir,format, + findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName,thisDir,format, FALSE,FALSE,!m_inverse); if (format==BITMAP) |