diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-03-17 20:13:31 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-03-17 20:13:31 (GMT) |
commit | ca3fb0a6df32b732c6b390b937f3ada001cb1e7a (patch) | |
tree | f846ab2e854c959c8e76153065efd17e01d7a02b /src/index.cpp | |
parent | ecbd3e379768b13e0a62013faca341cd8c3022c7 (diff) | |
download | Doxygen-ca3fb0a6df32b732c6b390b937f3ada001cb1e7a.zip Doxygen-ca3fb0a6df32b732c6b390b937f3ada001cb1e7a.tar.gz Doxygen-ca3fb0a6df32b732c6b390b937f3ada001cb1e7a.tar.bz2 |
Release-1.2.14-20020317
Diffstat (limited to 'src/index.cpp')
-rw-r--r-- | src/index.cpp | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/src/index.cpp b/src/index.cpp index 47bdaab..b07200d 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -351,6 +351,21 @@ void endFile(OutputList &ol,bool external) //---------------------------------------------------------------------------- +static bool classHasVisibleChildren(ClassDef *cd) +{ + if (cd->subClasses()->count()==0) return FALSE; + BaseClassList *bcl=cd->subClasses(); + BaseClassListIterator bcli(*bcl); + for ( ; bcli.current() ; ++bcli) + { + if (bcli.current()->classDef->isVisibleInHierarchy()) + { + return TRUE; + } + } + return FALSE; +} + void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level) { HtmlHelp *htmlHelp=0; @@ -381,7 +396,8 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level) started=TRUE; } //printf("Passed...\n"); - bool hasChildren = !cd->visited && !hideSuper && cd->subClasses()->count()>0; + bool hasChildren = !cd->visited && !hideSuper && classHasVisibleChildren(cd); + //printf("tree4: Has children %s: %d\n",cd->name().data(),hasChildren); if (cd->isLinkable()) { //printf("Writing class %s\n",cd->displayName().data()); @@ -454,7 +470,8 @@ void writeClassTree(BaseClassList *cl,int level) for ( ; cli.current() ; ++cli) { ClassDef *cd=cli.current()->classDef; - if (cd->isVisibleInHierarchy() && !cd->visited) + if (cd->isVisibleInHierarchy() && hasVisibleRoot(cd->baseClasses())) + //if (cd->isVisibleInHierarchy() && !cd->visited) { if (!started) { @@ -462,7 +479,8 @@ void writeClassTree(BaseClassList *cl,int level) if (hasFtvHelp) ftvHelp->incContentsDepth(); started=TRUE; } - bool hasChildren = cd->subClasses()->count()>0; + bool hasChildren = !cd->visited && classHasVisibleChildren(cd); + //printf("tree2: Has children %s: %d\n",cd->name().data(),hasChildren); if (cd->isLinkable()) { if (hasHtmlHelp) @@ -499,7 +517,8 @@ void writeClassTreeNode(ClassDef *cd,bool hasHtmlHelp,bool hasFtvHelp,bool &star { started=TRUE; } - bool hasChildren = cd->subClasses()->count()>0; + bool hasChildren = classHasVisibleChildren(cd); + //printf("node: Has children %s: %d\n",cd->name().data(),hasChildren); if (cd->isLinkable()) { if (hasHtmlHelp) @@ -583,7 +602,8 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started) if (hasFtvHelp) ftvHelp->incContentsDepth(); started=TRUE; } - bool hasChildren = !cd->visited && cd->subClasses()->count()>0; + bool hasChildren = !cd->visited && classHasVisibleChildren(cd); + //printf("list: Has children %s: %d\n",cd->name().data(),hasChildren); if (cd->isLinkable()) { //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->templateMaster()=%p\n", @@ -2412,7 +2432,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) } // write classes - if(gd->classSDict->count()>0) + if (gd->classSDict->count()>0) { if(htmlHelp) { @@ -2616,19 +2636,11 @@ void writeGroupIndex(OutputList &ol) writeGroupHierarchy(ol); if (hasHtmlHelp) { - //writeGroupTree(ol); // KPW - modified to write hierarchial HMTL Help - //if(!Config::instance()->get("")) - //{ - htmlHelp->decContentsDepth(); - //} + htmlHelp->decContentsDepth(); } if (hasFtvHelp) { - //writeGroupTree(ol); // KPW - modified to write hierarchial FTV Help - //if(!Config::instance()->get("")) - //{ - ftvHelp->decContentsDepth(); - //} + ftvHelp->decContentsDepth(); } endFile(ol); ol.popGeneratorState(); |