diff options
author | Charles.Lee <cheoljoo@gmail.com> | 2018-12-24 00:58:06 (GMT) |
---|---|---|
committer | Charles.Lee <cheoljoo@gmail.com> | 2018-12-24 00:58:06 (GMT) |
commit | b35d4dbc124ec494b451b79a19218a564a98af53 (patch) | |
tree | 5ef64eab0723ebf9d7653b463ba3f1c05fb5cfca /src/index.cpp | |
parent | f73c9301a711baa68ef2a38acb279b421e3ca2b0 (diff) | |
parent | babfc33370e28963f890a5f05355aa7778700ca6 (diff) | |
download | Doxygen-b35d4dbc124ec494b451b79a19218a564a98af53.zip Doxygen-b35d4dbc124ec494b451b79a19218a564a98af53.tar.gz Doxygen-b35d4dbc124ec494b451b79a19218a564a98af53.tar.bz2 |
merge
Diffstat (limited to 'src/index.cpp')
-rw-r--r-- | src/index.cpp | 955 |
1 files changed, 885 insertions, 70 deletions
diff --git a/src/index.cpp b/src/index.cpp index 8e5f266..7bb9574 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -21,6 +21,7 @@ #include <stdlib.h> +#include <assert.h> #include <qtextstream.h> #include <qdatetime.h> #include <qdir.h> @@ -55,6 +56,14 @@ int annotatedClasses; int annotatedClassesPrinted; int hierarchyClasses; +int annotatedInterfaces; +int annotatedInterfacesPrinted; +int hierarchyInterfaces; +int annotatedStructs; +int annotatedStructsPrinted; +int annotatedExceptions; +int annotatedExceptionsPrinted; +int hierarchyExceptions; int documentedFiles; int documentedGroups; int documentedNamespaces; @@ -66,23 +75,34 @@ int documentedHtmlFiles; int documentedPages; int documentedDirs; -static int countClassHierarchy(); +static int countClassHierarchy(ClassDef::CompoundType ct); static void countFiles(int &htmlFiles,int &files); static int countGroups(); static int countDirs(); static int countNamespaces(); -static int countAnnotatedClasses(int *cp); +static int countAnnotatedClasses(int *cp,ClassDef::CompoundType ct); static void countRelatedPages(int &docPages,int &indexPages); void countDataStructures() { - annotatedClasses = countAnnotatedClasses(&annotatedClassesPrinted); // "classes" + "annotated" - hierarchyClasses = countClassHierarchy(); // "hierarchy" - countFiles(documentedHtmlFiles,documentedFiles); // "files" - countRelatedPages(documentedPages,indexedPages); // "pages" - documentedGroups = countGroups(); // "modules" - documentedNamespaces = countNamespaces(); // "namespaces" - documentedDirs = countDirs(); // "dirs" + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); + annotatedClasses = countAnnotatedClasses(&annotatedClassesPrinted, ClassDef::Class); // "classes" + "annotated" + hierarchyClasses = countClassHierarchy(ClassDef::Class); // "hierarchy" + // "interfaces" + "annotated" + annotatedInterfaces = sliceOpt ? countAnnotatedClasses(&annotatedInterfacesPrinted, ClassDef::Interface) : 0; + // "interfacehierarchy" + hierarchyInterfaces = sliceOpt ? countClassHierarchy(ClassDef::Interface) : 0; + // "structs" + "annotated" + annotatedStructs = sliceOpt ? countAnnotatedClasses(&annotatedStructsPrinted, ClassDef::Struct) : 0; + // "exceptions" + "annotated" + annotatedExceptions = sliceOpt ? countAnnotatedClasses(&annotatedExceptionsPrinted, ClassDef::Exception) : 0; + // "exceptionhierarchy" + hierarchyExceptions = sliceOpt ? countClassHierarchy(ClassDef::Exception) : 0; + countFiles(documentedHtmlFiles,documentedFiles); // "files" + countRelatedPages(documentedPages,indexedPages); // "pages" + documentedGroups = countGroups(); // "modules" + documentedNamespaces = countNamespaces(); // "namespaces" + documentedDirs = countDirs(); // "dirs" // "globals" // "namespacemembers" // "functions" @@ -94,9 +114,12 @@ static void startIndexHierarchy(OutputList &ol,int level) ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Html); if (level<6) ol.startIndexList(); - ol.enableAll(); + ol.popGeneratorState(); + + ol.pushGeneratorState(); ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); + ol.disable(OutputGenerator::Docbook); ol.startItemList(); ol.popGeneratorState(); } @@ -107,8 +130,11 @@ static void endIndexHierarchy(OutputList &ol,int level) ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Html); if (level<6) ol.endIndexList(); - ol.enableAll(); + ol.popGeneratorState(); + + ol.pushGeneratorState(); ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::Docbook); ol.disable(OutputGenerator::RTF); ol.endItemList(); ol.popGeneratorState(); @@ -798,8 +824,10 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex) //---------------------------------------------------------------------------- -static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FTVHelp* ftv,bool addToIndex) +static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FTVHelp* ftv,bool addToIndex, + ClassDef::CompoundType ct) { + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); ClassSDict::Iterator cli(*cl); ClassDef *cd; for (;(cd=cli.current());++cli) @@ -818,6 +846,10 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT } b=!hasVisibleRoot(cd->subClasses()); } + else if (sliceOpt && cd->compoundType() != ct) + { + continue; + } else { b=!hasVisibleRoot(cd->baseClasses()); @@ -892,7 +924,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT } } -static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex) +static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex,ClassDef::CompoundType ct) { initClassHierarchy(Doxygen::classSDict); initClassHierarchy(Doxygen::hiddenClasses); @@ -902,8 +934,8 @@ static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex) ol.disable(OutputGenerator::Html); } bool started=FALSE; - writeClassTreeForList(ol,Doxygen::classSDict,started,ftv,addToIndex); - writeClassTreeForList(ol,Doxygen::hiddenClasses,started,ftv,addToIndex); + writeClassTreeForList(ol,Doxygen::classSDict,started,ftv,addToIndex,ct); + writeClassTreeForList(ol,Doxygen::hiddenClasses,started,ftv,addToIndex,ct); if (started) { endIndexHierarchy(ol,0); @@ -920,13 +952,18 @@ static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex) //---------------------------------------------------------------------------- -static int countClassesInTreeList(const ClassSDict &cl) +static int countClassesInTreeList(const ClassSDict &cl, ClassDef::CompoundType ct) { + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); int count=0; ClassSDict::Iterator cli(cl); ClassDef *cd; for (;(cd=cli.current());++cli) { + if (sliceOpt && cd->compoundType() != ct) + { + continue; + } if (!hasVisibleRoot(cd->baseClasses())) // filter on root classes { if (cd->isVisibleInHierarchy()) // should it be visible @@ -941,13 +978,13 @@ static int countClassesInTreeList(const ClassSDict &cl) return count; } -static int countClassHierarchy() +static int countClassHierarchy(ClassDef::CompoundType ct) { int count=0; initClassHierarchy(Doxygen::classSDict); initClassHierarchy(Doxygen::hiddenClasses); - count+=countClassesInTreeList(*Doxygen::classSDict); - count+=countClassesInTreeList(*Doxygen::hiddenClasses); + count+=countClassesInTreeList(*Doxygen::classSDict, ct); + count+=countClassesInTreeList(*Doxygen::hiddenClasses, ct); return count; } @@ -959,12 +996,13 @@ static void writeHierarchicalIndex(OutputList &ol) ol.pushGeneratorState(); //1.{ ol.disable(OutputGenerator::Man); + ol.disable(OutputGenerator::Docbook); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy); QCString title = lne ? lne->title() : theTranslator->trClassHierarchy(); bool addToIndex = lne==0 || lne->visible(); - startFile(ol,"hierarchy",0, title, HLI_Hierarchy); + startFile(ol,"hierarchy",0, title, HLI_ClassHierarchy); startTitle(ol,0); ol.parseText(title); endTitle(ol,0,0); @@ -973,15 +1011,16 @@ static void writeHierarchicalIndex(OutputList &ol) if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY)) { + ol.pushGeneratorState(); ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); + ol.disable(OutputGenerator::Docbook); ol.startParagraph(); ol.startTextLink("inherits",0); ol.parseText(theTranslator->trGotoGraphicalHierarchy()); ol.endTextLink(); ol.endParagraph(); - ol.enable(OutputGenerator::Latex); - ol.enable(OutputGenerator::RTF); + ol.popGeneratorState(); } ol.parseText(lne ? lne->intro() : theTranslator->trClassHierarchyDescription()); ol.endTextBlock(); @@ -994,7 +1033,7 @@ static void writeHierarchicalIndex(OutputList &ol) ol.disable(OutputGenerator::Html); Doxygen::indexList->disable(); - writeClassHierarchy(ol,0,addToIndex); + writeClassHierarchy(ol,0,addToIndex,ClassDef::Class); Doxygen::indexList->enable(); ol.popGeneratorState(); @@ -1013,7 +1052,7 @@ static void writeHierarchicalIndex(OutputList &ol) Doxygen::indexList->addContentsItem(TRUE,title,0,"hierarchy",0,TRUE,TRUE); } FTVHelp* ftv = new FTVHelp(FALSE); - writeClassHierarchy(ol,ftv,addToIndex); + writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Class); QGString outStr; FTextStream t(&outStr); ftv->generateTreeViewInline(t); @@ -1040,7 +1079,7 @@ static void writeGraphicalClassHierarchy(OutputList &ol) ol.disableAllBut(OutputGenerator::Html); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy); QCString title = lne ? lne->title() : theTranslator->trClassHierarchy(); - startFile(ol,"inherits",0,title,HLI_Hierarchy,FALSE,"hierarchy"); + startFile(ol,"inherits",0,title,HLI_ClassHierarchy,FALSE,"hierarchy"); startTitle(ol,0); ol.parseText(title); endTitle(ol,0,0); @@ -1060,6 +1099,220 @@ static void writeGraphicalClassHierarchy(OutputList &ol) //---------------------------------------------------------------------------- +static void writeHierarchicalInterfaceIndex(OutputList &ol) +{ + if (hierarchyInterfaces==0) return; + ol.pushGeneratorState(); + //1.{ + ol.disable(OutputGenerator::Man); + + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy); + QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy(); + bool addToIndex = lne==0 || lne->visible(); + + startFile(ol,"interfacehierarchy",0, title, HLI_InterfaceHierarchy); + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + ol.startContents(); + ol.startTextBlock(); + + if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY)) + { + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + ol.startParagraph(); + ol.startTextLink("interfaceinherits",0); + ol.parseText(theTranslator->trGotoGraphicalHierarchy()); + ol.endTextLink(); + ol.endParagraph(); + ol.enable(OutputGenerator::Latex); + ol.enable(OutputGenerator::RTF); + } + ol.parseText(lne ? lne->intro() : theTranslator->trInterfaceHierarchyDescription()); + ol.endTextBlock(); + + // --------------- + // Static interface hierarchy for Latex/RTF + // --------------- + ol.pushGeneratorState(); + //2.{ + ol.disable(OutputGenerator::Html); + Doxygen::indexList->disable(); + + writeClassHierarchy(ol,0,addToIndex,ClassDef::Interface); + + Doxygen::indexList->enable(); + ol.popGeneratorState(); + //2.} + + // --------------- + // Dynamic interface hierarchical index for HTML + // --------------- + ol.pushGeneratorState(); + //2.{ + ol.disableAllBut(OutputGenerator::Html); + + { + if (addToIndex) + { + Doxygen::indexList->addContentsItem(TRUE,title,0,"interfacehierarchy",0,TRUE,TRUE); + } + FTVHelp* ftv = new FTVHelp(FALSE); + writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Interface); + QGString outStr; + FTextStream t(&outStr); + ftv->generateTreeViewInline(t); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + ol.writeString(outStr); + ol.popGeneratorState(); + delete ftv; + } + ol.popGeneratorState(); + //2.} + // ------ + + endFile(ol); + ol.popGeneratorState(); + //1.} +} + +//---------------------------------------------------------------------------- + +static void writeGraphicalInterfaceHierarchy(OutputList &ol) +{ + if (hierarchyInterfaces==0) return; + ol.disableAllBut(OutputGenerator::Html); + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy); + QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy(); + startFile(ol,"interfaceinherits",0,title,HLI_InterfaceHierarchy,FALSE,"interfacehierarchy"); + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + ol.startContents(); + ol.startTextBlock(); + ol.startParagraph(); + ol.startTextLink("interfacehierarchy",0); + ol.parseText(theTranslator->trGotoTextualHierarchy()); + ol.endTextLink(); + ol.endParagraph(); + ol.endTextBlock(); + DotGfxHierarchyTable g("interface_",ClassDef::Interface); + ol.writeGraphicalHierarchy(g); + endFile(ol); + ol.enableAll(); +} + +//---------------------------------------------------------------------------- + +static void writeHierarchicalExceptionIndex(OutputList &ol) +{ + if (hierarchyExceptions==0) return; + ol.pushGeneratorState(); + //1.{ + ol.disable(OutputGenerator::Man); + + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy); + QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy(); + bool addToIndex = lne==0 || lne->visible(); + + startFile(ol,"exceptionhierarchy",0, title, HLI_ExceptionHierarchy); + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + ol.startContents(); + ol.startTextBlock(); + + if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY)) + { + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + ol.startParagraph(); + ol.startTextLink("exceptioninherits",0); + ol.parseText(theTranslator->trGotoGraphicalHierarchy()); + ol.endTextLink(); + ol.endParagraph(); + ol.enable(OutputGenerator::Latex); + ol.enable(OutputGenerator::RTF); + } + ol.parseText(lne ? lne->intro() : theTranslator->trExceptionHierarchyDescription()); + ol.endTextBlock(); + + // --------------- + // Static exception hierarchy for Latex/RTF + // --------------- + ol.pushGeneratorState(); + //2.{ + ol.disable(OutputGenerator::Html); + Doxygen::indexList->disable(); + + writeClassHierarchy(ol,0,addToIndex,ClassDef::Exception); + + Doxygen::indexList->enable(); + ol.popGeneratorState(); + //2.} + + // --------------- + // Dynamic exception hierarchical index for HTML + // --------------- + ol.pushGeneratorState(); + //2.{ + ol.disableAllBut(OutputGenerator::Html); + + { + if (addToIndex) + { + Doxygen::indexList->addContentsItem(TRUE,title,0,"exceptionhierarchy",0,TRUE,TRUE); + } + FTVHelp* ftv = new FTVHelp(FALSE); + writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Exception); + QGString outStr; + FTextStream t(&outStr); + ftv->generateTreeViewInline(t); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + ol.writeString(outStr); + ol.popGeneratorState(); + delete ftv; + } + ol.popGeneratorState(); + //2.} + // ------ + + endFile(ol); + ol.popGeneratorState(); + //1.} +} + +//---------------------------------------------------------------------------- + +static void writeGraphicalExceptionHierarchy(OutputList &ol) +{ + if (hierarchyExceptions==0) return; + ol.disableAllBut(OutputGenerator::Html); + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy); + QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy(); + startFile(ol,"exceptioninherits",0,title,HLI_ExceptionHierarchy,FALSE,"exceptionhierarchy"); + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + ol.startContents(); + ol.startTextBlock(); + ol.startParagraph(); + ol.startTextLink("exceptionhierarchy",0); + ol.parseText(theTranslator->trGotoTextualHierarchy()); + ol.endTextLink(); + ol.endParagraph(); + ol.endTextBlock(); + DotGfxHierarchyTable g("exception_",ClassDef::Exception); + ol.writeGraphicalHierarchy(g); + endFile(ol); + ol.enableAll(); +} + +//---------------------------------------------------------------------------- + static void countFiles(int &htmlFiles,int &files) { htmlFiles=0; @@ -1170,6 +1423,7 @@ static void writeFileIndex(OutputList &ol) ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); + ol.disable(OutputGenerator::Docbook); if (documentedFiles==0) ol.disableAllBut(OutputGenerator::Html); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileList); @@ -1317,8 +1571,9 @@ static int countNamespaces() //---------------------------------------------------------------------------- -void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool globalOnly) +void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool globalOnly,ClassDef::CompoundType ct) { + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); if (clDict) { ClassSDict::Iterator cli(*clDict); @@ -1340,6 +1595,11 @@ void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool globalO } } + if (sliceOpt && cd->compoundType() != ct) + { + continue; + } + if (!globalOnly || cd->getOuterScope()==0 || cd->getOuterScope()==Doxygen::globalScope @@ -1377,7 +1637,7 @@ void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool globalO if (count>0) { ftv->incContentsDepth(); - writeClassTree(cd->getClassSDict(),ftv,addToIndex,FALSE); + writeClassTree(cd->getClassSDict(),ftv,addToIndex,FALSE,ct); ftv->decContentsDepth(); } } @@ -1387,8 +1647,9 @@ void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool globalO } static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv, - bool rootOnly,bool showClasses,bool addToIndex) + bool rootOnly,bool showClasses,bool addToIndex,ClassDef::CompoundType ct) { + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); if (nsDict) { NamespaceSDict::Iterator nli(*nsDict); @@ -1399,7 +1660,7 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv, (!rootOnly || nd->getOuterScope()==Doxygen::globalScope)) { - bool hasChildren = namespaceHasVisibleChild(nd,showClasses); + bool hasChildren = namespaceHasVisibleChild(nd,showClasses,sliceOpt,ct); bool isLinkable = nd->isLinkableInProject(); QCString ref; @@ -1430,10 +1691,26 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv, { if (addToIndex) Doxygen::indexList->incContentsDepth(); ftv->incContentsDepth(); - writeNamespaceTree(nd->getNamespaceSDict(),ftv,FALSE,showClasses,addToIndex); + writeNamespaceTree(nd->getNamespaceSDict(),ftv,FALSE,showClasses,addToIndex,ct); if (showClasses) { - writeClassTree(nd->getClassSDict(),ftv,addToIndex,FALSE); + ClassSDict *d = nd->getClassSDict(); + if (sliceOpt) + { + if (ct == ClassDef::Interface) + { + d = nd->getInterfaceSDict(); + } + else if (ct == ClassDef::Struct) + { + d = nd->getStructSDict(); + } + else if (ct == ClassDef::Exception) + { + d = nd->getExceptionSDict(); + } + } + writeClassTree(d,ftv,addToIndex,FALSE,ct); } ftv->decContentsDepth(); if (addToIndex) Doxygen::indexList->decContentsDepth(); @@ -1450,6 +1727,7 @@ static void writeNamespaceIndex(OutputList &ol) if (documentedNamespaces==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); + ol.disable(OutputGenerator::Docbook); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceList); if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back QCString title = lne ? lne->title() : theTranslator->trNamespaceList(); @@ -1532,7 +1810,7 @@ static void writeNamespaceIndex(OutputList &ol) Doxygen::indexList->incContentsDepth(); } FTVHelp* ftv = new FTVHelp(FALSE); - writeNamespaceTree(Doxygen::namespaceSDict,ftv,TRUE,FALSE,addToIndex); + writeNamespaceTree(Doxygen::namespaceSDict,ftv,TRUE,FALSE,addToIndex,ClassDef::Class); QGString outStr; FTextStream t(&outStr); ftv->generateTreeViewInline(t); @@ -1553,14 +1831,19 @@ static void writeNamespaceIndex(OutputList &ol) //---------------------------------------------------------------------------- -static int countAnnotatedClasses(int *cp) +static int countAnnotatedClasses(int *cp, ClassDef::CompoundType ct) { + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); int count=0; int countPrinted=0; ClassSDict::Iterator cli(*Doxygen::classSDict); ClassDef *cd; for (;(cd=cli.current());++cli) { + if (sliceOpt && cd->compoundType() != ct) + { + continue; + } if (cd->isLinkableInProject() && cd->templateMaster()==0) { if (!cd->isEmbeddedInOuterScope()) @@ -1575,12 +1858,14 @@ static int countAnnotatedClasses(int *cp) } -static void writeAnnotatedClassList(OutputList &ol) +static void writeAnnotatedClassList(OutputList &ol,ClassDef::CompoundType ct) { //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList); //bool addToIndex = lne==0 || lne->visible(); bool first=TRUE; + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); + ClassSDict::Iterator cli(*Doxygen::classSDict); ClassDef *cd; @@ -1599,10 +1884,16 @@ static void writeAnnotatedClassList(OutputList &ol) first=FALSE; } + if (sliceOpt && cd->compoundType() != ct) + { + continue; + } + ol.pushGeneratorState(); if (cd->isEmbeddedInOuterScope()) { ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::Docbook); ol.disable(OutputGenerator::RTF); } if (cd->isLinkableInProject() && cd->templateMaster()==0) @@ -1768,8 +2059,10 @@ class UsedIndexLetters : public SIntDict<uint> }; // write an alphabetical index of all class with a header for each letter -static void writeAlphabeticalClassList(OutputList &ol) +static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int annotatedCount) { + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); + // What starting letters are used UsedIndexLetters indexLettersUsed; @@ -1780,6 +2073,8 @@ static void writeAlphabeticalClassList(OutputList &ol) int headerItems=0; for (;(cd=cli.current());++cli) { + if (sliceOpt && cd->compoundType() != ct) + continue; if (cd->isLinkableInProject() && cd->templateMaster()==0) { if (cd->getLanguage()==SrcLangExt_VHDL && !((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS ))// no architecture @@ -1815,7 +2110,7 @@ static void writeAlphabeticalClassList(OutputList &ol) const int columns = Config_getInt(COLS_IN_ALPHA_INDEX); int i,j; - int totalItems = headerItems*2 + annotatedClasses; // number of items in the table (headers span 2 items) + int totalItems = headerItems*2 + annotatedCount; // number of items in the table (headers span 2 items) int rows = (totalItems + columns - 1)/columns; // number of rows in the table //printf("headerItems=%d totalItems=%d columns=%d rows=%d itemsInLastRow=%d\n", @@ -1832,6 +2127,8 @@ static void writeAlphabeticalClassList(OutputList &ol) startLetter=0; for (cli.toFirst();(cd=cli.current());++cli) { + if (sliceOpt && cd->compoundType() != ct) + continue; if (cd->getLanguage()==SrcLangExt_VHDL && !((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS ))// no architecture continue; @@ -1987,11 +2284,12 @@ static void writeAlphabeticalClassList(OutputList &ol) } ol.writeNonBreakableSpace(3); } - ++(*colIterators[j]); - if (cell->letter()!=0 || cell->classDef()!=(ClassDef*)0x8) - { - ol.writeString("</td>"); + else + { + ol.writeString("<td>"); } + ++(*colIterators[j]); + ol.writeString("</td>"); } } else @@ -2037,7 +2335,94 @@ static void writeAlphabeticalIndex(OutputList &ol) } ol.startContents(); - writeAlphabeticalClassList(ol); + writeAlphabeticalClassList(ol, ClassDef::Class, annotatedClasses); + endFile(ol); // contains ol.endContents() + + ol.popGeneratorState(); +} + +//---------------------------------------------------------------------------- + +static void writeAlphabeticalInterfaceIndex(OutputList &ol) +{ + if (annotatedInterfaces==0) return; + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex); + QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex(); + bool addToIndex = lne==0 || lne->visible(); + + startFile(ol,"interfaces",0,title,HLI_Interfaces); + + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + + if (addToIndex) + { + Doxygen::indexList->addContentsItem(FALSE,title,0,"interfaces",0,FALSE,TRUE); + } + + ol.startContents(); + writeAlphabeticalClassList(ol, ClassDef::Interface, annotatedInterfaces); + endFile(ol); // contains ol.endContents() + + ol.popGeneratorState(); +} + +//---------------------------------------------------------------------------- + +static void writeAlphabeticalStructIndex(OutputList &ol) +{ + if (annotatedStructs==0) return; + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex); + QCString title = lne ? lne->title() : theTranslator->trStructIndex(); + bool addToIndex = lne==0 || lne->visible(); + + startFile(ol,"structs",0,title,HLI_Structs); + + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + + if (addToIndex) + { + Doxygen::indexList->addContentsItem(FALSE,title,0,"structs",0,FALSE,TRUE); + } + + ol.startContents(); + writeAlphabeticalClassList(ol, ClassDef::Struct, annotatedStructs); + endFile(ol); // contains ol.endContents() + + ol.popGeneratorState(); +} + +//---------------------------------------------------------------------------- + +static void writeAlphabeticalExceptionIndex(OutputList &ol) +{ + if (annotatedExceptions==0) return; + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex); + QCString title = lne ? lne->title() : theTranslator->trExceptionIndex(); + bool addToIndex = lne==0 || lne->visible(); + + startFile(ol,"exceptions",0,title,HLI_Exceptions); + + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + + if (addToIndex) + { + Doxygen::indexList->addContentsItem(FALSE,title,0,"exceptions",0,FALSE,TRUE); + } + + ol.startContents(); + writeAlphabeticalClassList(ol, ClassDef::Exception, annotatedExceptions); endFile(ol); // contains ol.endContents() ol.popGeneratorState(); @@ -2064,7 +2449,7 @@ static void writeAnnotatedIndex(OutputList &ol) bool addToIndex = lne==0 || lne->visible(); - startFile(ol,"annotated",0,title,HLI_Annotated); + startFile(ol,"annotated",0,title,HLI_AnnotatedClasses); startTitle(ol,0); ol.parseText(title); @@ -2083,7 +2468,7 @@ static void writeAnnotatedIndex(OutputList &ol) ol.disable(OutputGenerator::Html); Doxygen::indexList->disable(); - writeAnnotatedClassList(ol); + writeAnnotatedClassList(ol, ClassDef::Class); Doxygen::indexList->enable(); ol.popGeneratorState(); @@ -2101,8 +2486,239 @@ static void writeAnnotatedIndex(OutputList &ol) Doxygen::indexList->incContentsDepth(); } FTVHelp* ftv = new FTVHelp(FALSE); - writeNamespaceTree(Doxygen::namespaceSDict,ftv,TRUE,TRUE,addToIndex); - writeClassTree(Doxygen::classSDict,ftv,addToIndex,TRUE); + writeNamespaceTree(Doxygen::namespaceSDict,ftv,TRUE,TRUE,addToIndex,ClassDef::Class); + writeClassTree(Doxygen::classSDict,ftv,addToIndex,TRUE,ClassDef::Class); + QGString outStr; + FTextStream t(&outStr); + ftv->generateTreeViewInline(t); + ol.writeString(outStr); + delete ftv; + if (addToIndex) + { + Doxygen::indexList->decContentsDepth(); + } + } + + ol.popGeneratorState(); + // ------ + + endFile(ol); // contains ol.endContents() + ol.popGeneratorState(); +} + +//---------------------------------------------------------------------------- + +static void writeAnnotatedInterfaceIndex(OutputList &ol) +{ + //printf("writeAnnotatedInterfaceIndex: count=%d printed=%d\n", + // annotatedInterfaces,annotatedInterfacesPrinted); + if (annotatedInterfaces==0) return; + + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); + if (annotatedInterfacesPrinted==0) + { + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + } + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceList); + if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Interfaces); // fall back + QCString title = lne ? lne->title() : theTranslator->trInterfaceList(); + bool addToIndex = lne==0 || lne->visible(); + + startFile(ol,"annotatedinterfaces",0,title,HLI_AnnotatedInterfaces); + + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + + ol.startContents(); + + ol.startTextBlock(); + ol.parseText(lne ? lne->intro() : theTranslator->trInterfaceListDescription()); + ol.endTextBlock(); + + // --------------- + // Linear interface index for Latex/RTF + // --------------- + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Html); + Doxygen::indexList->disable(); + + writeAnnotatedClassList(ol, ClassDef::Interface); + + Doxygen::indexList->enable(); + ol.popGeneratorState(); + + // --------------- + // Hierarchical interface index for HTML + // --------------- + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + + { + if (addToIndex) + { + Doxygen::indexList->addContentsItem(TRUE,title,0,"annotatedinterfaces",0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); + } + FTVHelp* ftv = new FTVHelp(FALSE); + writeNamespaceTree(Doxygen::namespaceSDict,ftv,TRUE,TRUE,addToIndex,ClassDef::Interface); + writeClassTree(Doxygen::classSDict,ftv,addToIndex,TRUE,ClassDef::Interface); + QGString outStr; + FTextStream t(&outStr); + ftv->generateTreeViewInline(t); + ol.writeString(outStr); + delete ftv; + if (addToIndex) + { + Doxygen::indexList->decContentsDepth(); + } + } + + ol.popGeneratorState(); + // ------ + + endFile(ol); // contains ol.endContents() + ol.popGeneratorState(); +} + +//---------------------------------------------------------------------------- + +static void writeAnnotatedStructIndex(OutputList &ol) +{ + //printf("writeAnnotatedStructIndex: count=%d printed=%d\n", + // annotatedStructs,annotatedStructsPrinted); + if (annotatedStructs==0) return; + + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); + if (annotatedStructsPrinted==0) + { + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + } + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructList); + if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Structs); // fall back + QCString title = lne ? lne->title() : theTranslator->trStructList(); + bool addToIndex = lne==0 || lne->visible(); + + startFile(ol,"annotatedstructs",0,title,HLI_AnnotatedStructs); + + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + + ol.startContents(); + + ol.startTextBlock(); + ol.parseText(lne ? lne->intro() : theTranslator->trStructListDescription()); + ol.endTextBlock(); + + // --------------- + // Linear struct index for Latex/RTF + // --------------- + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Html); + Doxygen::indexList->disable(); + + writeAnnotatedClassList(ol, ClassDef::Struct); + + Doxygen::indexList->enable(); + ol.popGeneratorState(); + + // --------------- + // Hierarchical struct index for HTML + // --------------- + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + + { + if (addToIndex) + { + Doxygen::indexList->addContentsItem(TRUE,title,0,"annotatedstructs",0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); + } + FTVHelp* ftv = new FTVHelp(FALSE); + writeNamespaceTree(Doxygen::namespaceSDict,ftv,TRUE,TRUE,addToIndex,ClassDef::Struct); + writeClassTree(Doxygen::classSDict,ftv,addToIndex,TRUE,ClassDef::Struct); + QGString outStr; + FTextStream t(&outStr); + ftv->generateTreeViewInline(t); + ol.writeString(outStr); + delete ftv; + if (addToIndex) + { + Doxygen::indexList->decContentsDepth(); + } + } + + ol.popGeneratorState(); + // ------ + + endFile(ol); // contains ol.endContents() + ol.popGeneratorState(); +} + +//---------------------------------------------------------------------------- + +static void writeAnnotatedExceptionIndex(OutputList &ol) +{ + //printf("writeAnnotatedExceptionIndex: count=%d printed=%d\n", + // annotatedExceptions,annotatedExceptionsPrinted); + if (annotatedExceptions==0) return; + + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); + if (annotatedExceptionsPrinted==0) + { + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + } + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionList); + if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Exceptions); // fall back + QCString title = lne ? lne->title() : theTranslator->trExceptionList(); + bool addToIndex = lne==0 || lne->visible(); + + startFile(ol,"annotatedexceptions",0,title,HLI_AnnotatedExceptions); + + startTitle(ol,0); + ol.parseText(title); + endTitle(ol,0,0); + + ol.startContents(); + + ol.startTextBlock(); + ol.parseText(lne ? lne->intro() : theTranslator->trExceptionListDescription()); + ol.endTextBlock(); + + // --------------- + // Linear interface index for Latex/RTF + // --------------- + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Html); + Doxygen::indexList->disable(); + + writeAnnotatedClassList(ol, ClassDef::Exception); + + Doxygen::indexList->enable(); + ol.popGeneratorState(); + + // --------------- + // Hierarchical interface index for HTML + // --------------- + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + + { + if (addToIndex) + { + Doxygen::indexList->addContentsItem(TRUE,title,0,"annotatedexceptions",0,TRUE,TRUE); + Doxygen::indexList->incContentsDepth(); + } + FTVHelp* ftv = new FTVHelp(FALSE); + writeNamespaceTree(Doxygen::namespaceSDict,ftv,TRUE,TRUE,addToIndex,ClassDef::Exception); + writeClassTree(Doxygen::classSDict,ftv,addToIndex,TRUE,ClassDef::Exception); QGString outStr; FTextStream t(&outStr); ftv->generateTreeViewInline(t); @@ -2216,7 +2832,7 @@ static void writeMemberList(OutputList &ol,bool useSections,int page, if (!firstSection) ol.endItemList(); QCString cs = letterToLabel(ml->letter()); QCString cl = QString(QChar(ml->letter())).utf8(); - QCString anchor=(QCString)"index_"+cs; + QCString anchor=(QCString)"index_"+convertToId(cs); QCString title=(QCString)"- "+cl+" -"; ol.startSection(anchor,title,SectionInfo::Subsection); ol.docify(title); @@ -2388,6 +3004,16 @@ void addNamespaceMemberNameToIndex(MemberDef *md) g_namespaceIndexLetterUsed[NMHL_Typedefs].append(letter,md); documentedNamespaceMembers[NMHL_Typedefs]++; } + else if (md->isSequence()) + { + g_namespaceIndexLetterUsed[NMHL_Sequences].append(letter,md); + documentedNamespaceMembers[NMHL_Sequences]++; + } + else if (md->isDictionary()) + { + g_namespaceIndexLetterUsed[NMHL_Dictionaries].append(letter,md); + documentedNamespaceMembers[NMHL_Dictionaries]++; + } else if (md->isEnumerate()) { g_namespaceIndexLetterUsed[NMHL_Enums].append(letter,md); @@ -2445,6 +3071,16 @@ void addFileMemberNameToIndex(MemberDef *md) g_fileIndexLetterUsed[FMHL_Typedefs].append(letter,md); documentedFileMembers[FMHL_Typedefs]++; } + else if (md->isSequence()) + { + g_fileIndexLetterUsed[FMHL_Sequences].append(letter,md); + documentedFileMembers[FMHL_Sequences]++; + } + else if (md->isDictionary()) + { + g_fileIndexLetterUsed[FMHL_Dictionaries].append(letter,md); + documentedFileMembers[FMHL_Dictionaries]++; + } else if (md->isEnumerate()) { g_fileIndexLetterUsed[FMHL_Enums].append(letter,md); @@ -2487,7 +3123,7 @@ static void writeQuickMemberIndex(OutputList &ol, anchor=fullName+extension+"#index_"; else anchor=fullName+"_"+letterToLabel(i)+extension+"#index_"; - startQuickIndexItem(ol,anchor+is,i==page,TRUE,first); + startQuickIndexItem(ol,anchor+convertToId(is),i==page,TRUE,first); ol.writeString(ci); endQuickIndexItem(ol); first=FALSE; @@ -2688,6 +3324,7 @@ static const FmhlInfo *getFmhlInfo(int hl) { static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); static FmhlInfo fmhlInfo[] = { FmhlInfo("globals", theTranslator->trAll()), @@ -2695,8 +3332,10 @@ static const FmhlInfo *getFmhlInfo(int hl) fortranOpt ? theTranslator->trSubprograms() : vhdlOpt ? theTranslator->trFunctionAndProc() : theTranslator->trFunctions()), - FmhlInfo("globals_vars",theTranslator->trVariables()), + FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()), FmhlInfo("globals_type",theTranslator->trTypedefs()), + FmhlInfo("globals_sequ",theTranslator->trSequences()), + FmhlInfo("globals_dict",theTranslator->trDictionaries()), FmhlInfo("globals_enum",theTranslator->trEnumerations()), FmhlInfo("globals_eval",theTranslator->trEnumerationValues()), FmhlInfo("globals_defs",theTranslator->trDefines()) @@ -2832,6 +3471,8 @@ static void writeFileMemberIndex(OutputList &ol) writeFileMemberIndexFiltered(ol,FMHL_Functions); writeFileMemberIndexFiltered(ol,FMHL_Variables); writeFileMemberIndexFiltered(ol,FMHL_Typedefs); + writeFileMemberIndexFiltered(ol,FMHL_Sequences); + writeFileMemberIndexFiltered(ol,FMHL_Dictionaries); writeFileMemberIndexFiltered(ol,FMHL_Enums); writeFileMemberIndexFiltered(ol,FMHL_EnumValues); writeFileMemberIndexFiltered(ol,FMHL_Defines); @@ -2856,6 +3497,7 @@ static const NmhlInfo *getNmhlInfo(int hl) { static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); static NmhlInfo nmhlInfo[] = { NmhlInfo("namespacemembers", theTranslator->trAll()), @@ -2863,8 +3505,10 @@ static const NmhlInfo *getNmhlInfo(int hl) fortranOpt ? theTranslator->trSubprograms() : vhdlOpt ? theTranslator->trFunctionAndProc() : theTranslator->trFunctions()), - NmhlInfo("namespacemembers_vars",theTranslator->trVariables()), + NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()), NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()), + NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()), + NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()), NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()), NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues()) }; @@ -3004,6 +3648,8 @@ static void writeNamespaceMemberIndex(OutputList &ol) writeNamespaceMemberIndexFiltered(ol,NMHL_Functions); writeNamespaceMemberIndexFiltered(ol,NMHL_Variables); writeNamespaceMemberIndexFiltered(ol,NMHL_Typedefs); + writeNamespaceMemberIndexFiltered(ol,NMHL_Sequences); + writeNamespaceMemberIndexFiltered(ol,NMHL_Dictionaries); writeNamespaceMemberIndexFiltered(ol,NMHL_Enums); writeNamespaceMemberIndexFiltered(ol,NMHL_EnumValues); if (documentedNamespaceMembers[NMHL_All]>0 && addToIndex) @@ -3022,6 +3668,7 @@ static void writeExampleIndex(OutputList &ol) if (Doxygen::exampleSDict->count()==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); + ol.disable(OutputGenerator::Docbook); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples); QCString title = lne ? lne->title() : theTranslator->trExamples(); bool addToIndex = lne==0 || lne->visible(); @@ -3621,6 +4268,7 @@ static void writeGroupIndex(OutputList &ol) ol.pushGeneratorState(); // 1.{ ol.disable(OutputGenerator::Man); + ol.disable(OutputGenerator::Docbook); LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); QCString title = lne ? lne->title() : theTranslator->trModules(); bool addToIndex = lne==0 || lne->visible(); @@ -3910,6 +4558,7 @@ static void writeIndex(OutputList &ol) // write LaTeX/RTF index //-------------------------------------------------------------------- ol.enable(OutputGenerator::Latex); + ol.enable(OutputGenerator::Docbook); ol.enable(OutputGenerator::RTF); ol.startFile("refman",0,0); @@ -3918,6 +4567,7 @@ static void writeIndex(OutputList &ol) { ol.disable(OutputGenerator::Latex); } + ol.disable(OutputGenerator::Docbook); if (projPrefix.isEmpty()) { @@ -3939,6 +4589,7 @@ static void writeIndex(OutputList &ol) ol.parseText(theTranslator->trGeneratedBy()); ol.endIndexSection(isTitlePageAuthor); ol.enable(OutputGenerator::Latex); + ol.enable(OutputGenerator::Docbook); ol.lastIndexPage(); if (Doxygen::mainPage) @@ -3978,9 +4629,11 @@ static void writeIndex(OutputList &ol) QCString title = pd->title(); if (title.isEmpty()) title=pd->name(); + ol.disable(OutputGenerator::Docbook); ol.startIndexSection(isPageDocumentation); ol.parseText(title); ol.endIndexSection(isPageDocumentation); + ol.enable(OutputGenerator::Docbook); ol.pushGeneratorState(); // write TOC title (RTF only) ol.disableAllBut(OutputGenerator::RTF); @@ -4002,6 +4655,7 @@ static void writeIndex(OutputList &ol) } } + ol.disable(OutputGenerator::Docbook); if (!Config_getBool(LATEX_HIDE_INDICES)) { //if (indexedPages>0) @@ -4022,6 +4676,12 @@ static void writeIndex(OutputList &ol) ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex())); ol.endIndexSection(isNamespaceIndex); } + if (hierarchyInterfaces>0) + { + ol.startIndexSection(isClassHierarchyIndex); + ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex()); + ol.endIndexSection(isClassHierarchyIndex); + } if (hierarchyClasses>0) { ol.startIndexSection(isClassHierarchyIndex); @@ -4032,6 +4692,18 @@ static void writeIndex(OutputList &ol) )); ol.endIndexSection(isClassHierarchyIndex); } + if (hierarchyExceptions>0) + { + ol.startIndexSection(isClassHierarchyIndex); + ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex()); + ol.endIndexSection(isClassHierarchyIndex); + } + if (annotatedInterfacesPrinted>0) + { + ol.startIndexSection(isCompoundIndex); + ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex()); + ol.endIndexSection(isCompoundIndex); + } if (annotatedClassesPrinted>0) { ol.startIndexSection(isCompoundIndex); @@ -4042,6 +4714,18 @@ static void writeIndex(OutputList &ol) )); ol.endIndexSection(isCompoundIndex); } + if (annotatedStructsPrinted>0) + { + ol.startIndexSection(isCompoundIndex); + ol.parseText(/*projPrefix+*/theTranslator->trStructIndex()); + ol.endIndexSection(isCompoundIndex); + } + if (annotatedExceptionsPrinted>0) + { + ol.startIndexSection(isCompoundIndex); + ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex()); + ol.endIndexSection(isCompoundIndex); + } if (documentedFiles>0) { ol.startIndexSection(isFileIndex); @@ -4049,6 +4733,8 @@ static void writeIndex(OutputList &ol) ol.endIndexSection(isFileIndex); } } + ol.enable(OutputGenerator::Docbook); + if (documentedGroups>0) { ol.startIndexSection(isModuleDocumentation); @@ -4061,12 +4747,30 @@ static void writeIndex(OutputList &ol) ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation())); ol.endIndexSection(isNamespaceDocumentation); } + if (annotatedInterfacesPrinted>0) + { + ol.startIndexSection(isClassDocumentation); + ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation()); + ol.endIndexSection(isClassDocumentation); + } if (annotatedClassesPrinted>0) { ol.startIndexSection(isClassDocumentation); ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation())); ol.endIndexSection(isClassDocumentation); } + if (annotatedStructsPrinted>0) + { + ol.startIndexSection(isClassDocumentation); + ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation()); + ol.endIndexSection(isClassDocumentation); + } + if (annotatedExceptionsPrinted>0) + { + ol.startIndexSection(isClassDocumentation); + ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation()); + ol.endIndexSection(isClassDocumentation); + } if (documentedFiles>0) { ol.startIndexSection(isFileDocumentation); @@ -4105,6 +4809,7 @@ static QArray<bool> indexWritten; static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry> &entries) { + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); QListIterator<LayoutNavEntry> li(entries); LayoutNavEntry *lne; for (li.toFirst();(lne=li.current());++li) @@ -4202,8 +4907,101 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry } break; case LayoutNavEntry::ClassMembers: - msg("Generating member index...\n"); - writeClassMemberIndex(ol); + if (!sliceOpt) + { + msg("Generating member index...\n"); + writeClassMemberIndex(ol); + } + break; + case LayoutNavEntry::Interfaces: + if (sliceOpt && annotatedInterfaces>0 && addToIndex) + { + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0); + Doxygen::indexList->incContentsDepth(); + needsClosing=TRUE; + } + break; + case LayoutNavEntry::InterfaceList: + if (sliceOpt) + { + msg("Generating annotated interface index...\n"); + writeAnnotatedInterfaceIndex(ol); + } + break; + case LayoutNavEntry::InterfaceIndex: + if (sliceOpt) + { + msg("Generating alphabetical interface index...\n"); + writeAlphabeticalInterfaceIndex(ol); + } + break; + case LayoutNavEntry::InterfaceHierarchy: + if (sliceOpt) + { + msg("Generating hierarchical interface index...\n"); + writeHierarchicalInterfaceIndex(ol); + if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY)) + { + msg("Generating graphical interface hierarchy...\n"); + writeGraphicalInterfaceHierarchy(ol); + } + } + break; + case LayoutNavEntry::Structs: + if (sliceOpt && annotatedStructs>0 && addToIndex) + { + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0); + Doxygen::indexList->incContentsDepth(); + needsClosing=TRUE; + } + break; + case LayoutNavEntry::StructList: + if (sliceOpt) + { + msg("Generating annotated struct index...\n"); + writeAnnotatedStructIndex(ol); + } + break; + case LayoutNavEntry::StructIndex: + if (sliceOpt) + { + msg("Generating alphabetical struct index...\n"); + writeAlphabeticalStructIndex(ol); + } + break; + case LayoutNavEntry::Exceptions: + if (sliceOpt && annotatedExceptions>0 && addToIndex) + { + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0); + Doxygen::indexList->incContentsDepth(); + needsClosing=TRUE; + } + break; + case LayoutNavEntry::ExceptionList: + if (sliceOpt) + { + msg("Generating annotated exception index...\n"); + writeAnnotatedExceptionIndex(ol); + } + break; + case LayoutNavEntry::ExceptionIndex: + if (sliceOpt) + { + msg("Generating alphabetical exception index...\n"); + writeAlphabeticalExceptionIndex(ol); + } + break; + case LayoutNavEntry::ExceptionHierarchy: + if (sliceOpt) + { + msg("Generating hierarchical exception index...\n"); + writeHierarchicalExceptionIndex(ol); + if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY)) + { + msg("Generating graphical exception hierarchy...\n"); + writeGraphicalExceptionHierarchy(ol); + } + } break; case LayoutNavEntry::Files: { @@ -4285,6 +5083,9 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry } writeUserGroupStubPage(ol,lne); break; + case LayoutNavEntry::None: + assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized + break; } if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times { @@ -4314,26 +5115,40 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind) { static bool showFiles = Config_getBool(SHOW_FILES); static bool showNamespaces = Config_getBool(SHOW_NAMESPACES); + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); switch (kind) { - case LayoutNavEntry::MainPage: return TRUE; - case LayoutNavEntry::User: return TRUE; - case LayoutNavEntry::UserGroup: return TRUE; - case LayoutNavEntry::Pages: return indexedPages>0; - case LayoutNavEntry::Modules: return documentedGroups>0; - case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces; - case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces; - case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0; - case LayoutNavEntry::Classes: return annotatedClasses>0; - case LayoutNavEntry::ClassList: return annotatedClasses>0; - case LayoutNavEntry::ClassIndex: return annotatedClasses>0; - case LayoutNavEntry::ClassHierarchy: return hierarchyClasses>0; - case LayoutNavEntry::ClassMembers: return documentedClassMembers[CMHL_All]>0; - case LayoutNavEntry::Files: return documentedHtmlFiles>0 && showFiles; - case LayoutNavEntry::FileList: return documentedHtmlFiles>0 && showFiles; - case LayoutNavEntry::FileGlobals: return documentedFileMembers[FMHL_All]>0; - //case LayoutNavEntry::Dirs: return documentedDirs>0; - case LayoutNavEntry::Examples: return Doxygen::exampleSDict->count()>0; + case LayoutNavEntry::MainPage: return TRUE; + case LayoutNavEntry::User: return TRUE; + case LayoutNavEntry::UserGroup: return TRUE; + case LayoutNavEntry::Pages: return indexedPages>0; + case LayoutNavEntry::Modules: return documentedGroups>0; + case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces; + case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces; + case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0; + case LayoutNavEntry::Classes: return annotatedClasses>0; + case LayoutNavEntry::ClassList: return annotatedClasses>0; + case LayoutNavEntry::ClassIndex: return annotatedClasses>0; + case LayoutNavEntry::ClassHierarchy: return hierarchyClasses>0; + case LayoutNavEntry::ClassMembers: return documentedClassMembers[CMHL_All]>0 && !sliceOpt; + case LayoutNavEntry::Interfaces: return annotatedInterfaces>0; + case LayoutNavEntry::InterfaceList: return annotatedInterfaces>0; + case LayoutNavEntry::InterfaceIndex: return annotatedInterfaces>0; + case LayoutNavEntry::InterfaceHierarchy: return hierarchyInterfaces>0; + case LayoutNavEntry::Structs: return annotatedStructs>0; + case LayoutNavEntry::StructList: return annotatedStructs>0; + case LayoutNavEntry::StructIndex: return annotatedStructs>0; + case LayoutNavEntry::Exceptions: return annotatedExceptions>0; + case LayoutNavEntry::ExceptionList: return annotatedExceptions>0; + case LayoutNavEntry::ExceptionIndex: return annotatedExceptions>0; + case LayoutNavEntry::ExceptionHierarchy: return hierarchyExceptions>0; + case LayoutNavEntry::Files: return documentedHtmlFiles>0 && showFiles; + case LayoutNavEntry::FileList: return documentedHtmlFiles>0 && showFiles; + case LayoutNavEntry::FileGlobals: return documentedFileMembers[FMHL_All]>0; + case LayoutNavEntry::Examples: return Doxygen::exampleSDict->count()>0; + case LayoutNavEntry::None: // should never happen, means not properly initialized + assert(kind != LayoutNavEntry::None); + return FALSE; } return FALSE; } @@ -4386,7 +5201,7 @@ void renderMemberIndicesAsJs(FTextStream &t, else // other pages of multi page index anchor=fullName+"_"+is+extension+"#index_"; t << "{text:\"" << convertToJSString(ci) << "\",url:\"" - << convertToJSString(anchor+is, false) << "\"}"; + << convertToJSString(anchor+convertToId(is), false) << "\"}"; firstLetter=FALSE; } t << "]"; |