diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2003-04-30 19:40:09 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2003-04-30 19:40:09 (GMT) |
commit | ea4b32cb910635a50467b02f36b5521337451cf0 (patch) | |
tree | 88964bce49d3ab4b0f329d945d43a87b443ed019 /src/dot.cpp | |
parent | 2eef94da7bc476987b1a46690bbdaeb76a05dd82 (diff) | |
download | Doxygen-ea4b32cb910635a50467b02f36b5521337451cf0.zip Doxygen-ea4b32cb910635a50467b02f36b5521337451cf0.tar.gz Doxygen-ea4b32cb910635a50467b02f36b5521337451cf0.tar.bz2 |
Release-1.3-20030430
Diffstat (limited to 'src/dot.cpp')
-rw-r--r-- | src/dot.cpp | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/src/dot.cpp b/src/dot.cpp index 32a9841..110a86d 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -1086,31 +1086,47 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base) { + //printf("DocClassGraph::buildGraph(%s,distance=%d,base=%d)\n", + // cd->name().data(),distance,base); // ---- Add inheritance relations - BaseClassListIterator bcli(base ? *cd->baseClasses() : *cd->subClasses()); - BaseClassDef *bcd; - for ( ; (bcd=bcli.current()) ; ++bcli ) + if (m_graphType == Inheritance) { - //printf("-------- inheritance relation %s->%s templ=`%s'\n", - // cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data()); - addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName, - bcd->templSpecifiers,base); + BaseClassListIterator bcli(base ? *cd->baseClasses() : *cd->subClasses()); + BaseClassDef *bcd; + for ( ; (bcd=bcli.current()) ; ++bcli ) + { + //printf("-------- inheritance relation %s->%s templ=`%s'\n", + // cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data()); + addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName, + bcd->templSpecifiers,base); + } } - if (m_graphType != Inheritance) + else // m_graphType != Inheritance { + ASSERT(m_graphType==Implementation); // ---- Add usage relations UsesClassDict *dict = - m_graphType==Implementation ? cd->usedImplementationClasses() : - cd->usedInterfaceClasses(); + base ? cd->usedImplementationClasses() : + cd->usedByImplementationClasses() + ; if (dict) { UsesClassDictIterator ucdi(*dict); UsesClassDef *ucd; for (;(ucd=ucdi.current());++ucdi) { + //if (base) + //{ + // printf("%s uses %s\n",cd->name().data(),ucd->classDef->name().data()); + //} + //else + //{ + // printf("%s is used by %s\n",cd->name().data(),ucd->classDef->name().data()); + //} + //printf("drawing\n"); QCString label; QDictIterator<void> dvi(*ucd->accessors); const char *s; @@ -1128,7 +1144,7 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base) } } addClass(ucd->classDef,n,EdgeInfo::Purple,label,distance,0, - ucd->templSpecifiers,base); + ucd->templSpecifiers,base); } } } |