Doxygen
Loading...
Searching...
No Matches
index.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2023 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15
16/** @file
17 * @brief This file contains functions for the various index pages.
18 */
19
20#include <cstdlib>
21#include <array>
22
23#include <assert.h>
24
25#include "message.h"
26#include "index.h"
27#include "indexlist.h"
28#include "doxygen.h"
29#include "config.h"
30#include "filedef.h"
31#include "outputlist.h"
32#include "util.h"
33#include "groupdef.h"
34#include "language.h"
35#include "htmlgen.h"
36#include "htmlhelp.h"
37#include "ftvhelp.h"
38#include "dot.h"
40#include "dotlegendgraph.h"
41#include "pagedef.h"
42#include "dirdef.h"
43#include "vhdldocgen.h"
44#include "layout.h"
45#include "memberlist.h"
46#include "classlist.h"
47#include "namespacedef.h"
48#include "filename.h"
49#include "tooltip.h"
50#include "utf8.h"
51#include "portable.h"
52#include "moduledef.h"
53#include "sitemap.h"
54
55#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200
56#define MAX_ITEMS_BEFORE_QUICK_INDEX 30
57
58// helpers
60static void countFiles(int &htmlFiles,int &files);
61static int countGroups();
62static int countDirs();
63static int countNamespaces();
64static int countConcepts();
66static void countRelatedPages(int &docPages,int &indexPages);
67
68
70{
86 int indexedPages = 0;
90 std::array<int, ClassMemberHighlight::Total> documentedClassMembers = {};
91 std::array<int, FileMemberHighlight::Total> documentedFileMembers = {};
92 std::array<int,NamespaceMemberHighlight::Total> documentedNamespaceMembers = {};
93 std::array<int, ModuleMemberHighlight::Total> documentedModuleMembers = {};
94 std::array<MemberIndexMap,ClassMemberHighlight::Total> classIndexLetterUsed;
95 std::array<MemberIndexMap,FileMemberHighlight::Total> fileIndexLetterUsed;
96 std::array<MemberIndexMap,NamespaceMemberHighlight::Total> namespaceIndexLetterUsed;
97 std::array<MemberIndexMap,ModuleMemberHighlight::Total> moduleIndexLetterUsed;
98};
99
100Index::Index() : p(std::make_unique<Private>())
101{
102}
103
104Index::~Index() = default;
105
107{
108 static Index index;
109 return index;
110}
111
112int Index::numAnnotatedClasses() const { return p->annotatedClasses; }
113int Index::numAnnotatedClassesPrinted() const { return p->annotatedClassesPrinted; }
114int Index::numHierarchyClasses() const { return p->hierarchyClasses; }
115int Index::numAnnotatedInterfaces() const { return p->annotatedInterfaces; }
116int Index::numAnnotatedInterfacesPrinted() const { return p->annotatedInterfacesPrinted; }
117int Index::numHierarchyInterfaces() const { return p->hierarchyInterfaces; }
118int Index::numAnnotatedStructs() const { return p->annotatedStructs; }
119int Index::numAnnotatedStructsPrinted() const { return p->annotatedStructsPrinted; }
120int Index::numAnnotatedExceptions() const { return p->annotatedExceptions; }
121int Index::numAnnotatedExceptionsPrinted() const { return p->annotatedExceptionsPrinted; }
122int Index::numHierarchyExceptions() const { return p->hierarchyExceptions; }
123int Index::numDocumentedGroups() const { return p->documentedGroups; }
124int Index::numDocumentedNamespaces() const { return p->documentedNamespaces; }
125int Index::numDocumentedConcepts() const { return p->documentedConcepts; }
126int Index::numDocumentedModules() const { return p->documentedModules; }
127int Index::numIndexedPages() const { return p->indexedPages; }
128int Index::numDocumentedFiles() const { return p->documentedFiles; }
129int Index::numDocumentedPages() const { return p->documentedPages; }
130int Index::numDocumentedDirs() const { return p->documentedDirs; }
131int Index::numDocumentedClassMembers(ClassMemberHighlight::Enum e) const { return p->documentedClassMembers[e]; }
132int Index::numDocumentedFileMembers(FileMemberHighlight::Enum e) const { return p->documentedFileMembers[e]; }
133int Index::numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const { return p->documentedNamespaceMembers[e]; }
134int Index::numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const { return p->documentedModuleMembers[e]; }
135
137{
138 return p->classIndexLetterUsed[static_cast<int>(e)];
139}
140
142{
143 return p->fileIndexLetterUsed[static_cast<int>(e)];
144}
145
147{
148 return p->namespaceIndexLetterUsed[static_cast<int>(e)];
149}
150
152{
153 return p->moduleIndexLetterUsed[static_cast<int>(e)];
154}
155
157{
158 p->documentedClassMembers[i]=0;
159 p->classIndexLetterUsed[i].clear();
160}
161
163{
164 p->documentedFileMembers[i]=0;
165 p->fileIndexLetterUsed[i].clear();
166}
167
169{
170 p->documentedNamespaceMembers[i]=0;
171 p->namespaceIndexLetterUsed[i].clear();
172}
173
175{
176 p->documentedModuleMembers[i]=0;
177 p->moduleIndexLetterUsed[i].clear();
178}
179
180static void MemberIndexMap_add(Index::MemberIndexMap &map,const std::string &letter,const MemberDef *md)
181{
182 auto it = map.find(letter);
183 if (it!=map.end())
184 {
185 it->second.push_back(md);
186 }
187 else
188 {
189 map.emplace(letter,std::vector<const MemberDef*>({md}));
190 }
191}
192
193void Index::incrementDocumentedClassMembers(int i,const std::string &letter,const MemberDef *md)
194{
195 p->documentedClassMembers[i]++;
196 MemberIndexMap_add(p->classIndexLetterUsed[i],letter,md);
197}
198
199void Index::incrementDocumentedFileMembers(int i,const std::string &letter,const MemberDef *md)
200{
201 p->documentedFileMembers[i]++;
202 MemberIndexMap_add(p->fileIndexLetterUsed[i],letter,md);
203}
204
205void Index::incrementDocumentedNamespaceMembers(int i,const std::string &letter,const MemberDef *md)
206{
207 p->documentedNamespaceMembers[i]++;
208 MemberIndexMap_add(p->namespaceIndexLetterUsed[i],letter,md);
209}
210
211void Index::incrementDocumentedModuleMembers(int i,const std::string &letter,const MemberDef *md)
212{
213 p->documentedModuleMembers[i]++;
214 MemberIndexMap_add(p->moduleIndexLetterUsed[i],letter,md);
215}
216
217
219{
220 auto sortMemberIndexList = [](MemberIndexMap &map)
221 {
222 for (auto &[name,list] : map)
223 {
224 std::stable_sort(list.begin(),list.end(),
225 [](const MemberDef *md1,const MemberDef *md2)
226 {
227 // consider candidates A::a, B::b, B::a, A::b, A::A, B::B,
228 // want after sorting: A::A, A::a, B::a, B::B, A::b, B::b
229 // so we can later group entries
230 // - A: A
231 // - a: A, B
232 // - B: B
233 // - b: A, B
234 int result = qstricmp_sort(md1->name(),md2->name());
235 if (result==0) // next compare with full scope
236 {
237 result = qstricmp_sort(md1->qualifiedName(),md2->qualifiedName());
238 }
239 return result<0;
240 });
241 }
242 };
243
244 for (auto &idx : p->classIndexLetterUsed)
245 {
246 sortMemberIndexList(idx);
247 }
248 for (auto &idx : p->fileIndexLetterUsed)
249 {
250 sortMemberIndexList(idx);
251 }
252 for (auto &idx : p->namespaceIndexLetterUsed)
253 {
254 sortMemberIndexList(idx);
255 }
256 for (auto &idx : p->moduleIndexLetterUsed)
257 {
258 sortMemberIndexList(idx);
259 }
260}
261
263{
264 for (int j=0;j<ClassMemberHighlight::Total;j++)
265 {
267 }
268 for (int j=0;j<NamespaceMemberHighlight::Total;j++)
269 {
271 }
272 for (int j=0;j<FileMemberHighlight::Total;j++)
273 {
275 }
276 for (int j=0;j<ModuleMemberHighlight::Total;j++)
277 {
279 }
280
281 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
282 p->annotatedClasses = countAnnotatedClasses(&p->annotatedClassesPrinted, ClassDef::Class); // "classes" + "annotated"
283 p->hierarchyClasses = countClassHierarchy(ClassDef::Class); // "hierarchy"
284 // "interfaces" + "annotated"
285 p->annotatedInterfaces = sliceOpt ? countAnnotatedClasses(&p->annotatedInterfacesPrinted, ClassDef::Interface) : 0;
286 // "interfacehierarchy"
287 p->hierarchyInterfaces = sliceOpt ? countClassHierarchy(ClassDef::Interface) : 0;
288 // "structs" + "annotated"
289 p->annotatedStructs = sliceOpt ? countAnnotatedClasses(&p->annotatedStructsPrinted, ClassDef::Struct) : 0;
290 // "exceptions" + "annotated"
291 p->annotatedExceptions = sliceOpt ? countAnnotatedClasses(&p->annotatedExceptionsPrinted, ClassDef::Exception) : 0;
292 // "exceptionhierarchy"
293 p->hierarchyExceptions = sliceOpt ? countClassHierarchy(ClassDef::Exception) : 0;
294 countFiles(p->documentedFiles,p->documentedFiles); // "files"
295 countRelatedPages(p->documentedPages,p->indexedPages); // "pages"
296 p->documentedGroups = countGroups(); // "topics"
297 p->documentedNamespaces = countNamespaces(); // "namespaces"
298 p->documentedConcepts = countConcepts(); // "concepts"
299 p->documentedDirs = countDirs(); // "dirs"
300 p->documentedModules = ModuleManager::instance().numDocumentedModules();
301 // "globals"
302 // "namespacemembers"
303 // "functions"
304}
305
306
307static void startIndexHierarchy(OutputList &ol,int level)
308{
312 if (level<6) ol.startIndexList();
314
319 ol.startItemList();
321}
322
323static void endIndexHierarchy(OutputList &ol,int level)
324{
328 if (level<6) ol.endIndexList();
330
335 ol.endItemList();
337}
338
339//----------------------------------------------------------------------------
340
342
343//----------------------------------------------------------------------------
344
345static void startQuickIndexList(OutputList &ol,bool letterTabs=FALSE)
346{
347 if (letterTabs)
348 {
349 ol.writeString(" <div id=\"navrow4\" class=\"tabs3\">\n");
350 }
351 else
352 {
353 ol.writeString(" <div id=\"navrow3\" class=\"tabs2\">\n");
354 }
355 ol.writeString(" <ul class=\"tablist\">\n");
356}
357
359{
360 ol.writeString(" </ul>\n");
361 ol.writeString(" </div>\n");
362}
363
364static void startQuickIndexItem(OutputList &ol,const QCString &l,
365 bool hl,bool /* compact */,bool &first)
366{
367 first=FALSE;
368 ol.writeString(" <li");
369 if (hl) ol.writeString(" class=\"current\"");
370 ol.writeString("><a ");
371 ol.writeString("href=\"");
372 ol.writeString(l);
373 ol.writeString("\">");
374 ol.writeString("<span>");
375}
376
378{
379 ol.writeString("</span>");
380 ol.writeString("</a>");
381 ol.writeString("</li>\n");
382}
383
384void startTitle(OutputList &ol,const QCString &fileName,const DefinitionMutable *def)
385{
387 if (def) def->writeSummaryLinks(ol);
388 ol.startTitleHead(fileName);
391}
392
393void endTitle(OutputList &ol,const QCString &fileName,const QCString &name)
394{
396 ol.endTitleHead(fileName,name);
397 ol.endHeaderSection();
398}
399
400void startFile(OutputList &ol,const QCString &name,const QCString &manName,
401 const QCString &title,HighlightedItem hli,bool additionalIndices,
402 const QCString &altSidebarName, int hierarchyLevel)
403{
404 bool disableIndex = Config_getBool(DISABLE_INDEX);
405 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
406 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
407 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
408 ol.startFile(name,manName,title,hierarchyLevel);
410 if (!disableIndex && !quickLinksAfterSplitbar)
411 {
412 ol.writeQuickLinks(hli,name);
413 }
414 if (!additionalIndices)
415 {
416 ol.endQuickIndices();
417 }
418 ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name);
419 if (quickLinksAfterSplitbar)
420 {
421 ol.writeQuickLinks(hli,name);
422 }
423 ol.writeSearchInfo();
424}
425
426void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents,
427 const QCString &navPath)
428{
429 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
432 if (!skipNavIndex)
433 {
434 if (!skipEndContents) ol.endContents();
435 if (generateTreeView)
436 {
437 ol.writeString("</div><!-- doc-content -->\n");
438 }
439 }
440
441 ol.writeFooter(navPath); // write the footer
443 ol.endFile();
444}
445
447{
448 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
449 QCString navPath;
450 if (generateTreeView)
451 {
454 ol.writeString("</div><!-- doc-content -->\n");
456 navPath = d->navigationPathAsString();
457 }
458 endFile(ol,generateTreeView,TRUE,navPath);
459}
460
461//----------------------------------------------------------------------
462
463static void writeMemberToIndex(const Definition *def,const MemberDef *md,bool addToIndex)
464{
465 bool isAnonymous = md->isAnonymous();
466 bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
467 const MemberVector &enumList = md->enumFieldList();
468 bool isDir = !enumList.empty() && md->isEnumerate();
469 auto defType = def->definitionType();
470 bool namespaceMemberInFileDocs = md->getNamespaceDef() && defType==Definition::TypeFile;
471 bool lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
472 QCString name = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
473 md->qualifiedName() : md->name();
474 if (md->getOuterScope()==def ||
475 (md->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
477 {
478 Doxygen::indexList->addContentsItem(isDir,
479 name,md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
480 }
481 else // inherited member
482 {
483 Doxygen::indexList->addContentsItem(isDir,
484 name,def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
485 }
486 if (isDir)
487 {
488 if (!isAnonymous)
489 {
490 Doxygen::indexList->incContentsDepth();
491 }
492 for (const auto &emd : enumList)
493 {
494 if (!hideUndocMembers || emd->hasDocumentation())
495 {
496 namespaceMemberInFileDocs = emd->getNamespaceDef() && defType==Definition::TypeFile;
497 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
498 QCString ename = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
499 emd->qualifiedName() : emd->name();
500 if (emd->getOuterScope()==def ||
501 (emd->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
503 {
504 Doxygen::indexList->addContentsItem(FALSE,
505 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
506 }
507 else // inherited member
508 {
509 Doxygen::indexList->addContentsItem(FALSE,
510 ename,def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
511 }
512 }
513 }
514 if (!isAnonymous)
515 {
516 Doxygen::indexList->decContentsDepth();
517 }
518 }
519}
520
521//----------------------------------------------------------------------
522template<class T>
524 const QCString &name,const QCString &anchor,
525 bool addToIndex=TRUE,bool preventSeparateIndex=FALSE,
526 const ConceptLinkedRefMap *concepts = nullptr)
527
528{
529 int numClasses=0;
530 for (const auto &cd : def->getClasses())
531 {
532 if (cd->isLinkable()) numClasses++;
533 }
534 int numConcepts=0;
535 if (concepts)
536 {
537 for (const auto &cd : *concepts)
538 {
539 if (cd->isLinkable()) numConcepts++;
540 }
541 }
542 bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
543 Doxygen::indexList->addContentsItem(hasMembers,name,
544 def->getReference(),def->getOutputFileBase(),anchor,
545 hasMembers && !preventSeparateIndex,
546 addToIndex,
547 def);
548 //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
549 if (hasMembers || numClasses>0 || numConcepts>0)
550 {
551 Doxygen::indexList->incContentsDepth();
552 for (const auto &lde : LayoutDocManager::instance().docEntries(part))
553 {
554 auto kind = lde->kind();
555 if (kind==LayoutDocEntry::MemberDef)
556 {
557 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
558 if (lmd)
559 {
560 MemberList *ml = def->getMemberList(lmd->type);
561 if (ml)
562 {
563 for (const auto &md : *ml)
564 {
565 if (md->visibleInIndex())
566 {
567 writeMemberToIndex(def,md,addToIndex);
568 }
569 }
570 }
571 }
572 }
573 else if (kind==LayoutDocEntry::NamespaceClasses ||
574 kind==LayoutDocEntry::FileClasses ||
575 kind==LayoutDocEntry::ClassNestedClasses ||
576 kind==LayoutDocEntry::ModuleClasses
577 )
578 {
579 for (const auto &cd : def->getClasses())
580 {
581 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
582 {
583 bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
584 bool isNestedClass = def->definitionType()==Definition::TypeClass;
585 addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
586 addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
587 preventSeparateIndex || cd->isEmbeddedInOuterScope());
588 }
589 }
590 }
591 else if ((kind==LayoutDocEntry::FileConcepts || kind==LayoutDocEntry::ModuleConcepts) && concepts)
592 {
593 for (const auto &cd : *concepts)
594 {
595 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
596 {
597 Doxygen::indexList->addContentsItem(false,cd->displayName(),
598 cd->getReference(),cd->getOutputFileBase(),QCString(),
599 addToIndex,
600 false,
601 cd);
602 }
603 }
604 }
605 }
606
607 Doxygen::indexList->decContentsDepth();
608 }
609}
610
611
612//----------------------------------------------------------------------------
613/*! Generates HTML Help tree of classes */
614
615static void writeClassTreeToOutput(OutputList &ol,const BaseClassList &bcl,int level,FTVHelp* ftv,bool addToIndex,ClassDefSet &visitedClasses)
616{
617 if (bcl.empty()) return;
618 bool started=FALSE;
619 for (const auto &bcd : bcl)
620 {
621 ClassDef *cd=bcd.classDef;
623 {
624 continue;
625 }
626
628
629 if (cd->isVisibleInHierarchy() && b) // classHasVisibleRoot(cd->baseClasses()))
630 {
631 if (!started)
632 {
633 startIndexHierarchy(ol,level);
634 if (addToIndex)
635 {
636 Doxygen::indexList->incContentsDepth();
637 }
638 if (ftv)
639 {
640 ftv->incContentsDepth();
641 }
642 started=TRUE;
643 }
645 //printf("Passed...\n");
646 bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
648 //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
649 if (cd->isLinkable())
650 {
651 //printf("Writing class %s\n",qPrint(cd->displayName()));
653 ol.parseText(cd->displayName());
655 if (cd->isReference())
656 {
657 ol.startTypewriter();
658 ol.docify(" [external]");
659 ol.endTypewriter();
660 }
661 if (addToIndex)
662 {
663 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor());
664 }
665 if (ftv)
666 {
667 if (cd->getLanguage()==SrcLangExt::VHDL)
668 {
669 ftv->addContentsItem(hasChildren,bcd.usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
670 }
671 else
672 {
673 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
674 }
675 }
676 }
677 else
678 {
680 ol.parseText(cd->name());
682 if (addToIndex)
683 {
684 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString());
685 }
686 if (ftv)
687 {
688 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd);
689 }
690 }
691 if (hasChildren)
692 {
693 //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
694 visitedClasses.insert(cd);
695 if (cd->getLanguage()==SrcLangExt::VHDL)
696 {
697 writeClassTreeToOutput(ol,cd->baseClasses(),level+1,ftv,addToIndex,visitedClasses);
698 }
699 else
700 {
701 writeClassTreeToOutput(ol,cd->subClasses(),level+1,ftv,addToIndex,visitedClasses);
702 }
703 }
704 ol.endIndexListItem();
705 }
706 }
707 if (started)
708 {
709 endIndexHierarchy(ol,level);
710 if (addToIndex)
711 {
712 Doxygen::indexList->decContentsDepth();
713 }
714 if (ftv)
715 {
716 ftv->decContentsDepth();
717 }
718 }
719}
720
721//----------------------------------------------------------------------------
722
723static bool dirHasVisibleChildren(const DirDef *dd)
724{
725 if (dd->hasDocumentation()) return TRUE;
726
727 for (const auto &fd : dd->getFiles())
728 {
729 bool genSourceFile = false;
730 if (fileVisibleInIndex(fd,genSourceFile))
731 {
732 return TRUE;
733 }
734 if (genSourceFile)
735 {
736 return TRUE;
737 }
738 }
739
740 for(const auto &subdd : dd->subDirs())
741 {
742 if (dirHasVisibleChildren(subdd))
743 {
744 return TRUE;
745 }
746 }
747 return FALSE;
748}
749
750//----------------------------------------------------------------------------
751static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp* ftv,bool addToIndex)
752{
753 if (level>20)
754 {
755 warn(dd->getDefFileName(),dd->getDefLine(),
756 "maximum nesting level exceeded for directory {}: "
757 "check for possible recursive directory relation!",dd->name());
758 return;
759 }
760
761 if (!dirHasVisibleChildren(dd))
762 {
763 return;
764 }
765
766 bool tocExpand = TRUE; //Config_getBool(TOC_EXPAND);
767 bool isDir = !dd->subDirs().empty() || // there are subdirs
768 (tocExpand && // or toc expand and
769 !dd->getFiles().empty() // there are files
770 );
771 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
772 if (addToIndex)
773 {
774 Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),QCString(),TRUE,TRUE);
775 Doxygen::indexList->incContentsDepth();
776 }
777 if (ftv)
778 {
779 ftv->addContentsItem(isDir,dd->shortName(),dd->getReference(),
781 ftv->incContentsDepth();
782 }
783
786 ol.parseText(dd->shortName());
788 if (dd->isReference())
789 {
790 ol.startTypewriter();
791 ol.docify(" [external]");
792 ol.endTypewriter();
793 }
794
795 // write sub directories
796 if (dd->subDirs().size()>0)
797 {
798 startIndexHierarchy(ol,level+1);
799 for(const auto &subdd : dd->subDirs())
800 {
801 writeDirTreeNode(ol,subdd,level+1,ftv,addToIndex);
802 }
803 endIndexHierarchy(ol,level+1);
804 }
805
806 int fileCount=0;
807 if (!dd->getFiles().empty())
808 {
809 for (const auto &fd : dd->getFiles())
810 {
811 //bool allExternals = Config_getBool(ALLEXTERNALS);
812 //if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
813 //{
814 // fileCount++;
815 //}
816 bool genSourceFile = false;
817 if (fileVisibleInIndex(fd,genSourceFile))
818 {
819 fileCount++;
820 }
821 else if (genSourceFile)
822 {
823 fileCount++;
824 }
825 }
826 if (fileCount>0)
827 {
828 startIndexHierarchy(ol,level+1);
829 for (const auto &fd : dd->getFiles())
830 {
831 bool src = false;
832 bool doc = fileVisibleInIndex(fd,src);
833 QCString reference;
834 QCString outputBase;
835 if (doc)
836 {
837 reference = fd->getReference();
838 outputBase = fd->getOutputFileBase();
839 }
840 if (doc || src)
841 {
843 ol.startIndexItem(reference,outputBase);
844 ol.parseText(fd->displayName());
845 ol.endIndexItem(reference,outputBase);
846 ol.endIndexListItem();
847 if (ftv && (src || doc))
848 {
850 fd->displayName(),
851 reference,outputBase,
852 QCString(),FALSE,FALSE,fd);
853 }
854 }
855 }
856 endIndexHierarchy(ol,level+1);
857 }
858 }
859
860 if (tocExpand && addToIndex)
861 {
862 // write files of this directory
863 if (fileCount>0)
864 {
865 for (const auto &fd : dd->getFiles())
866 {
867 bool src = false;
868 bool doc = fileVisibleInIndex(fd,src);
869 if (doc)
870 {
871 addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),
872 !fd->isLinkableViaGroup(),FALSE,&fd->getConcepts());
873 }
874 else if (src)
875 {
876 Doxygen::indexList->addContentsItem(
877 FALSE, fd->name(), QCString(),
878 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd);
879 }
880 }
881 }
882 }
883 ol.endIndexListItem();
884
885 if (addToIndex)
886 {
887 Doxygen::indexList->decContentsDepth();
888 }
889 if (ftv)
890 {
891 ftv->decContentsDepth();
892 }
893}
894
895static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
896{
897 if (ftv)
898 {
901 }
903 for (const auto &dd : *Doxygen::dirLinkedMap)
904 {
905 if (dd->getOuterScope()==Doxygen::globalScope)
906 {
907 writeDirTreeNode(ol,dd.get(),0,ftv,addToIndex);
908 }
909 }
910 if (ftv)
911 {
912 for (const auto &fn : *Doxygen::inputNameLinkedMap)
913 {
914 for (const auto &fd : *fn)
915 {
916 if (fd->getDirDef()==nullptr) // top level file
917 {
918 bool src = false;
919 bool doc = fileVisibleInIndex(fd.get(),src);
920 QCString reference, outputBase;
921 if (doc)
922 {
923 reference = fd->getReference();
924 outputBase = fd->getOutputFileBase();
925 }
926 if (doc || src)
927 {
928 ftv->addContentsItem(FALSE,fd->displayName(),
929 reference, outputBase, QCString(),
930 FALSE,FALSE,fd.get());
931 }
932 if (addToIndex)
933 {
934 if (doc)
935 {
936 addMembersToIndex(fd.get(),LayoutDocManager::File,fd->displayName(),QCString(),TRUE,FALSE,&fd->getConcepts());
937 }
938 else if (src)
939 {
940 Doxygen::indexList->addContentsItem(
941 FALSE, fd->displayName(), QCString(),
942 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd.get());
943 }
944 }
945 }
946 }
947 }
948 }
949 endIndexHierarchy(ol,0);
950 if (ftv)
951 {
953 }
954}
955
956
957//----------------------------------------------------------------------------
958
959static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &started,FTVHelp* ftv,bool addToIndex,
960 ClassDef::CompoundType ct,ClassDefSet &visitedClasses)
961{
962 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
963 for (const auto &cd : cl)
964 {
965 //printf("class %s classHasVisibleRoot=%d isVisibleInHierarchy=%d\n",
966 // qPrint(cd->name()),
967 // classHasVisibleRoot(cd->baseClasses()),
968 // cd->isVisibleInHierarchy()
969 // );
970 bool b = false;
971 if (cd->getLanguage()==SrcLangExt::VHDL)
972 {
973 if (VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
974 {
975 continue;
976 }
977 b=!classHasVisibleRoot(cd->subClasses());
978 }
979 else if (sliceOpt && cd->compoundType() != ct)
980 {
981 continue;
982 }
983 else
984 {
985 b=!classHasVisibleRoot(cd->baseClasses());
986 }
987
988 if (b) //filter on root classes
989 {
990 if (cd->isVisibleInHierarchy()) // should it be visible
991 {
992 if (!started)
993 {
995 if (addToIndex)
996 {
997 Doxygen::indexList->incContentsDepth();
998 }
999 started=TRUE;
1000 }
1001 ol.startIndexListItem();
1002 bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
1003 classHasVisibleChildren(cd.get());
1004 //printf("list: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
1005 if (cd->isLinkable())
1006 {
1007 //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->isImplicitTemplateinstance()=%d\n",
1008 // qPrint(cd->displayName()),cd->isLinkable(),cd->isLinkableInProject(),cd->isImplicitTemplateInstance());
1009 ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
1010 ol.parseText(cd->displayName());
1011 ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
1012 if (cd->isReference())
1013 {
1014 ol.startTypewriter();
1015 ol.docify(" [external]");
1016 ol.endTypewriter();
1017 }
1018 if (addToIndex)
1019 {
1020 if (cd->getLanguage()!=SrcLangExt::VHDL) // prevents double insertion in Design Unit List
1021 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE);
1022 }
1023 if (ftv)
1024 {
1025 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd.get());
1026 }
1027 }
1028 else
1029 {
1031 ol.parseText(cd->displayName());
1033 if (addToIndex)
1034 {
1035 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE);
1036 }
1037 if (ftv)
1038 {
1039 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd.get());
1040 }
1041 }
1042 if (cd->getLanguage()==SrcLangExt::VHDL && hasChildren)
1043 {
1044 writeClassTreeToOutput(ol,cd->baseClasses(),1,ftv,addToIndex,visitedClasses);
1045 visitedClasses.insert(cd.get());
1046 }
1047 else if (hasChildren)
1048 {
1049 writeClassTreeToOutput(ol,cd->subClasses(),1,ftv,addToIndex,visitedClasses);
1050 visitedClasses.insert(cd.get());
1051 }
1052 ol.endIndexListItem();
1053 }
1054 }
1055 }
1056}
1057
1058static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex,ClassDef::CompoundType ct)
1059{
1060 ClassDefSet visitedClasses;
1061 if (ftv)
1062 {
1063 ol.pushGeneratorState();
1065 }
1066 bool started=FALSE;
1067 writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1068 writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1069 if (started)
1070 {
1071 endIndexHierarchy(ol,0);
1072 if (addToIndex)
1073 {
1074 Doxygen::indexList->decContentsDepth();
1075 }
1076 }
1077 if (ftv)
1078 {
1079 ol.popGeneratorState();
1080 }
1081}
1082
1083//----------------------------------------------------------------------------
1084
1086{
1087 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1088 int count=0;
1089 for (const auto &cd : cl)
1090 {
1091 if (sliceOpt && cd->compoundType() != ct)
1092 {
1093 continue;
1094 }
1095 if (!classHasVisibleRoot(cd->baseClasses())) // filter on root classes
1096 {
1097 if (cd->isVisibleInHierarchy()) // should it be visible
1098 {
1099 if (!cd->subClasses().empty()) // should have sub classes
1100 {
1101 count++;
1102 }
1103 }
1104 }
1105 }
1106 return count;
1107}
1108
1110{
1111 int count=0;
1114 return count;
1115}
1116
1117//----------------------------------------------------------------------------
1118
1120{
1121 if (Index::instance().numHierarchyClasses()==0) return;
1122 ol.pushGeneratorState();
1123 //1.{
1126
1127 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1128 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1129 bool addToIndex = lne==nullptr || lne->visible();
1130
1131 startFile(ol,"hierarchy",QCString(), title, HighlightedItem::ClassHierarchy);
1132 startTitle(ol,QCString());
1133 ol.parseText(title);
1134 endTitle(ol,QCString(),QCString());
1135 ol.startContents();
1136 ol.startTextBlock();
1137
1138 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1139 {
1140 ol.pushGeneratorState();
1144 ol.startParagraph();
1145 ol.startTextLink("inherits",QCString());
1146 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1147 ol.endTextLink();
1148 ol.endParagraph();
1149 ol.popGeneratorState();
1150 }
1151 ol.parseText(lne ? lne->intro() : theTranslator->trClassHierarchyDescription());
1152 ol.endTextBlock();
1153
1154 // ---------------
1155 // Static class hierarchy for Latex/RTF
1156 // ---------------
1157 ol.pushGeneratorState();
1158 //2.{
1160 Doxygen::indexList->disable();
1161
1162 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Class);
1163
1164 Doxygen::indexList->enable();
1165 ol.popGeneratorState();
1166 //2.}
1167
1168 // ---------------
1169 // Dynamic class hierarchical index for HTML
1170 // ---------------
1171 ol.pushGeneratorState();
1172 //2.{
1174
1175 {
1176 if (addToIndex)
1177 {
1178 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"hierarchy",QCString(),TRUE,TRUE);
1179 }
1180 FTVHelp ftv(false);
1181 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Class);
1182 TextStream t;
1184 ol.pushGeneratorState();
1186 ol.writeString(t.str().c_str());
1187 ol.popGeneratorState();
1188 }
1189 ol.popGeneratorState();
1190 //2.}
1191 // ------
1192
1193 endFile(ol);
1194 ol.popGeneratorState();
1195 //1.}
1196}
1197
1198//----------------------------------------------------------------------------
1199
1201{
1202 if (Index::instance().numHierarchyClasses()==0) return;
1204 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1205 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1206 startFile(ol,"inherits",QCString(),title,HighlightedItem::ClassHierarchy,FALSE,"hierarchy");
1207 startTitle(ol,QCString());
1208 ol.parseText(title);
1209 endTitle(ol,QCString(),QCString());
1210 ol.startContents();
1211 ol.startTextBlock();
1212 ol.startParagraph();
1213 ol.startTextLink("hierarchy",QCString());
1214 ol.parseText(theTranslator->trGotoTextualHierarchy());
1215 ol.endTextLink();
1216 ol.endParagraph();
1217 ol.endTextBlock();
1220 endFile(ol);
1221 ol.enableAll();
1222}
1223
1224//----------------------------------------------------------------------------
1225
1227{
1228 if (Index::instance().numHierarchyInterfaces()==0) return;
1229 ol.pushGeneratorState();
1230 //1.{
1232
1233 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1234 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1235 bool addToIndex = lne==nullptr || lne->visible();
1236
1237 startFile(ol,"interfacehierarchy",QCString(), title, HighlightedItem::InterfaceHierarchy);
1238 startTitle(ol,QCString());
1239 ol.parseText(title);
1240 endTitle(ol,QCString(),QCString());
1241 ol.startContents();
1242 ol.startTextBlock();
1243
1244 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1245 {
1248 ol.startParagraph();
1249 ol.startTextLink("interfaceinherits",QCString());
1250 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1251 ol.endTextLink();
1252 ol.endParagraph();
1255 }
1256 ol.parseText(lne ? lne->intro() : theTranslator->trInterfaceHierarchyDescription());
1257 ol.endTextBlock();
1258
1259 // ---------------
1260 // Static interface hierarchy for Latex/RTF
1261 // ---------------
1262 ol.pushGeneratorState();
1263 //2.{
1265 Doxygen::indexList->disable();
1266
1267 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Interface);
1268
1269 Doxygen::indexList->enable();
1270 ol.popGeneratorState();
1271 //2.}
1272
1273 // ---------------
1274 // Dynamic interface hierarchical index for HTML
1275 // ---------------
1276 ol.pushGeneratorState();
1277 //2.{
1279
1280 {
1281 if (addToIndex)
1282 {
1283 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"interfacehierarchy",QCString(),TRUE,TRUE);
1284 }
1285 FTVHelp ftv(false);
1286 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Interface);
1287 TextStream t;
1289 ol.pushGeneratorState();
1291 ol.writeString(t.str().c_str());
1292 ol.popGeneratorState();
1293 }
1294 ol.popGeneratorState();
1295 //2.}
1296 // ------
1297
1298 endFile(ol);
1299 ol.popGeneratorState();
1300 //1.}
1301}
1302
1303//----------------------------------------------------------------------------
1304
1306{
1307 if (Index::instance().numHierarchyInterfaces()==0) return;
1309 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1310 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1311 startFile(ol,"interfaceinherits",QCString(),title,HighlightedItem::InterfaceHierarchy,FALSE,"interfacehierarchy");
1312 startTitle(ol,QCString());
1313 ol.parseText(title);
1314 endTitle(ol,QCString(),QCString());
1315 ol.startContents();
1316 ol.startTextBlock();
1317 ol.startParagraph();
1318 ol.startTextLink("interfacehierarchy",QCString());
1319 ol.parseText(theTranslator->trGotoTextualHierarchy());
1320 ol.endTextLink();
1321 ol.endParagraph();
1322 ol.endTextBlock();
1325 endFile(ol);
1326 ol.enableAll();
1327}
1328
1329//----------------------------------------------------------------------------
1330
1332{
1333 if (Index::instance().numHierarchyExceptions()==0) return;
1334 ol.pushGeneratorState();
1335 //1.{
1337
1338 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1339 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1340 bool addToIndex = lne==nullptr || lne->visible();
1341
1342 startFile(ol,"exceptionhierarchy",QCString(), title, HighlightedItem::ExceptionHierarchy);
1343 startTitle(ol,QCString());
1344 ol.parseText(title);
1345 endTitle(ol,QCString(),QCString());
1346 ol.startContents();
1347 ol.startTextBlock();
1348
1349 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1350 {
1353 ol.startParagraph();
1354 ol.startTextLink("exceptioninherits",QCString());
1355 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1356 ol.endTextLink();
1357 ol.endParagraph();
1360 }
1361 ol.parseText(lne ? lne->intro() : theTranslator->trExceptionHierarchyDescription());
1362 ol.endTextBlock();
1363
1364 // ---------------
1365 // Static exception hierarchy for Latex/RTF
1366 // ---------------
1367 ol.pushGeneratorState();
1368 //2.{
1370 Doxygen::indexList->disable();
1371
1372 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Exception);
1373
1374 Doxygen::indexList->enable();
1375 ol.popGeneratorState();
1376 //2.}
1377
1378 // ---------------
1379 // Dynamic exception hierarchical index for HTML
1380 // ---------------
1381 ol.pushGeneratorState();
1382 //2.{
1384
1385 {
1386 if (addToIndex)
1387 {
1388 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"exceptionhierarchy",QCString(),TRUE,TRUE);
1389 }
1390 FTVHelp ftv(false);
1391 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Exception);
1392 TextStream t;
1394 ol.pushGeneratorState();
1396 ol.writeString(t.str().c_str());
1397 ol.popGeneratorState();
1398 }
1399 ol.popGeneratorState();
1400 //2.}
1401 // ------
1402
1403 endFile(ol);
1404 ol.popGeneratorState();
1405 //1.}
1406}
1407
1408//----------------------------------------------------------------------------
1409
1411{
1412 if (Index::instance().numHierarchyExceptions()==0) return;
1414 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1415 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1416 startFile(ol,"exceptioninherits",QCString(),title,HighlightedItem::ExceptionHierarchy,FALSE,"exceptionhierarchy");
1417 startTitle(ol,QCString());
1418 ol.parseText(title);
1419 endTitle(ol,QCString(),QCString());
1420 ol.startContents();
1421 ol.startTextBlock();
1422 ol.startParagraph();
1423 ol.startTextLink("exceptionhierarchy",QCString());
1424 ol.parseText(theTranslator->trGotoTextualHierarchy());
1425 ol.endTextLink();
1426 ol.endParagraph();
1427 ol.endTextBlock();
1430 endFile(ol);
1431 ol.enableAll();
1432}
1433
1434//----------------------------------------------------------------------------
1435
1436static void countFiles(int &allFiles,int &docFiles)
1437{
1438 allFiles=0;
1439 docFiles=0;
1440 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1441 {
1442 for (const auto &fd: *fn)
1443 {
1444 bool src = false;
1445 bool doc = fileVisibleInIndex(fd.get(),src);
1446 if (doc || src)
1447 {
1448 allFiles++;
1449 }
1450 if (doc)
1451 {
1452 docFiles++;
1453 }
1454 }
1455 }
1456}
1457
1458static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
1459{
1460 //printf("Found filedef %s\n",qPrint(fd->name()));
1461 bool doc = fd->isLinkableInProject();
1462 bool src = fd->generateSourceFile();
1463 bool nameOk = !fd->isDocumentationFile();
1464 if (nameOk && (doc || src) && !fd->isReference())
1465 {
1466 QCString path;
1467 if (Config_getBool(FULL_PATH_NAMES))
1468 {
1469 path=stripFromPath(fd->getPath());
1470 }
1471 QCString fullName=fd->name();
1472 if (!path.isEmpty())
1473 {
1474 if (path.at(path.length()-1)!='/') fullName.prepend("/");
1475 fullName.prepend(path);
1476 }
1477
1478 ol.startIndexKey();
1479 ol.docify(path);
1480 if (doc)
1481 {
1483 //if (addToIndex)
1484 //{
1485 // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1486 //}
1487 }
1488 else if (src)
1489 {
1491 }
1492 if (doc && src)
1493 {
1494 ol.pushGeneratorState();
1496 ol.docify(" ");
1498 ol.docify("[");
1499 ol.parseText(theTranslator->trCode());
1500 ol.docify("]");
1501 ol.endTextLink();
1502 ol.popGeneratorState();
1503 }
1504 ol.endIndexKey();
1505 bool hasBrief = !fd->briefDescription().isEmpty();
1506 ol.startIndexValue(hasBrief);
1507 if (hasBrief)
1508 {
1509 //ol.docify(" (");
1510 ol.generateDoc(
1511 fd->briefFile(),fd->briefLine(),
1512 fd,nullptr,
1514 FALSE, // index words
1515 FALSE, // isExample
1516 QCString(), // example name
1517 TRUE, // single line
1518 TRUE, // link from index
1519 Config_getBool(MARKDOWN_SUPPORT)
1520 );
1521 //ol.docify(")");
1522 }
1523 if (doc)
1524 {
1525 ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1526 }
1527 else // src
1528 {
1529 ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1530 }
1531 //ol.popGeneratorState();
1532 // --------------------------------------------------------
1533 }
1534}
1535
1536//----------------------------------------------------------------------------
1537
1539{
1540 if (Index::instance().numDocumentedFiles()==0 || !Config_getBool(SHOW_FILES)) return;
1541
1542 ol.pushGeneratorState();
1545
1546 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileList);
1547 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files); // fall back
1548 QCString title = lne ? lne->title() : theTranslator->trFileList();
1549 bool addToIndex = lne==nullptr || lne->visible();
1550
1551 startFile(ol,"files",QCString(),title,HighlightedItem::Files);
1552 startTitle(ol,QCString());
1553 //if (!Config_getString(PROJECT_NAME).isEmpty())
1554 //{
1555 // title.prepend(Config_getString(PROJECT_NAME)+" ");
1556 //}
1557 ol.parseText(title);
1558 endTitle(ol,QCString(),QCString());
1559 ol.startContents();
1560 ol.startTextBlock();
1561
1562 if (addToIndex)
1563 {
1564 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"files",QCString(),TRUE,TRUE);
1565 Doxygen::indexList->incContentsDepth();
1566 }
1567
1568 ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool(EXTRACT_ALL)));
1569 ol.endTextBlock();
1570
1571 // ---------------
1572 // Flat file index
1573 // ---------------
1574
1575 // 1. {
1576 ol.pushGeneratorState();
1578
1579 ol.startIndexList();
1580 if (Config_getBool(FULL_PATH_NAMES))
1581 {
1582 std::unordered_map<std::string,size_t> pathMap;
1583 std::vector<FilesInDir> outputFiles;
1584
1585 // re-sort input files in (dir,file) output order instead of (file,dir) input order
1586 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1587 {
1588 for (const auto &fd : *fn)
1589 {
1590 QCString path=fd->getPath();
1591 if (path.isEmpty()) path="[external]";
1592 auto it = pathMap.find(path.str());
1593 if (it!=pathMap.end()) // existing path -> append
1594 {
1595 outputFiles.at(it->second).files.push_back(fd.get());
1596 }
1597 else // new path -> create path entry + append
1598 {
1599 pathMap.emplace(path.str(),outputFiles.size());
1600 outputFiles.emplace_back(path);
1601 outputFiles.back().files.push_back(fd.get());
1602 }
1603 }
1604 }
1605
1606 // sort the files by path
1607 std::stable_sort(outputFiles.begin(),
1608 outputFiles.end(),
1609 [](const auto &fp1,const auto &fp2) { return qstricmp_sort(fp1.path,fp2.path)<0; });
1610 // sort the files inside the directory by name
1611 for (auto &fp : outputFiles)
1612 {
1613 std::stable_sort(fp.files.begin(), fp.files.end(), compareFileDefs);
1614 }
1615 // write the results
1616 for (const auto &fp : outputFiles)
1617 {
1618 for (const auto &fd : fp.files)
1619 {
1620 writeSingleFileIndex(ol,fd);
1621 }
1622 }
1623 }
1624 else
1625 {
1626 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1627 {
1628 for (const auto &fd : *fn)
1629 {
1630 writeSingleFileIndex(ol,fd.get());
1631 }
1632 }
1633 }
1634 ol.endIndexList();
1635
1636 // 1. }
1637 ol.popGeneratorState();
1638
1639 // ---------------
1640 // Hierarchical file index for HTML
1641 // ---------------
1642 ol.pushGeneratorState();
1644
1645 {
1646 FTVHelp ftv(false);
1647 writeDirHierarchy(ol,&ftv,addToIndex);
1648 TextStream t;
1650 ol.writeString(t.str().c_str());
1651 }
1652
1653 ol.popGeneratorState();
1654 // ------
1655
1656 if (addToIndex)
1657 {
1658 Doxygen::indexList->decContentsDepth();
1659 }
1660
1661 endFile(ol);
1662 ol.popGeneratorState();
1663}
1664
1665//----------------------------------------------------------------------------
1667{
1668 int count=0;
1669 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1670 {
1671 if (nd->isLinkableInProject()) count++;
1672 }
1673 return count;
1674}
1675
1676//----------------------------------------------------------------------------
1677static int countConcepts()
1678{
1679 int count=0;
1680 for (const auto &cd : *Doxygen::conceptLinkedMap)
1681 {
1682 if (cd->isLinkableInProject()) count++;
1683 }
1684 return count;
1685}
1686
1687
1688//----------------------------------------------------------------------------
1689template<typename Ptr> const ClassDef *get_pointer(const Ptr &p);
1690template<> const ClassDef *get_pointer(const ClassLinkedMap::Ptr &p) { return p.get(); }
1691template<> const ClassDef *get_pointer(const ClassLinkedRefMap::Ptr &p) { return p; }
1692
1693template<class ListType>
1694static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool globalOnly,ClassDef::CompoundType ct)
1695{
1696 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1697 for (const auto &cdi : cl)
1698 {
1699 const ClassDef *cd = get_pointer(cdi);
1700 if (cd->getLanguage()==SrcLangExt::VHDL)
1701 {
1704 )// no architecture
1705 {
1706 continue;
1707 }
1708 }
1709
1710 if (sliceOpt && cd->compoundType() != ct)
1711 {
1712 continue;
1713 }
1714
1715 if (!globalOnly ||
1716 cd->getOuterScope()==nullptr ||
1718 )
1719 {
1720 int count=0;
1721 for (const auto &ccd : cd->getClasses())
1722 {
1723 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1724 {
1725 count++;
1726 }
1727 }
1729 {
1730 if (ftv)
1731 {
1732 ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
1733 cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
1734 }
1735 if (addToIndex &&
1736 (cd->getOuterScope()==nullptr ||
1738 )
1739 )
1740 {
1741 addMembersToIndex(cd,LayoutDocManager::Class,
1742 cd->displayName(FALSE),
1743 cd->anchor(),
1744 cd->partOfGroups().empty() && !cd->isSimple());
1745 }
1746 if (count>0)
1747 {
1748 if (ftv) ftv->incContentsDepth();
1749 writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1750 if (ftv) ftv->decContentsDepth();
1751 }
1752 }
1753 }
1754 }
1755}
1756
1757static void writeNamespaceMembers(const NamespaceDef *nd,bool addToIndex)
1758{
1759 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1760 {
1761 if (lde->kind()==LayoutDocEntry::MemberDef)
1762 {
1763 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1764 if (lmd)
1765 {
1766 MemberList *ml = nd->getMemberList(lmd->type);
1767 if (ml)
1768 {
1769 for (const auto &md : *ml)
1770 {
1771 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1772 if (md->visibleInIndex())
1773 {
1774 writeMemberToIndex(nd,md,addToIndex);
1775 }
1776 }
1777 }
1778 }
1779 }
1780 }
1781}
1782
1783static void writeModuleMembers(const ModuleDef *mod,bool addToIndex)
1784{
1785 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Module))
1786 {
1787 if (lde->kind()==LayoutDocEntry::MemberDecl)
1788 {
1789 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1790 if (lmd)
1791 {
1792 MemberList *ml = mod->getMemberList(lmd->type);
1793 if (ml)
1794 {
1795 for (const auto &md : *ml)
1796 {
1797 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1798 if (md->visibleInIndex())
1799 {
1800 writeMemberToIndex(mod,md,addToIndex);
1801 }
1802 }
1803 }
1804 }
1805 }
1806 }
1807}
1808
1809
1810static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex);
1811static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1812 bool rootOnly,bool addToIndex);
1813
1815 bool rootOnly,bool addToIndex)
1816{
1817 if (!nd->isAnonymous() &&
1818 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1819 {
1820
1821 bool hasNestedNamespace = namespaceHasNestedNamespace(nd);
1822 bool hasChildren = hasNestedNamespace ||
1825 bool isLinkable = nd->isLinkable();
1826 int visibleMembers = nd->countVisibleMembers();
1827
1828 //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
1829
1830 QCString ref;
1831 QCString file;
1832 if (isLinkable)
1833 {
1834 ref = nd->getReference();
1835 file = nd->getOutputFileBase();
1836 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1837 {
1838 file=file.replace(0,qstrlen("namespace"),"class");
1839 }
1840 }
1841
1842 bool isDir = hasChildren || visibleMembers>0;
1843 if (isLinkable || isDir)
1844 {
1845 ftv->addContentsItem(hasNestedNamespace,nd->localName(),ref,file,QCString(),FALSE,nd->partOfGroups().empty(),nd);
1846
1847 if (addToIndex)
1848 {
1849 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1850 hasChildren && !file.isEmpty(),nd->partOfGroups().empty());
1851 }
1852 if (addToIndex && isDir)
1853 {
1854 Doxygen::indexList->incContentsDepth();
1855 }
1856
1857 if (isDir)
1858 {
1859 ftv->incContentsDepth();
1860 writeNamespaceTree(nd->getNamespaces(),ftv,FALSE,addToIndex);
1861 writeClassTree(nd->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
1862 writeConceptList(nd->getConcepts(),nullptr,addToIndex);
1863 writeNamespaceMembers(nd,addToIndex);
1864 ftv->decContentsDepth();
1865 }
1866 if (addToIndex && isDir)
1867 {
1868 Doxygen::indexList->decContentsDepth();
1869 }
1870 }
1871 }
1872}
1873
1874static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1875 bool rootOnly,bool addToIndex)
1876{
1877 for (const auto &nd : nsLinkedMap)
1878 {
1879 if (nd->isVisibleInHierarchy())
1880 {
1881 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1882 }
1883 }
1884}
1885
1886static void writeNamespaceTree(const NamespaceLinkedMap &nsLinkedMap,FTVHelp *ftv,
1887 bool rootOnly,bool addToIndex)
1888{
1889 for (const auto &nd : nsLinkedMap)
1890 {
1891 if (nd->isVisibleInHierarchy())
1892 {
1893 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1894 }
1895 }
1896}
1897
1898static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1899 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct);
1900
1902 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1903{
1904 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1905 if (!nd->isAnonymous() &&
1906 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1907 {
1908 bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
1909 bool isLinkable = nd->isLinkableInProject();
1910
1911 //printf("writeClassTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
1912
1913 QCString ref;
1914 QCString file;
1915 if (isLinkable)
1916 {
1917 ref = nd->getReference();
1918 file = nd->getOutputFileBase();
1919 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1920 {
1921 file=file.replace(0,qstrlen("namespace"),"class");
1922 }
1923 }
1924
1925 if (isDir)
1926 {
1927 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
1928
1929 if (addToIndex)
1930 {
1931 // the namespace entry is already shown under the namespace list so don't
1932 // add it to the nav index and don't create a separate index file for it otherwise
1933 // it will overwrite the one written for the namespace list.
1934 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1935 false, // separateIndex
1936 false // addToNavIndex
1937 );
1938 }
1939 if (addToIndex)
1940 {
1941 Doxygen::indexList->incContentsDepth();
1942 }
1943
1944 ftv->incContentsDepth();
1945 writeClassTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex,ct);
1946 ClassLinkedRefMap d = nd->getClasses();
1947 if (sliceOpt)
1948 {
1949 if (ct == ClassDef::Interface)
1950 {
1951 d = nd->getInterfaces();
1952 }
1953 else if (ct == ClassDef::Struct)
1954 {
1955 d = nd->getStructs();
1956 }
1957 else if (ct == ClassDef::Exception)
1958 {
1959 d = nd->getExceptions();
1960 }
1961 }
1962 writeClassTree(d,ftv,addToIndex,FALSE,ct);
1963 ftv->decContentsDepth();
1964
1965 if (addToIndex)
1966 {
1967 Doxygen::indexList->decContentsDepth();
1968 }
1969 }
1970 }
1971}
1972
1974 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1975{
1976 for (const auto &nd : nsLinkedMap)
1977 {
1978 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
1979 }
1980}
1981
1983 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1984{
1985 for (const auto &nd : nsLinkedMap)
1986 {
1987 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
1988 }
1989}
1990
1992{
1993 if (Index::instance().numDocumentedNamespaces()==0) return;
1994 ol.pushGeneratorState();
1997 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceList);
1998 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
1999 QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
2000 bool addToIndex = lne==nullptr || lne->visible();
2001 startFile(ol,"namespaces",QCString(),title,HighlightedItem::Namespaces);
2002 startTitle(ol,QCString());
2003 ol.parseText(title);
2004 endTitle(ol,QCString(),QCString());
2005 ol.startContents();
2006 ol.startTextBlock();
2007 ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
2008 ol.endTextBlock();
2009
2010 bool first=TRUE;
2011
2012 // ---------------
2013 // Linear namespace index for Latex/RTF
2014 // ---------------
2015 ol.pushGeneratorState();
2017
2018 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2019 {
2020 if (nd->isLinkableInProject())
2021 {
2022 if (first)
2023 {
2024 ol.startIndexList();
2025 first=FALSE;
2026 }
2027 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
2028 ol.startIndexKey();
2029 if (nd->getLanguage()==SrcLangExt::VHDL)
2030 {
2031 ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
2032 }
2033 else
2034 {
2035 ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
2036 }
2037 ol.endIndexKey();
2038
2039 bool hasBrief = !nd->briefDescription().isEmpty();
2040 ol.startIndexValue(hasBrief);
2041 if (hasBrief)
2042 {
2043 //ol.docify(" (");
2044 ol.generateDoc(
2045 nd->briefFile(),nd->briefLine(),
2046 nd.get(),nullptr,
2047 nd->briefDescription(TRUE),
2048 FALSE, // index words
2049 FALSE, // isExample
2050 QCString(), // example name
2051 TRUE, // single line
2052 TRUE, // link from index
2053 Config_getBool(MARKDOWN_SUPPORT)
2054 );
2055 //ol.docify(")");
2056 }
2057 ol.endIndexValue(nd->getOutputFileBase(),hasBrief);
2058
2059 }
2060 }
2061 if (!first) ol.endIndexList();
2062
2063 ol.popGeneratorState();
2064
2065 // ---------------
2066 // Hierarchical namespace index for HTML
2067 // ---------------
2068 ol.pushGeneratorState();
2070
2071 {
2072 if (addToIndex)
2073 {
2074 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"namespaces",QCString(),TRUE,TRUE);
2075 Doxygen::indexList->incContentsDepth();
2076 }
2077 FTVHelp ftv(false);
2079 TextStream t;
2081 ol.writeString(t.str().c_str());
2082 if (addToIndex)
2083 {
2084 Doxygen::indexList->decContentsDepth();
2085 }
2086 }
2087
2088 ol.popGeneratorState();
2089 // ------
2090
2091 endFile(ol);
2092 ol.popGeneratorState();
2093}
2094
2095//----------------------------------------------------------------------------
2096
2098{
2099 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2100 int count=0;
2101 int countPrinted=0;
2102 for (const auto &cd : *Doxygen::classLinkedMap)
2103 {
2104 if (sliceOpt && cd->compoundType() != ct)
2105 {
2106 continue;
2107 }
2108 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2109 {
2110 if (!cd->isEmbeddedInOuterScope())
2111 {
2112 countPrinted++;
2113 }
2114 count++;
2115 }
2116 }
2117 *cp = countPrinted;
2118 return count;
2119}
2120
2121
2123{
2124 //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
2125 //bool addToIndex = lne==nullptr || lne->visible();
2126 bool first=TRUE;
2127
2128 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2129
2130 for (const auto &cd : *Doxygen::classLinkedMap)
2131 {
2132 if (cd->getLanguage()==SrcLangExt::VHDL &&
2133 (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
2135 ) // no architecture
2136 {
2137 continue;
2138 }
2139 if (first)
2140 {
2141 ol.startIndexList();
2142 first=FALSE;
2143 }
2144
2145 if (sliceOpt && cd->compoundType() != ct)
2146 {
2147 continue;
2148 }
2149
2150 ol.pushGeneratorState();
2151 if (cd->isEmbeddedInOuterScope())
2152 {
2156 }
2157 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2158 {
2159 ol.startIndexKey();
2160 if (cd->getLanguage()==SrcLangExt::VHDL)
2161 {
2163 ol.docify(prot);
2164 ol.writeString(" ");
2165 }
2166 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
2167 ol.endIndexKey();
2168 bool hasBrief = !cd->briefDescription().isEmpty();
2169 ol.startIndexValue(hasBrief);
2170 if (hasBrief)
2171 {
2172 ol.generateDoc(
2173 cd->briefFile(),cd->briefLine(),
2174 cd.get(),nullptr,
2175 cd->briefDescription(TRUE),
2176 FALSE, // indexWords
2177 FALSE, // isExample
2178 QCString(), // example name
2179 TRUE, // single line
2180 TRUE, // link from index
2181 Config_getBool(MARKDOWN_SUPPORT)
2182 );
2183 }
2184 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2185
2186 //if (addToIndex)
2187 //{
2188 // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2189 //}
2190 }
2191 ol.popGeneratorState();
2192 }
2193 if (!first) ol.endIndexList();
2194}
2195
2196inline bool isId1(int c)
2197{
2198 return (c<127 && c>31); // printable ASCII character
2199}
2200
2201static QCString letterToLabel(const QCString &startLetter)
2202{
2203 if (startLetter.isEmpty()) return startLetter;
2204 const char *p = startLetter.data();
2205 char c = *p;
2206 QCString result;
2207 if (isId1(c))
2208 {
2209 result+=c;
2210 }
2211 else
2212 {
2213 result="0x";
2214 const char hex[]="0123456789abcdef";
2215 while ((c=*p++))
2216 {
2217 result+=hex[static_cast<unsigned char>(c)>>4];
2218 result+=hex[static_cast<unsigned char>(c)&0xf];
2219 }
2220 }
2221 return result;
2222}
2223
2224//----------------------------------------------------------------------------
2225
2226/** Class representing a cell in the alphabetical class index. */
2228{
2229 public:
2230 AlphaIndexTableCell(int row,int col,const std::string &letter,const ClassDef *cd) :
2231 m_letter(letter), m_class(cd), m_row(row), m_col(col)
2232 {
2233 }
2234
2235 const ClassDef *classDef() const { return m_class; }
2236 std::string letter() const { return m_letter; }
2237 int row() const { return m_row; }
2238 int column() const { return m_col; }
2239
2240 private:
2241 std::string m_letter;
2245};
2246
2247using UsedIndexLetters = std::set<std::string>;
2248
2249// write an alphabetical index of all class with a header for each letter
2250static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int /* annotatedCount */)
2251{
2252 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2253
2254 // What starting letters are used
2255 UsedIndexLetters indexLettersUsed;
2256
2257 // first count the number of headers
2258 for (const auto &cd : *Doxygen::classLinkedMap)
2259 {
2260 if (sliceOpt && cd->compoundType() != ct)
2261 continue;
2262 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2263 {
2264 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2265 continue;
2266
2267 // get the first UTF8 character (after the part that should be ignored)
2268 int index = getPrefixIndex(cd->className());
2269 std::string letter = getUTF8CharAt(cd->className().str(),index);
2270 if (!letter.empty())
2271 {
2272 indexLettersUsed.insert(convertUTF8ToUpper(letter));
2273 }
2274 }
2275 }
2276
2277 // write quick link index (row of letters)
2278 QCString alphaLinks = "<div class=\"qindex\">";
2279 bool first=true;
2280 for (const auto &letter : indexLettersUsed)
2281 {
2282 if (!first) alphaLinks += "&#160;|&#160;";
2283 first=false;
2284 QCString li = letterToLabel(letter.c_str());
2285 alphaLinks += "<a class=\"qindex\" href=\"#letter_" +
2286 li + "\">" +
2287 QCString(letter) + "</a>";
2288 }
2289 alphaLinks += "</div>\n";
2290 ol.writeString(alphaLinks);
2291
2292 std::map<std::string, std::vector<const ClassDef*> > classesByLetter;
2293
2294 // fill the columns with the class list (row elements in each column,
2295 // expect for the columns with number >= itemsInLastRow, which get one
2296 // item less.
2297 for (const auto &cd : *Doxygen::classLinkedMap)
2298 {
2299 if (sliceOpt && cd->compoundType() != ct)
2300 continue;
2301 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2302 continue;
2303
2304 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2305 {
2306 QCString className = cd->className();
2307 int index = getPrefixIndex(className);
2308 std::string letter = getUTF8CharAt(className.str(),index);
2309 if (!letter.empty())
2310 {
2311 letter = convertUTF8ToUpper(letter);
2312 auto it = classesByLetter.find(letter);
2313 if (it!=classesByLetter.end()) // add class to the existing list
2314 {
2315 it->second.push_back(cd.get());
2316 }
2317 else // new entry
2318 {
2319 classesByLetter.emplace(letter, std::vector<const ClassDef*>({ cd.get() }));
2320 }
2321 }
2322 }
2323 }
2324
2325 // sort the class lists per letter while ignoring the prefix
2326 for (auto &[letter,list] : classesByLetter)
2327 {
2328 std::stable_sort(list.begin(), list.end(),
2329 [](const auto &c1,const auto &c2)
2330 {
2331 QCString n1 = c1->className();
2332 QCString n2 = c2->className();
2333 return qstricmp_sort(n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2))<0;
2334 });
2335 }
2336
2337 // generate table
2338 if (!classesByLetter.empty())
2339 {
2340 ol.writeString("<div class=\"classindex\">\n");
2341 int counter=0;
2342 for (const auto &cl : classesByLetter)
2343 {
2344 QCString parity = (counter++%2)==0 ? "even" : "odd";
2345 ol.writeString("<dl class=\"classindex " + parity + "\">\n");
2346
2347 // write character heading
2348 ol.writeString("<dt class=\"alphachar\">");
2349 QCString s = letterToLabel(cl.first.c_str());
2350 ol.writeString("<a id=\"letter_");
2351 ol.writeString(s);
2352 ol.writeString("\" name=\"letter_");
2353 ol.writeString(s);
2354 ol.writeString("\">");
2355 ol.writeString(cl.first.c_str());
2356 ol.writeString("</a>");
2357 ol.writeString("</dt>\n");
2358
2359 // write class links
2360 for (const auto &cd : cl.second)
2361 {
2362 ol.writeString("<dd>");
2363 QCString namesp,cname;
2364 extractNamespaceName(cd->name(),cname,namesp);
2365 QCString nsDispName;
2366 SrcLangExt lang = cd->getLanguage();
2368 if (sep!="::")
2369 {
2370 nsDispName=substitute(namesp,"::",sep);
2371 cname=substitute(cname,"::",sep);
2372 }
2373 else
2374 {
2375 nsDispName=namesp;
2376 }
2377
2378 ol.writeObjectLink(cd->getReference(),
2379 cd->getOutputFileBase(),cd->anchor(),cname);
2380 if (!namesp.isEmpty())
2381 {
2382 ol.writeString(" (");
2383 NamespaceDef *nd = getResolvedNamespace(namesp);
2384 if (nd && nd->isLinkable())
2385 {
2387 nd->getOutputFileBase(),QCString(),nsDispName);
2388 }
2389 else
2390 {
2391 ol.docify(nsDispName);
2392 }
2393 ol.writeString(")");
2394 }
2395 ol.writeString("</dd>");
2396 }
2397
2398 ol.writeString("</dl>\n");
2399 }
2400 ol.writeString("</div>\n");
2401 }
2402}
2403
2404//----------------------------------------------------------------------------
2405
2407{
2408 if (Index::instance().numAnnotatedClasses()==0) return;
2409 ol.pushGeneratorState();
2411 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassIndex);
2412 QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
2413 bool addToIndex = lne==nullptr || lne->visible();
2414
2415 startFile(ol,"classes",QCString(),title,HighlightedItem::Classes);
2416
2417 startTitle(ol,QCString());
2418 ol.parseText(title);
2419 endTitle(ol,QCString(),QCString());
2420
2421 if (addToIndex)
2422 {
2423 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"classes",QCString(),FALSE,TRUE);
2424 }
2425
2426 ol.startContents();
2427 writeAlphabeticalClassList(ol, ClassDef::Class, Index::instance().numAnnotatedClasses());
2428 endFile(ol); // contains ol.endContents()
2429
2430 ol.popGeneratorState();
2431}
2432
2433//----------------------------------------------------------------------------
2434
2436{
2437 if (Index::instance().numAnnotatedInterfaces()==0) return;
2438 ol.pushGeneratorState();
2440 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex);
2441 QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2442 bool addToIndex = lne==nullptr || lne->visible();
2443
2444 startFile(ol,"interfaces",QCString(),title,HighlightedItem::Interfaces);
2445
2446 startTitle(ol,QCString());
2447 ol.parseText(title);
2448 endTitle(ol,QCString(),QCString());
2449
2450 if (addToIndex)
2451 {
2452 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"interfaces",QCString(),FALSE,TRUE);
2453 }
2454
2455 ol.startContents();
2456 writeAlphabeticalClassList(ol, ClassDef::Interface, Index::instance().numAnnotatedInterfaces());
2457 endFile(ol); // contains ol.endContents()
2458
2459 ol.popGeneratorState();
2460}
2461
2462//----------------------------------------------------------------------------
2463
2465{
2466 if (Index::instance().numAnnotatedStructs()==0) return;
2467 ol.pushGeneratorState();
2469 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex);
2470 QCString title = lne ? lne->title() : theTranslator->trStructIndex();
2471 bool addToIndex = lne==nullptr || lne->visible();
2472
2473 startFile(ol,"structs",QCString(),title,HighlightedItem::Structs);
2474
2475 startTitle(ol,QCString());
2476 ol.parseText(title);
2477 endTitle(ol,QCString(),QCString());
2478
2479 if (addToIndex)
2480 {
2481 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"structs",QCString(),FALSE,TRUE);
2482 }
2483
2484 ol.startContents();
2485 writeAlphabeticalClassList(ol, ClassDef::Struct, Index::instance().numAnnotatedStructs());
2486 endFile(ol); // contains ol.endContents()
2487
2488 ol.popGeneratorState();
2489}
2490
2491//----------------------------------------------------------------------------
2492
2494{
2495 if (Index::instance().numAnnotatedExceptions()==0) return;
2496 ol.pushGeneratorState();
2498 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2499 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2500 bool addToIndex = lne==nullptr || lne->visible();
2501
2502 startFile(ol,"exceptions",QCString(),title,HighlightedItem::Exceptions);
2503
2504 startTitle(ol,QCString());
2505 ol.parseText(title);
2506 endTitle(ol,QCString(),QCString());
2507
2508 if (addToIndex)
2509 {
2510 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2511 }
2512
2513 ol.startContents();
2514 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2515 endFile(ol); // contains ol.endContents()
2516
2517 ol.popGeneratorState();
2518}
2519
2520//----------------------------------------------------------------------------
2521
2546
2548{
2549 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2550 // annotatedClasses,annotatedClassesPrinted);
2551 if (ctx.numAnnotated==0) return;
2552
2553 ol.pushGeneratorState();
2555 if (ctx.numPrinted==0)
2556 {
2559 }
2561 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2562 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2563 bool addToIndex = lne==nullptr || lne->visible();
2564
2565 startFile(ol,ctx.fileBaseName,QCString(),title,ctx.hiItem);
2566
2567 startTitle(ol,QCString());
2568 ol.parseText(title);
2569 endTitle(ol,QCString(),QCString());
2570
2571 ol.startContents();
2572
2573 ol.startTextBlock();
2574 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2575 ol.endTextBlock();
2576
2577 // ---------------
2578 // Linear class index for Latex/RTF
2579 // ---------------
2580 ol.pushGeneratorState();
2582 Doxygen::indexList->disable();
2583
2585
2586 Doxygen::indexList->enable();
2587 ol.popGeneratorState();
2588
2589 // ---------------
2590 // Hierarchical class index for HTML
2591 // ---------------
2592 ol.pushGeneratorState();
2594
2595 {
2596 if (addToIndex)
2597 {
2598 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2599 Doxygen::indexList->incContentsDepth();
2600 }
2601 FTVHelp ftv(false);
2604 TextStream t;
2606 ol.writeString(t.str().c_str());
2607 if (addToIndex)
2608 {
2609 Doxygen::indexList->decContentsDepth();
2610 }
2611 }
2612
2613 ol.popGeneratorState();
2614 // ------
2615
2616 endFile(ol); // contains ol.endContents()
2617 ol.popGeneratorState();
2618}
2619
2620//----------------------------------------------------------------------------
2621
2623{
2624 const auto &index = Index::instance();
2626 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2627 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2628 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2630 "annotated",
2632}
2633
2634//----------------------------------------------------------------------------
2635
2637{
2638 const auto &index = Index::instance();
2640 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2641 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2642 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2644 "annotatedinterfaces",
2646}
2647
2648//----------------------------------------------------------------------------
2649
2651{
2652 const auto &index = Index::instance();
2654 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2655 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2656 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2658 "annotatedstructs",
2660}
2661
2662//----------------------------------------------------------------------------
2663
2665{
2666 const auto &index = Index::instance();
2668 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2669 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2670 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2672 "annotatedexceptions",
2674}
2675
2676//----------------------------------------------------------------------------
2677static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2678 QCString &prevClassName)
2679{
2680 const ClassDef *cd=md->getClassDef();
2681 if ( cd && prevClassName!=cd->displayName())
2682 {
2683 ol.writeString(separator);
2685 cd->displayName());
2686 prevClassName = cd->displayName();
2687 }
2688}
2689
2690static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2691 QCString &prevFileName)
2692{
2693 const FileDef *fd=md->getFileDef();
2694 if (fd && prevFileName!=fd->name())
2695 {
2696 ol.writeString(separator);
2698 fd->name());
2699 prevFileName = fd->name();
2700 }
2701}
2702
2703static void writeNamespaceLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2704 QCString &prevNamespaceName)
2705{
2706 const NamespaceDef *nd=md->getNamespaceDef();
2707 if (nd && prevNamespaceName!=nd->displayName())
2708 {
2709 ol.writeString(separator);
2711 nd->displayName());
2712 prevNamespaceName = nd->displayName();
2713 }
2714}
2715
2716static void writeModuleLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2717 QCString &prevModuleName)
2718{
2719 const ModuleDef *mod=md->getModuleDef();
2720 if (mod && prevModuleName!=mod->displayName())
2721 {
2722 ol.writeString(separator);
2723 // link to the member declaration in the module page
2724 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2725 mod->displayName());
2726 prevModuleName = mod->displayName();
2727 }
2728}
2729
2730
2731static void writeMemberList(OutputList &ol,bool useSections,const std::string &page,
2732 const Index::MemberIndexMap &memberIndexMap,
2734{
2735 int index = static_cast<int>(type);
2736 const int numIndices = 4;
2737 ASSERT(index<numIndices);
2738
2739 typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
2740 QCString &prevNamespaceName);
2741
2742 // each index tab has its own write function
2743 static writeLinkForMember_t writeLinkForMemberMap[numIndices] =
2744 {
2749 };
2750 QCString prevName;
2751 QCString prevDefName;
2752 bool first=TRUE;
2753 bool firstSection=TRUE;
2754 bool firstItem=TRUE;
2755 const Index::MemberIndexList *mil = nullptr;
2756 std::string letter;
2757 for (const auto &kv : memberIndexMap)
2758 {
2759 if (!page.empty()) // specific page mode
2760 {
2761 auto it = memberIndexMap.find(page);
2762 if (it != memberIndexMap.end())
2763 {
2764 mil = &it->second;
2765 letter = page;
2766 }
2767 }
2768 else // do all pages
2769 {
2770 mil = &kv.second;
2771 letter = kv.first;
2772 }
2773 if (mil==nullptr || mil->empty()) continue;
2774 for (const auto &md : *mil)
2775 {
2776 const char *sep = nullptr;
2777 bool isFunc=!md->isObjCMethod() &&
2778 (md->isFunction() || md->isSlot() || md->isSignal());
2779 QCString name=type==Definition::TypeModule ? md->qualifiedName() : md->name();
2780 int startIndex = getPrefixIndex(name);
2781 if (name.data()+startIndex!=prevName) // new entry
2782 {
2783 if ((prevName.isEmpty() ||
2784 tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2785 useSections) // new section
2786 {
2787 if (!firstItem) ol.endItemListItem();
2788 if (!firstSection) ol.endItemList();
2789 QCString cs = letterToLabel(letter.c_str());
2790 QCString anchor=QCString("index_")+convertToId(cs);
2791 QCString title=QCString("- ")+letter.c_str()+" -";
2792 ol.startSection(anchor,title,SectionType::Subsection);
2793 ol.docify(title);
2795 ol.startItemList();
2796 firstSection=FALSE;
2797 firstItem=TRUE;
2798 }
2799 else if (!useSections && first)
2800 {
2801 ol.startItemList();
2802 first=FALSE;
2803 }
2804
2805 // member name
2806 if (!firstItem) ol.endItemListItem();
2807 ol.startItemListItem();
2808 firstItem=FALSE;
2809 ol.docify(name);
2810 if (isFunc) ol.docify("()");
2811 //ol.writeString("\n");
2812
2813 // link to class
2814 prevDefName="";
2815 sep = "&#160;:&#160;";
2816 prevName = name.data()+startIndex;
2817 }
2818 else // same entry
2819 {
2820 sep = ", ";
2821 // link to class for other members with the same name
2822 }
2823 if (index<numIndices)
2824 {
2825 // write the link for the specific list type
2826 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2827 }
2828 }
2829 if (!page.empty())
2830 {
2831 break;
2832 }
2833 }
2834 if (!firstItem) ol.endItemListItem();
2835 ol.endItemList();
2836}
2837
2838//----------------------------------------------------------------------------
2839
2841{
2842 bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
2843 const ClassDef *cd=nullptr;
2844
2845 if (md->isLinkableInProject() &&
2846 (cd=md->getClassDef()) &&
2847 cd->isLinkableInProject() &&
2849 {
2850 QCString n = md->name();
2851 std::string letter = getUTF8CharAt(n.str(),getPrefixIndex(n));
2852 if (!letter.empty())
2853 {
2854 letter = convertUTF8ToLower(letter);
2855 bool isFriendToHide = hideFriendCompounds &&
2856 (QCString(md->typeString())=="friend class" ||
2857 QCString(md->typeString())=="friend struct" ||
2858 QCString(md->typeString())=="friend union");
2859 if (!(md->isFriend() && isFriendToHide) &&
2860 (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
2861 )
2862 {
2864 }
2865 if (md->isFunction() || md->isSlot() || md->isSignal())
2866 {
2868 }
2869 else if (md->isVariable())
2870 {
2872 }
2873 else if (md->isTypedef())
2874 {
2876 }
2877 else if (md->isEnumerate())
2878 {
2880 }
2881 else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
2882 {
2884 }
2885 else if (md->isProperty())
2886 {
2888 }
2889 else if (md->isEvent())
2890 {
2892 }
2893 else if (md->isRelated() || md->isForeign() ||
2894 (md->isFriend() && !isFriendToHide))
2895 {
2897 }
2898 }
2899 }
2900}
2901
2902//----------------------------------------------------------------------------
2903
2905{
2906 const NamespaceDef *nd=md->getNamespaceDef();
2907 if (nd && nd->isLinkableInProject() && md->isLinkableInProject())
2908 {
2909 QCString n = md->name();
2910 std::string letter = getUTF8CharAt(n.str(),getPrefixIndex(n));
2911 if (!letter.empty())
2912 {
2913 letter = convertUTF8ToLower(letter);
2914 if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
2915 {
2917 }
2918 if (md->isFunction())
2919 {
2921 }
2922 else if (md->isVariable())
2923 {
2925 }
2926 else if (md->isTypedef())
2927 {
2929 }
2930 else if (md->isSequence())
2931 {
2933 }
2934 else if (md->isDictionary())
2935 {
2937 }
2938 else if (md->isEnumerate())
2939 {
2941 }
2942 else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
2943 {
2945 }
2946 }
2947 }
2948}
2949
2950//----------------------------------------------------------------------------
2951
2953{
2954 const FileDef *fd=md->getFileDef();
2955 if (fd && fd->isLinkableInProject() && md->isLinkableInProject())
2956 {
2957 QCString n = md->name();
2958 std::string letter = getUTF8CharAt(n.str(),getPrefixIndex(n));
2959 if (!letter.empty())
2960 {
2961 letter = convertUTF8ToLower(letter);
2962 if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
2963 {
2965 }
2966 if (md->isFunction())
2967 {
2969 }
2970 else if (md->isVariable())
2971 {
2973 }
2974 else if (md->isTypedef())
2975 {
2977 }
2978 else if (md->isSequence())
2979 {
2981 }
2982 else if (md->isDictionary())
2983 {
2985 }
2986 else if (md->isEnumerate())
2987 {
2989 }
2990 else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
2991 {
2993 }
2994 else if (md->isDefine())
2995 {
2997 }
2998 }
2999 }
3000}
3001
3002//----------------------------------------------------------------------------
3003
3005{
3006 const ModuleDef *mod = md->getModuleDef();
3007 if (mod && mod->isPrimaryInterface() && mod->isLinkableInProject() && md->isLinkableInProject())
3008 {
3009 QCString n = md->name();
3010 std::string letter = getUTF8CharAt(n.str(),getPrefixIndex(n));
3011 if (!letter.empty())
3012 {
3013 letter = convertUTF8ToLower(letter);
3014 if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
3015 {
3017 }
3018 if (md->isFunction())
3019 {
3021 }
3022 else if (md->isVariable())
3023 {
3025 }
3026 else if (md->isTypedef())
3027 {
3029 }
3030 else if (md->isEnumerate())
3031 {
3033 }
3034 else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
3035 {
3037 }
3038 }
3039 }
3040}
3041
3042//----------------------------------------------------------------------------
3043
3045 const Index::MemberIndexMap &map,const std::string &page,
3046 QCString fullName,bool multiPage)
3047{
3048 bool first=TRUE;
3050 for (const auto &[letter,list] : map)
3051 {
3052 QCString ci(letter);
3053 QCString is = letterToLabel(ci);
3054 QCString anchor;
3056 if (!multiPage)
3057 anchor="#index_";
3058 else if (first)
3059 anchor=fullName+extension+"#index_";
3060 else
3061 anchor=fullName+"_"+is+extension+"#index_";
3062 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,TRUE,first);
3063 ol.writeString(ci);
3065 first=FALSE;
3066 }
3068}
3069
3070//----------------------------------------------------------------------------
3071
3072/** Helper class representing a class member in the navigation menu. */
3074{
3075 CmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3076 const char *fname;
3078};
3079
3080static const CmhlInfo *getCmhlInfo(size_t hl)
3081{
3082 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3083 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3084 static CmhlInfo cmhlInfo[] =
3085 {
3086 CmhlInfo("functions", theTranslator->trAll()),
3087 CmhlInfo("functions_func",
3088 fortranOpt ? theTranslator->trSubprograms() :
3089 vhdlOpt ? theTranslator->trFunctionAndProc() :
3090 theTranslator->trFunctions()),
3091 CmhlInfo("functions_vars",theTranslator->trVariables()),
3092 CmhlInfo("functions_type",theTranslator->trTypedefs()),
3093 CmhlInfo("functions_enum",theTranslator->trEnumerations()),
3094 CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
3095 CmhlInfo("functions_prop",theTranslator->trProperties()),
3096 CmhlInfo("functions_evnt",theTranslator->trEvents()),
3097 CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
3098 };
3099 return &cmhlInfo[hl];
3100}
3101
3103{
3104 const auto &index = Index::instance();
3105 if (index.numDocumentedClassMembers(hl)==0) return;
3106
3107 bool disableIndex = Config_getBool(DISABLE_INDEX);
3108 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3109 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3110 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3111
3112 bool multiPageIndex=FALSE;
3113 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3114 {
3115 multiPageIndex=TRUE;
3116 }
3117
3118 ol.pushGeneratorState();
3120
3122 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3123 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3124 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3125 bool addToIndex = lne==nullptr || lne->visible();
3126
3127 if (addToIndex)
3128 {
3129 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3130 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3131 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3132 }
3133
3134 bool first=TRUE;
3135 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3136 {
3137 QCString fileName = getCmhlInfo(hl)->fname;
3138 if (multiPageIndex)
3139 {
3140 QCString cs(letter);
3141 if (!first)
3142 {
3143 fileName+="_"+letterToLabel(cs);
3144 }
3145 if (addToIndex)
3146 {
3147 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3148 }
3149 }
3150
3151 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3152
3153 auto writeQuickLinks = [&,cap_letter=letter]()
3154 {
3156 if (!Config_getBool(HTML_DYNAMIC_MENUS))
3157 {
3159
3160 // index item for global member list
3163 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3165
3166 // index items per category member lists
3167 for (int i=1;i<ClassMemberHighlight::Total;i++)
3168 {
3169 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3170 {
3172 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3173 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3174 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3176 }
3177 }
3178
3180
3181 // quick alphabetical index
3182 if (quickIndex)
3183 {
3184 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3185 getCmhlInfo(hl)->fname,multiPageIndex);
3186 }
3187 }
3188 };
3189
3190 ol.startFile(fileName+extension,QCString(),title);
3191 ol.startQuickIndices();
3192 if (!disableIndex && !quickLinksAfterSplitbar)
3193 {
3194 writeQuickLinks();
3195 }
3196 ol.endQuickIndices();
3197 ol.writeSplitBar(fileName);
3198 if (quickLinksAfterSplitbar)
3199 {
3200 writeQuickLinks();
3201 }
3202 ol.writeSearchInfo();
3203
3204 ol.startContents();
3205
3206 ol.startTextBlock();
3207 ol.parseText(hl == ClassMemberHighlight::All && lne ? lne->intro() : theTranslator->trCompoundMembersDescriptionTotal(hl));
3208 ol.endTextBlock();
3209
3210 writeMemberList(ol,quickIndex,
3211 multiPageIndex ? letter : std::string(),
3212 index.isClassIndexLetterUsed(hl),
3214 endFile(ol);
3215 first=FALSE;
3216 }
3217
3218 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3219
3220 ol.popGeneratorState();
3221}
3222
3224{
3225 const auto &index = Index::instance();
3226 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3227 bool addToIndex = lne==nullptr || lne->visible();
3228
3229 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3230 {
3231 Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
3232 Doxygen::indexList->incContentsDepth();
3233 }
3243 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3244 {
3245 Doxygen::indexList->decContentsDepth();
3246 }
3247
3248}
3249
3250//----------------------------------------------------------------------------
3251
3252/** Helper class representing a file member in the navigation menu. */
3254{
3255 FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3256 const char *fname;
3258};
3259
3260static const FmhlInfo *getFmhlInfo(size_t hl)
3261{
3262 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3263 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3264 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3265 static FmhlInfo fmhlInfo[] =
3266 {
3267 FmhlInfo("globals", theTranslator->trAll()),
3268 FmhlInfo("globals_func",
3269 fortranOpt ? theTranslator->trSubprograms() :
3270 vhdlOpt ? theTranslator->trFunctionAndProc() :
3271 theTranslator->trFunctions()),
3272 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3273 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3274 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3275 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3276 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3277 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3278 FmhlInfo("globals_defs",theTranslator->trDefines())
3279 };
3280 return &fmhlInfo[hl];
3281}
3282
3284{
3285 const auto &index = Index::instance();
3286 if (index.numDocumentedFileMembers(hl)==0) return;
3287
3288 bool disableIndex = Config_getBool(DISABLE_INDEX);
3289 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3290 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3291 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3292
3293 bool multiPageIndex=FALSE;
3294 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3295 {
3296 multiPageIndex=TRUE;
3297 }
3298
3299 ol.pushGeneratorState();
3301
3303 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3304 QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3305 bool addToIndex = lne==nullptr || lne->visible();
3306
3307 if (addToIndex)
3308 {
3309 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3310 getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3311 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3312 }
3313
3314 bool first=TRUE;
3315 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3316 {
3317 QCString fileName = getFmhlInfo(hl)->fname;
3318 if (multiPageIndex)
3319 {
3320 QCString cs(letter);
3321 if (!first)
3322 {
3323 fileName+="_"+letterToLabel(cs);
3324 }
3325 if (addToIndex)
3326 {
3327 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3328 }
3329 }
3330
3331 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3332
3333 auto writeQuickLinks = [&,cap_letter=letter]()
3334 {
3336 if (!Config_getBool(HTML_DYNAMIC_MENUS))
3337 {
3339
3340 // index item for all file member lists
3343 ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3345
3346 // index items for per category member lists
3347 for (int i=1;i<FileMemberHighlight::Total;i++)
3348 {
3349 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3350 {
3352 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3353 ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3355 }
3356 }
3357
3359
3360 if (quickIndex)
3361 {
3362 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3363 getFmhlInfo(hl)->fname,multiPageIndex);
3364 }
3365 }
3366 };
3367
3368 ol.startFile(fileName+extension,QCString(),title);
3369 ol.startQuickIndices();
3370 if (!disableIndex && !quickLinksAfterSplitbar)
3371 {
3372 writeQuickLinks();
3373 }
3374 ol.endQuickIndices();
3375 ol.writeSplitBar(fileName);
3376 if (quickLinksAfterSplitbar)
3377 {
3378 writeQuickLinks();
3379 }
3380 ol.writeSearchInfo();
3381
3382 ol.startContents();
3383
3384 ol.startTextBlock();
3385 ol.parseText(hl == FileMemberHighlight::All && lne ? lne->intro() : theTranslator->trFileMembersDescriptionTotal(hl));
3386 ol.endTextBlock();
3387
3388 writeMemberList(ol,quickIndex,
3389 multiPageIndex ? letter : std::string(),
3390 index.isFileIndexLetterUsed(hl),
3392 endFile(ol);
3393 first=FALSE;
3394 }
3395 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3396 ol.popGeneratorState();
3397}
3398
3423
3424//----------------------------------------------------------------------------
3425
3426/** Helper class representing a namespace member in the navigation menu. */
3428{
3429 NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3430 const char *fname;
3432};
3433
3434static const NmhlInfo *getNmhlInfo(size_t hl)
3435{
3436 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3437 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3438 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3439 static NmhlInfo nmhlInfo[] =
3440 {
3441 NmhlInfo("namespacemembers", theTranslator->trAll()),
3442 NmhlInfo("namespacemembers_func",
3443 fortranOpt ? theTranslator->trSubprograms() :
3444 vhdlOpt ? theTranslator->trFunctionAndProc() :
3445 theTranslator->trFunctions()),
3446 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3447 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3448 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3449 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3450 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3451 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3452 };
3453 return &nmhlInfo[hl];
3454}
3455
3456//----------------------------------------------------------------------------
3457
3460{
3461 const auto &index = Index::instance();
3462 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3463
3464 bool disableIndex = Config_getBool(DISABLE_INDEX);
3465 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3466 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3467 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3468
3469 bool multiPageIndex=FALSE;
3470 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3471 {
3472 multiPageIndex=TRUE;
3473 }
3474
3475 ol.pushGeneratorState();
3477
3479 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3480 QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3481 bool addToIndex = lne==nullptr || lne->visible();
3482
3483 if (addToIndex)
3484 {
3485 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3486 getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3487 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3488 }
3489
3490 bool first=TRUE;
3491 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3492 {
3493 QCString fileName = getNmhlInfo(hl)->fname;
3494 if (multiPageIndex)
3495 {
3496 QCString cs(letter);
3497 if (!first)
3498 {
3499 fileName+="_"+letterToLabel(cs);
3500 }
3501 if (addToIndex)
3502 {
3503 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3504 }
3505 }
3506
3507 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3508
3509 auto writeQuickLinks = [&,cap_letter=letter]()
3510 {
3512 if (!Config_getBool(HTML_DYNAMIC_MENUS))
3513 {
3515
3516 // index item for all namespace member lists
3519 ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3521
3522 // index items per category member lists
3523 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3524 {
3525 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3526 {
3528 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3529 ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3531 }
3532 }
3533
3535
3536 if (quickIndex)
3537 {
3538 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3539 getNmhlInfo(hl)->fname,multiPageIndex);
3540 }
3541 }
3542 };
3543
3544 ol.startFile(fileName+extension,QCString(),title);
3545 ol.startQuickIndices();
3546 if (!disableIndex && !quickLinksAfterSplitbar)
3547 {
3548 writeQuickLinks();
3549 }
3550 ol.endQuickIndices();
3551 ol.writeSplitBar(fileName);
3552 if (quickLinksAfterSplitbar)
3553 {
3554 writeQuickLinks();
3555 }
3556 ol.writeSearchInfo();
3557
3558 ol.startContents();
3559
3560 ol.startTextBlock();
3561 ol.parseText(hl == NamespaceMemberHighlight::All && lne ? lne->intro() : theTranslator->trNamespaceMembersDescriptionTotal(hl));
3562 ol.endTextBlock();
3563
3564 writeMemberList(ol,quickIndex,
3565 multiPageIndex ? letter : std::string(),
3566 index.isNamespaceIndexLetterUsed(hl),
3568 endFile(ol);
3569 first=FALSE;
3570 }
3571 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3572 ol.popGeneratorState();
3573}
3574
3576{
3577 const auto &index = Index::instance();
3578 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3579 bool addToIndex = lne==nullptr || lne->visible();
3580 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3581 {
3582 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
3583 Doxygen::indexList->incContentsDepth();
3584 }
3585 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3594 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3595 {
3596 Doxygen::indexList->decContentsDepth();
3597 }
3598
3599}
3600
3601//----------------------------------------------------------------------------
3602
3603/** Helper class representing a module member in the navigation menu. */
3605{
3606 MmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3607 const char *fname;
3609};
3610
3611static const MmhlInfo *getMmhlInfo(size_t hl)
3612{
3613 static MmhlInfo nmhlInfo[] =
3614 {
3615 MmhlInfo("modulemembers", theTranslator->trAll()),
3616 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3617 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3618 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3619 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3620 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3621 };
3622 return &nmhlInfo[hl];
3623}
3624
3625//----------------------------------------------------------------------------
3626
3629{
3630 const auto &index = Index::instance();
3631 if (index.numDocumentedModuleMembers(hl)==0) return;
3632
3633 bool disableIndex = Config_getBool(DISABLE_INDEX);
3634 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3635 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3636 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3637
3638 bool multiPageIndex=FALSE;
3639 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3640 {
3641 multiPageIndex=TRUE;
3642 }
3643
3644 ol.pushGeneratorState();
3646
3648 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3649 QCString title = lne ? lne->title() : theTranslator->trModulesMembers();
3650 bool addToIndex = lne==nullptr || lne->visible();
3651
3652 if (addToIndex)
3653 {
3654 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,QCString(),
3655 getMmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3656 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3657 }
3658
3659 bool first=TRUE;
3660 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3661 {
3662 QCString fileName = getMmhlInfo(hl)->fname;
3663 if (multiPageIndex)
3664 {
3665 QCString cs(letter);
3666 if (!first)
3667 {
3668 fileName+="_"+letterToLabel(cs);
3669 }
3670 if (addToIndex)
3671 {
3672 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3673 }
3674 }
3675
3676 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3677
3678 auto writeQuickLinks = [&,cap_letter=letter]()
3679 {
3681 if (!Config_getBool(HTML_DYNAMIC_MENUS))
3682 {
3684
3685 // index item for all namespace member lists
3688 ol.writeString(fixSpaces(getMmhlInfo(0)->title));
3690
3691 // index items per category member lists
3692 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3693 {
3694 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3695 {
3697 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3698 ol.writeString(fixSpaces(getMmhlInfo(i)->title));
3700 }
3701 }
3702
3704
3705 if (quickIndex)
3706 {
3707 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3708 getMmhlInfo(hl)->fname,multiPageIndex);
3709 }
3710 }
3711 };
3712
3713 ol.startFile(fileName+extension,QCString(),title);
3714 ol.startQuickIndices();
3715 if (!disableIndex && !quickLinksAfterSplitbar)
3716 {
3717 writeQuickLinks();
3718 }
3719 ol.endQuickIndices();
3720 ol.writeSplitBar(fileName);
3721 if (quickLinksAfterSplitbar)
3722 {
3723 writeQuickLinks();
3724 }
3725 ol.writeSearchInfo();
3726
3727 ol.startContents();
3728
3729 ol.startTextBlock();
3730 ol.parseText(hl == ModuleMemberHighlight::All && lne ? lne->intro() : theTranslator->trModuleMembersDescriptionTotal(hl));
3731 ol.endTextBlock();
3732
3733 writeMemberList(ol,quickIndex,
3734 multiPageIndex ? letter : std::string(),
3735 index.isModuleIndexLetterUsed(hl),
3737 endFile(ol);
3738 first=FALSE;
3739 }
3740 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3741 ol.popGeneratorState();
3742}
3743
3744
3745//----------------------------------------------------------------------------
3746
3748{
3749 const auto &index = Index::instance();
3750 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3751 bool addToIndex = lne==nullptr || lne->visible();
3752 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3753 {
3754 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3755 Doxygen::indexList->incContentsDepth();
3756 }
3757 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3764 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3765 {
3766 Doxygen::indexList->decContentsDepth();
3767 }
3768}
3769
3770//----------------------------------------------------------------------------
3771
3773{
3774 if (Doxygen::exampleLinkedMap->empty()) return;
3775 ol.pushGeneratorState();
3778 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3779 QCString title = lne ? lne->title() : theTranslator->trExamples();
3780 bool addToIndex = lne==nullptr || lne->visible();
3781
3782 startFile(ol,"examples",QCString(),title,HighlightedItem::Examples);
3783
3784 startTitle(ol,QCString());
3785 ol.parseText(title);
3786 endTitle(ol,QCString(),QCString());
3787
3788 ol.startContents();
3789
3790 if (addToIndex)
3791 {
3792 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3793 Doxygen::indexList->incContentsDepth();
3794 }
3795
3796 ol.startTextBlock();
3797 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3798 ol.endTextBlock();
3799
3800 ol.startItemList();
3801 for (const auto &pd : *Doxygen::exampleLinkedMap)
3802 {
3803 ol.startItemListItem();
3804 QCString n=pd->getOutputFileBase();
3805 if (!pd->title().isEmpty())
3806 {
3807 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3808 if (addToIndex)
3809 {
3810 Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,QCString(),FALSE,TRUE);
3811 }
3812 }
3813 else
3814 {
3815 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3816 if (addToIndex)
3817 {
3818 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3819 }
3820 }
3821 ol.endItemListItem();
3822 //ol.writeString("\n");
3823 }
3824 ol.endItemList();
3825
3826 if (addToIndex)
3827 {
3828 Doxygen::indexList->decContentsDepth();
3829 }
3830 endFile(ol);
3831 ol.popGeneratorState();
3832}
3833
3834
3835//----------------------------------------------------------------------------
3836
3837static void countRelatedPages(int &docPages,int &indexPages)
3838{
3839 docPages=indexPages=0;
3840 for (const auto &pd : *Doxygen::pageLinkedMap)
3841 {
3842 if (pd->visibleInIndex() && !pd->hasParentPage())
3843 {
3844 indexPages++;
3845 }
3846 if (pd->documentedPage())
3847 {
3848 docPages++;
3849 }
3850 }
3851}
3852
3853//----------------------------------------------------------------------------
3854
3856{
3857 QCString projectName = Config_getString(PROJECT_NAME);
3858 QCString title;
3860 {
3861 title = filterTitle(Doxygen::mainPage->title());
3862 }
3863 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3864}
3865
3866static void writePages(PageDef *pd,FTVHelp *ftv)
3867{
3868 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3869 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3870 bool addToIndex = lne==nullptr || lne->visible();
3871 if (!addToIndex) return;
3872
3873 bool hasSubPages = pd->hasSubPages();
3874 bool hasSections = pd->hasSections();
3875
3876 if (pd->visibleInIndex())
3877 {
3878 QCString pageTitle;
3879
3880 if (pd->title().isEmpty())
3881 pageTitle=pd->name();
3882 else
3883 pageTitle=filterTitle(pd->title());
3884
3885 if (ftv)
3886 {
3887 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
3888 ftv->addContentsItem(
3889 hasSubPages,pageTitle,
3890 pd->getReference(),pd->getOutputFileBase(),
3891 QCString(),hasSubPages,TRUE,pd);
3892 }
3893 if (addToIndex && pd!=Doxygen::mainPage.get())
3894 {
3895 Doxygen::indexList->addContentsItem(
3896 hasSubPages || hasSections,pageTitle,
3897 pd->getReference(),pd->getOutputFileBase(),
3898 QCString(),hasSubPages,TRUE,pd);
3899 }
3900 }
3901 if (hasSubPages && ftv) ftv->incContentsDepth();
3902 bool doIndent = (hasSections || hasSubPages) &&
3903 (pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
3904 if (doIndent)
3905 {
3906 Doxygen::indexList->incContentsDepth();
3907 }
3908 if (hasSections)
3909 {
3910 pd->addSectionsToIndex();
3911 }
3912 for (const auto &subPage : pd->getSubPages())
3913 {
3914 writePages(subPage,ftv);
3915 }
3916 if (hasSubPages && ftv) ftv->decContentsDepth();
3917 if (doIndent)
3918 {
3919 Doxygen::indexList->decContentsDepth();
3920 }
3921 //printf("end writePages()=%s\n",qPrint(pd->title()));
3922}
3923
3924//----------------------------------------------------------------------------
3925
3927{
3928 if (Index::instance().numIndexedPages()==0) return;
3929 ol.pushGeneratorState();
3931 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3932 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
3933 startFile(ol,"pages",QCString(),title,HighlightedItem::Pages);
3934 startTitle(ol,QCString());
3935 ol.parseText(title);
3936 endTitle(ol,QCString(),QCString());
3937 ol.startContents();
3938 ol.startTextBlock();
3939 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
3940 ol.endTextBlock();
3941
3942 {
3943 FTVHelp ftv(false);
3944 for (const auto &pd : *Doxygen::pageLinkedMap)
3945 {
3946 if ((pd->getOuterScope()==nullptr ||
3947 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
3948 pd->visibleInIndex()
3949 )
3950 {
3951 writePages(pd.get(),&ftv);
3952 }
3953 }
3954 TextStream t;
3956 ol.writeString(t.str().c_str());
3957 }
3958
3959// ol.popGeneratorState();
3960 // ------
3961
3962 endFile(ol);
3963 ol.popGeneratorState();
3964}
3965
3966//----------------------------------------------------------------------------
3967
3968static int countGroups()
3969{
3970 int count=0;
3971 for (const auto &gd : *Doxygen::groupLinkedMap)
3972 {
3973 if (!gd->isReference())
3974 {
3975 //gd->visited=FALSE;
3976 count++;
3977 }
3978 }
3979 return count;
3980}
3981
3982//----------------------------------------------------------------------------
3983
3984static int countDirs()
3985{
3986 int count=0;
3987 for (const auto &dd : *Doxygen::dirLinkedMap)
3988 {
3989 if (dd->isLinkableInProject())
3990 {
3991 count++;
3992 }
3993 }
3994 return count;
3995}
3996
3997
3998//----------------------------------------------------------------------------
3999
4001{
4002 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4003 ol.pushGeneratorState();
4005
4006 DotLegendGraph gd;
4007 gd.writeGraph(Config_getString(HTML_OUTPUT));
4008
4009 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4010 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4011 // temporarily disable the stripping of comments for our own code example!
4012 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4013 // temporarily disable create subdirs for linking to our example
4014 Config_updateBool(CREATE_SUBDIRS,FALSE);
4015
4016 startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
4017 startTitle(ol,QCString());
4018 ol.parseText(theTranslator->trLegendTitle());
4019 endTitle(ol,QCString(),QCString());
4020 ol.startContents();
4021 QCString legendDocs = theTranslator->trLegendDocs();
4022 int s = legendDocs.find("<center>");
4023 int e = legendDocs.find("</center>");
4024 QCString imgExt = getDotImageExtension();
4025 if (imgExt=="svg" && s!=-1 && e!=-1)
4026 {
4027 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4028 //printf("legendDocs=%s\n",qPrint(legendDocs));
4029 }
4030
4031 {
4032 auto fd = createFileDef("","graph_legend.dox");
4033 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,FALSE,FALSE,
4035 }
4036
4037 // restore config settings
4038 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4039 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4040
4041 endFile(ol);
4042 ol.popGeneratorState();
4043}
4044
4045
4046
4047//----------------------------------------------------------------------------
4048/*!
4049 * write groups as hierarchical trees
4050 */
4051static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex)
4052{
4053 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4054 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4055 if (level>20)
4056 {
4057 warn(gd->getDefFileName(),gd->getDefLine(),
4058 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->name());
4059 return;
4060 }
4061
4062 /* Some groups should appear twice under different parent-groups.
4063 * That is why we should not check if it was visited
4064 */
4065 if ((!gd->isASubGroup() || level>0) && gd->isVisible() && gd->isVisibleInHierarchy())
4066 {
4067 //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
4068 // write group info
4069 bool hasSubGroups = !gd->getSubGroups().empty();
4070 bool hasSubPages = !gd->getPages().empty();
4071 size_t numSubItems = 0;
4072 for (const auto &ml : gd->getMemberLists())
4073 {
4074 if (ml->listType().isDocumentation())
4075 {
4076 numSubItems += ml->size();
4077 }
4078 }
4079 numSubItems += gd->getNamespaces().size();
4080 numSubItems += gd->getClasses().size();
4081 numSubItems += gd->getFiles().size();
4082 numSubItems += gd->getConcepts().size();
4083 numSubItems += gd->getDirs().size();
4084 numSubItems += gd->getPages().size();
4085
4086 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4087 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
4088 if (addToIndex)
4089 {
4090 Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),QCString(),isDir,TRUE);
4091 Doxygen::indexList->incContentsDepth();
4092 }
4093 if (ftv)
4094 {
4095 ftv->addContentsItem(hasSubGroups,gd->groupTitle(),
4097 FALSE,FALSE,gd);
4098 ftv->incContentsDepth();
4099 }
4100
4101 //ol.writeListItem();
4102 //ol.startTextLink(gd->getOutputFileBase(),0);
4103 //parseText(ol,gd->groupTitle());
4104 //ol.endTextLink();
4105
4106 ol.startIndexListItem();
4108 ol.parseText(gd->groupTitle());
4110 if (gd->isReference())
4111 {
4112 ol.startTypewriter();
4113 ol.docify(" [external]");
4114 ol.endTypewriter();
4115 }
4116
4117 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
4118 {
4119 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4120 {
4121 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
4122 if (lmd)
4123 {
4124 MemberList *ml = gd->getMemberList(lmd->type);
4125 if (ml)
4126 {
4127 for (const auto &md : *ml)
4128 {
4129 const MemberVector &enumList = md->enumFieldList();
4130 isDir = !enumList.empty() && md->isEnumerate();
4131 if (md->isVisible() && !md->isAnonymous())
4132 {
4133 Doxygen::indexList->addContentsItem(isDir,
4134 md->qualifiedName(),md->getReference(),
4135 md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
4136 }
4137 if (isDir)
4138 {
4139 Doxygen::indexList->incContentsDepth();
4140 for (const auto &emd : enumList)
4141 {
4142 if (emd->isVisible())
4143 {
4144 Doxygen::indexList->addContentsItem(FALSE,
4145 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4146 emd->anchor(),FALSE,addToIndex);
4147 }
4148 }
4149 Doxygen::indexList->decContentsDepth();
4150 }
4151 }
4152 }
4153 }
4154 }
4155 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4156 {
4157 for (const auto &cd : gd->getClasses())
4158 {
4159 //bool nestedClassInSameGroup =
4160 // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
4161 // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
4162 //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
4163 if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
4164 {
4166 LayoutDocManager::Class,
4167 cd->displayName(),
4168 cd->anchor(),
4169 addToIndex,
4170 TRUE);
4171 }
4172 }
4173 }
4174 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex && Config_getBool(SHOW_NAMESPACES))
4175 {
4176 for (const auto &nd : gd->getNamespaces())
4177 {
4178 if (nd->isVisible())
4179 {
4180 Doxygen::indexList->addContentsItem(FALSE,
4181 nd->displayName(),nd->getReference(),
4182 nd->getOutputFileBase(),QCString(),FALSE,Config_getBool(SHOW_NAMESPACES));
4183 }
4184 }
4185 }
4186 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4187 {
4188 for (const auto &cd : gd->getConcepts())
4189 {
4190 if (cd->isVisible())
4191 {
4192 Doxygen::indexList->addContentsItem(FALSE,
4193 cd->displayName(),cd->getReference(),
4194 cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
4195 }
4196 }
4197 }
4198 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4199 {
4200 for (const auto &fd : gd->getFiles())
4201 {
4202 if (fd->isVisible())
4203 {
4204 Doxygen::indexList->addContentsItem(FALSE,
4205 fd->displayName(),fd->getReference(),
4206 fd->getOutputFileBase(),QCString(),FALSE,fd->isLinkableViaGroup());
4207 }
4208 }
4209 }
4210 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4211 {
4212 for (const auto &dd : gd->getDirs())
4213 {
4214 if (dd->isVisible())
4215 {
4216 Doxygen::indexList->addContentsItem(FALSE,
4217 dd->shortName(),dd->getReference(),
4218 dd->getOutputFileBase(),QCString(),FALSE,FALSE);
4219 }
4220 }
4221 }
4222 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4223 {
4224 for (const auto &pd : gd->getPages())
4225 {
4226 const SectionInfo *si=nullptr;
4227 if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
4228 hasSubPages = pd->hasSubPages();
4229 bool hasSections = pd->hasSections();
4230 Doxygen::indexList->addContentsItem(
4231 hasSubPages || hasSections,
4232 pd->title(),
4233 gd->getReference(),
4234 gd->getOutputFileBase(),
4235 si ? si->label() : QCString(),
4236 hasSubPages || hasSections,
4237 TRUE); // addToNavIndex
4238 if (hasSections || hasSubPages)
4239 {
4240 Doxygen::indexList->incContentsDepth();
4241 }
4242 if (hasSections)
4243 {
4244 pd->addSectionsToIndex();
4245 }
4246 writePages(pd,nullptr);
4247 if (hasSections || hasSubPages)
4248 {
4249 Doxygen::indexList->decContentsDepth();
4250 }
4251 }
4252 }
4253 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4254 {
4255 if (!gd->getSubGroups().empty())
4256 {
4257 startIndexHierarchy(ol,level+1);
4258 for (const auto &subgd : gd->getSubGroups())
4259 {
4260 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4261 }
4262 endIndexHierarchy(ol,level+1);
4263 }
4264 }
4265 }
4266
4267 ol.endIndexListItem();
4268
4269 if (addToIndex)
4270 {
4271 Doxygen::indexList->decContentsDepth();
4272 }
4273 if (ftv)
4274 {
4275 ftv->decContentsDepth();
4276 }
4277 //gd->visited=TRUE;
4278 }
4279}
4280
4281static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
4282{
4283 if (ftv)
4284 {
4285 ol.pushGeneratorState();
4287 }
4288 startIndexHierarchy(ol,0);
4289 for (const auto &gd : *Doxygen::groupLinkedMap)
4290 {
4291 if (gd->isVisibleInHierarchy())
4292 {
4293 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4294 }
4295 }
4296 endIndexHierarchy(ol,0);
4297 if (ftv)
4298 {
4299 ol.popGeneratorState();
4300 }
4301}
4302
4303//----------------------------------------------------------------------------
4304
4306{
4307 if (Index::instance().numDocumentedGroups()==0) return;
4308 ol.pushGeneratorState();
4309 // 1.{
4312 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4313 QCString title = lne ? lne->title() : theTranslator->trTopics();
4314 bool addToIndex = lne==nullptr || lne->visible();
4315
4316 startFile(ol,"topics",QCString(),title,HighlightedItem::Topics);
4317 startTitle(ol,QCString());
4318 ol.parseText(title);
4319 endTitle(ol,QCString(),QCString());
4320 ol.startContents();
4321 ol.startTextBlock();
4322 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4323 ol.endTextBlock();
4324
4325 // ---------------
4326 // Normal group index for Latex/RTF
4327 // ---------------
4328 // 2.{
4329 ol.pushGeneratorState();
4331 Doxygen::indexList->disable();
4332
4333 writeGroupHierarchy(ol,nullptr,FALSE);
4334
4335 Doxygen::indexList->enable();
4336 ol.popGeneratorState();
4337 // 2.}
4338
4339 // ---------------
4340 // interactive group index for HTML
4341 // ---------------
4342 // 2.{
4343 ol.pushGeneratorState();
4345
4346 {
4347 if (addToIndex)
4348 {
4349 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"topics",QCString(),TRUE,TRUE);
4350 Doxygen::indexList->incContentsDepth();
4351 }
4352 FTVHelp ftv(false);
4353 writeGroupHierarchy(ol,&ftv,addToIndex);
4354 TextStream t;
4357 ol.writeString(t.str().c_str());
4358 if (addToIndex)
4359 {
4360 Doxygen::indexList->decContentsDepth();
4361 }
4362 }
4363 ol.popGeneratorState();
4364 // 2.}
4365
4366 endFile(ol);
4367 ol.popGeneratorState();
4368 // 1.}
4369}
4370
4371
4372//----------------------------------------------------------------------------
4373
4374static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod,
4375 FTVHelp* ftv, bool addToIndex)
4376{
4377 int visibleMembers = mod->countVisibleMembers();
4378 bool isDir=visibleMembers>0;
4379 if (addToIndex)
4380 {
4381 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4382 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4383 }
4384 if (ftv)
4385 {
4386 ftv->addContentsItem(false,mod->name(),
4387 mod->getReference(),mod->getOutputFileBase(),QCString(),
4388 false,false,mod);
4389 }
4390 ol.startIndexListItem();
4392 ol.parseText(mod->qualifiedName());
4394 if (mod->isReference())
4395 {
4396 ol.startTypewriter();
4397 ol.docify(" [external]");
4398 ol.endTypewriter();
4399 }
4400 if (addToIndex && isDir)
4401 {
4402 Doxygen::indexList->incContentsDepth();
4403 }
4404 if (isDir)
4405 {
4406 //ftv->incContentsDepth();
4407 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4408 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4409 writeModuleMembers(mod,addToIndex);
4410 //ftv->decContentsDepth();
4411 }
4412 if (addToIndex && isDir)
4413 {
4414 Doxygen::indexList->decContentsDepth();
4415 }
4416 ol.endIndexListItem();
4417}
4418
4419//----------------------------------------------------------------------------
4420
4421static void writeModuleList(OutputList &ol, FTVHelp *ftv,bool addToIndex)
4422{
4423 if (ftv)
4424 {
4425 ol.pushGeneratorState();
4427 }
4428 startIndexHierarchy(ol,0);
4429 for (const auto &mod : ModuleManager::instance().modules())
4430 {
4431 if (mod->isPrimaryInterface())
4432 {
4433 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4434 }
4435 }
4436 endIndexHierarchy(ol,0);
4437 if (ftv)
4438 {
4439 ol.popGeneratorState();
4440 }
4441}
4442
4443//----------------------------------------------------------------------------
4444
4446{
4447 if (ModuleManager::instance().numDocumentedModules()==0) return;
4448 ol.pushGeneratorState();
4449 // 1.{
4450
4453 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4454 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4455 QCString title = lne ? lne->title() : theTranslator->trModules();
4456 bool addToIndex = lne==nullptr || lne->visible();
4457
4458 startFile(ol,"modules",QCString(),title,HighlightedItem::Modules);
4459 startTitle(ol,QCString());
4460 ol.parseText(title);
4461 endTitle(ol,QCString(),QCString());
4462 ol.startContents();
4463 ol.startTextBlock();
4464 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4465 ol.endTextBlock();
4466
4467 // ---------------
4468 // Normal group index for Latex/RTF
4469 // ---------------
4470 // 2.{
4471 ol.pushGeneratorState();
4473 Doxygen::indexList->disable();
4474
4475 writeModuleList(ol,nullptr,FALSE);
4476
4477 Doxygen::indexList->enable();
4478 ol.popGeneratorState();
4479 // 2.}
4480
4481 // ---------------
4482 // interactive group index for HTML
4483 // ---------------
4484 // 2.{
4485 ol.pushGeneratorState();
4487
4488 {
4489 if (addToIndex)
4490 {
4491 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4492 Doxygen::indexList->incContentsDepth();
4493 }
4494 FTVHelp ftv(false);
4495 writeModuleList(ol,&ftv,addToIndex);
4496 TextStream t;
4498 ol.writeString(t.str().c_str());
4499 if (addToIndex)
4500 {
4501 Doxygen::indexList->decContentsDepth();
4502 }
4503 }
4504 ol.popGeneratorState();
4505 // 2.}
4506 endFile(ol);
4507 ol.popGeneratorState();
4508 // 1.}
4509}
4510
4511//----------------------------------------------------------------------------
4512
4513static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex)
4514{
4515 for (const auto &cd : concepts)
4516 {
4517 if (cd->isLinkableInProject())
4518 {
4519 if (ftv)
4520 {
4521 ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4522 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4523 }
4524 if (addToIndex)
4525 {
4526 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4527 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4528 }
4529 }
4530 }
4531}
4532
4534 bool rootOnly, bool addToIndex);
4535
4537 bool rootOnly, bool addToIndex)
4538{
4539 for (const auto &nd : nsLinkedMap)
4540 {
4541 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4542 }
4543}
4544
4545
4547 bool rootOnly, bool addToIndex)
4548{
4549 if (!nd->isAnonymous() &&
4550 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4551 {
4552 bool isDir = namespaceHasNestedConcept(nd);
4553 bool isLinkable = nd->isLinkableInProject();
4554
4555 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4556
4557 QCString ref;
4558 QCString file;
4559 if (isLinkable)
4560 {
4561 ref = nd->getReference();
4562 file = nd->getOutputFileBase();
4563 }
4564
4565 if (isDir)
4566 {
4567 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4568
4569 if (addToIndex)
4570 {
4571 // the namespace entry is already shown under the namespace list so don't
4572 // add it to the nav index and don't create a separate index file for it otherwise
4573 // it will overwrite the one written for the namespace list.
4574 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4575 false, // separateIndex
4576 false // addToNavIndex
4577 );
4578 }
4579 if (addToIndex)
4580 {
4581 Doxygen::indexList->incContentsDepth();
4582 }
4583
4584 ftv->incContentsDepth();
4586 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4587 ftv->decContentsDepth();
4588
4589 if (addToIndex)
4590 {
4591 Doxygen::indexList->decContentsDepth();
4592 }
4593 }
4594 }
4595}
4596
4597static void writeConceptRootList(FTVHelp *ftv,bool addToIndex)
4598{
4599 for (const auto &cd : *Doxygen::conceptLinkedMap)
4600 {
4601 if ((cd->getOuterScope()==nullptr ||
4602 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4603 )
4604 {
4605 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4606 ftv->addContentsItem(
4607 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4608 QCString(),false,cd->partOfGroups().empty(),cd.get());
4609 if (addToIndex)
4610 {
4611 Doxygen::indexList->addContentsItem(
4612 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4613 QCString(),false,cd->partOfGroups().empty(),cd.get());
4614 }
4615 }
4616 }
4617}
4618
4620{
4621 if (Index::instance().numDocumentedConcepts()==0) return;
4622 ol.pushGeneratorState();
4623 // 1.{
4626 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4627 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4628 bool addToIndex = lne==nullptr || lne->visible();
4629
4630 startFile(ol,"concepts",QCString(),title,HighlightedItem::Concepts);
4631 startTitle(ol,QCString());
4632 ol.parseText(title);
4633 endTitle(ol,QCString(),QCString());
4634 ol.startContents();
4635 ol.startTextBlock();
4636 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4637 ol.endTextBlock();
4638
4639 // ---------------
4640 // Normal group index for Latex/RTF
4641 // ---------------
4642 // 2.{
4643 ol.pushGeneratorState();
4645
4646 bool first=TRUE;
4647 for (const auto &cd : *Doxygen::conceptLinkedMap)
4648 {
4649 if (cd->isLinkableInProject())
4650 {
4651 if (first)
4652 {
4653 ol.startIndexList();
4654 first=FALSE;
4655 }
4656 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4657 ol.startIndexKey();
4658 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4659 ol.endIndexKey();
4660
4661 bool hasBrief = !cd->briefDescription().isEmpty();
4662 ol.startIndexValue(hasBrief);
4663 if (hasBrief)
4664 {
4665 //ol.docify(" (");
4666 ol.generateDoc(
4667 cd->briefFile(),cd->briefLine(),
4668 cd.get(),nullptr,
4669 cd->briefDescription(TRUE),
4670 FALSE, // index words
4671 FALSE, // isExample
4672 QCString(), // example name
4673 TRUE, // single line
4674 TRUE, // link from index
4675 Config_getBool(MARKDOWN_SUPPORT)
4676 );
4677 //ol.docify(")");
4678 }
4679 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4680
4681 }
4682 }
4683 if (!first) ol.endIndexList();
4684
4685 ol.popGeneratorState();
4686 // 2.}
4687
4688 // ---------------
4689 // interactive group index for HTML
4690 // ---------------
4691 // 2.{
4692 ol.pushGeneratorState();
4694
4695 {
4696 if (addToIndex)
4697 {
4698 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
4699 Doxygen::indexList->incContentsDepth();
4700 }
4701 FTVHelp ftv(false);
4702 for (const auto &nd : *Doxygen::namespaceLinkedMap)
4703 {
4704 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4705 }
4706 writeConceptRootList(&ftv,addToIndex);
4707 TextStream t;
4709 ol.writeString(t.str().c_str());
4710 if (addToIndex)
4711 {
4712 Doxygen::indexList->decContentsDepth();
4713 }
4714 }
4715 ol.popGeneratorState();
4716 // 2.}
4717
4718 endFile(ol);
4719 ol.popGeneratorState();
4720 // 1.}
4721}
4722
4723//----------------------------------------------------------------------------
4724
4726{
4727 if (lne->baseFile().startsWith("usergroup"))
4728 {
4729 ol.pushGeneratorState();
4732 startTitle(ol,QCString());
4733 ol.parseText(lne->title());
4734 endTitle(ol,QCString(),QCString());
4735 ol.startContents();
4736 int count=0;
4737 for (const auto &entry: lne->children())
4738 {
4739 if (entry->visible()) count++;
4740 }
4741 if (count>0)
4742 {
4743 ol.writeString("<ul>\n");
4744 for (const auto &entry: lne->children())
4745 {
4746 if (entry->visible())
4747 {
4748 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4749 fixSpaces(entry->title())+"</span></a></li>\n");
4750 }
4751 }
4752 ol.writeString("</ul>\n");
4753 }
4754 endFile(ol);
4755 ol.popGeneratorState();
4756 }
4757}
4758
4759//----------------------------------------------------------------------------
4760
4761
4762static void writeIndex(OutputList &ol)
4763{
4764 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4765 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4766 bool disableIndex = Config_getBool(DISABLE_INDEX);
4767 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4768 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4769 QCString projectName = Config_getString(PROJECT_NAME);
4770 // save old generator state
4771 ol.pushGeneratorState();
4772
4773 QCString projPrefix;
4774 if (!projectName.isEmpty())
4775 {
4776 projPrefix=projectName+" ";
4777 }
4778
4779 //--------------------------------------------------------------------
4780 // write HTML index
4781 //--------------------------------------------------------------------
4783
4784 QCString defFileName =
4785 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4786 int defLine =
4787 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4788
4789 QCString title;
4790 if (!mainPageHasTitle())
4791 {
4792 title = theTranslator->trMainPage();
4793 }
4794 else if (Doxygen::mainPage)
4795 {
4796 title = filterTitle(Doxygen::mainPage->title());
4797 }
4798
4799 QCString indexName="index";
4800 ol.startFile(indexName,QCString(),title);
4801
4803 {
4804 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4805 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4806 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4807 if (hasTitle) // to avoid duplicate entries in the treeview
4808 {
4809 Doxygen::indexList->addContentsItem(hasSubs,
4810 title,
4811 QCString(),
4812 indexName,
4813 QCString(),
4814 hasSubs,
4815 TRUE);
4816 }
4817 if (hasSubs)
4818 {
4819 writePages(Doxygen::mainPage.get(),nullptr);
4820 }
4821 }
4822
4823 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4824 ol.startQuickIndices();
4825 if (!disableIndex && !quickLinksAfterSplitbar)
4826 {
4828 }
4829 ol.endQuickIndices();
4830 ol.writeSplitBar(indexName);
4831 if (quickLinksAfterSplitbar)
4832 {
4834 }
4835 ol.writeSearchInfo();
4836 bool headerWritten=FALSE;
4838 {
4839 if (!Doxygen::mainPage->title().isEmpty())
4840 {
4841 if (Doxygen::mainPage->title().lower() != "notitle")
4842 ol.startPageDoc(Doxygen::mainPage->title());
4843 else
4844 ol.startPageDoc("");
4845 }
4846 else
4847 ol.startPageDoc(projectName);
4848 }
4849 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4850 {
4851 if (Doxygen::mainPage->title().lower()!="notitle")
4852 {
4853 ol.startHeaderSection();
4855 ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
4856 Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),false,false,
4857 QCString(),true,false,Config_getBool(MARKDOWN_SUPPORT));
4858 headerWritten = TRUE;
4859 }
4860 }
4861 else
4862 {
4863 if (!projectName.isEmpty())
4864 {
4865 ol.startHeaderSection();
4867 ol.parseText(theTranslator->trDocumentation(projectName));
4868 headerWritten = TRUE;
4869 }
4870 }
4871 if (headerWritten)
4872 {
4874 ol.endHeaderSection();
4875 }
4876
4877 ol.startContents();
4878 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4879 {
4881 }
4882
4884 {
4885 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections())
4886 {
4887 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4888 }
4889
4890 ol.startTextBlock();
4891 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,
4892 Doxygen::mainPage->documentation(),true,false,
4893 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4894 ol.endTextBlock();
4895 ol.endPageDoc();
4896 }
4897
4900 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4901 Doxygen::indexList->addIndexFile(fn);
4902
4903 endFile(ol);
4904
4906
4907 //--------------------------------------------------------------------
4908 // write LaTeX/RTF index
4909 //--------------------------------------------------------------------
4913
4915 {
4916 msg("Generating main page...\n");
4917 Doxygen::mainPage->writeDocumentation(ol);
4918 }
4919
4920 ol.startFile("refman",QCString(),QCString());
4924
4925 if (projPrefix.isEmpty())
4926 {
4927 ol.parseText(theTranslator->trReferenceManual());
4928 }
4929 else
4930 {
4931 ol.parseText(projPrefix);
4932 }
4933
4934 if (!Config_getString(PROJECT_NUMBER).isEmpty())
4935 {
4936 ol.startProjectNumber();
4937 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,Config_getString(PROJECT_NUMBER),false,false,
4938 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4939 ol.endProjectNumber();
4940 }
4943 ol.parseText(theTranslator->trGeneratedBy());
4947
4948 ol.lastIndexPage();
4950 {
4953 }
4954 const auto &index = Index::instance();
4955 if (index.numDocumentedPages()>0)
4956 {
4959 }
4960
4962 if (!Config_getBool(LATEX_HIDE_INDICES))
4963 {
4964 //if (indexedPages>0)
4965 //{
4966 // ol.startIndexSection(isPageIndex);
4967 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
4968 // ol.endIndexSection(isPageIndex);
4969 //}
4970 if (index.numDocumentedModules()>0)
4971 {
4973 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
4975 }
4976 if (index.numDocumentedGroups()>0)
4977 {
4979 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
4981 }
4982 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
4983 {
4984 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
4985 if (lne)
4986 {
4988 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
4990 }
4991 }
4992 if (index.numDocumentedConcepts()>0)
4993 {
4995 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
4997 }
4998 if (index.numHierarchyInterfaces()>0)
4999 {
5001 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5003 }
5004 if (index.numHierarchyClasses()>0)
5005 {
5006 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5007 if (lne)
5008 {
5010 ol.parseText(/*projPrefix+*/
5011 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5012 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5013 theTranslator->trHierarchicalIndex()
5014 ));
5016 }
5017 }
5018 if (index.numHierarchyExceptions()>0)
5019 {
5021 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5023 }
5024 if (index.numAnnotatedInterfacesPrinted()>0)
5025 {
5027 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5029 }
5030 if (index.numAnnotatedClassesPrinted()>0)
5031 {
5033 ol.parseText(/*projPrefix+*/
5034 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5035 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5036 theTranslator->trCompoundIndex()
5037 ));
5039 }
5040 if (index.numAnnotatedStructsPrinted()>0)
5041 {
5043 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5045 }
5046 if (index.numAnnotatedExceptionsPrinted()>0)
5047 {
5049 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5051 }
5052 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5053 {
5055 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5057 }
5058 }
5060
5061 if (index.numDocumentedModules()>0)
5062 {
5064 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5066 }
5067 if (index.numDocumentedGroups()>0)
5068 {
5070 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5072 }
5073 if (index.numDocumentedNamespaces()>0)
5074 {
5076 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5078 }
5079 if (index.numDocumentedConcepts()>0)
5080 {
5082 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5084 }
5085 if (index.numAnnotatedInterfacesPrinted()>0)
5086 {
5088 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5090 }
5091 if (index.numAnnotatedClassesPrinted()>0)
5092 {
5094 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5096 }
5097 if (index.numAnnotatedStructsPrinted()>0)
5098 {
5100 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5102 }
5103 if (index.numAnnotatedExceptionsPrinted()>0)
5104 {
5106 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5108 }
5109 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5110 {
5112 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5114 }
5115 if (!Doxygen::exampleLinkedMap->empty())
5116 {
5118 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5120 }
5122 endFile(ol);
5123
5124 ol.popGeneratorState();
5125}
5126
5127static std::vector<bool> indexWritten;
5128
5130{
5131 auto isRef = [](const QCString &s)
5132 {
5133 return s.startsWith("@ref") || s.startsWith("\\ref");
5134 };
5135 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5136 const auto &index = Index::instance();
5137 for (const auto &lne : entries)
5138 {
5139 LayoutNavEntry::Kind kind = lne->kind();
5140 size_t idx = static_cast<size_t>(kind);
5141 if (idx>=indexWritten.size())
5142 {
5143 size_t oldSize = indexWritten.size();
5144 size_t newSize = idx+1;
5145 indexWritten.resize(newSize);
5146 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5147 }
5148 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5149 bool addToIndex=lne->visible();
5150 bool needsClosing=FALSE;
5151 if (!indexWritten.at(idx))
5152 {
5153 switch(kind)
5154 {
5155 case LayoutNavEntry::MainPage:
5156 msg("Generating index page...\n");
5157 writeIndex(ol);
5158 break;
5159 case LayoutNavEntry::Pages:
5160 msg("Generating page index...\n");
5161 writePageIndex(ol);
5162 break;
5163 case LayoutNavEntry::Topics:
5164 msg("Generating topic index...\n");
5165 writeTopicIndex(ol);
5166 break;
5167 case LayoutNavEntry::Modules:
5168 {
5169 if (index.numDocumentedModules()>0 && addToIndex)
5170 {
5171 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5172 Doxygen::indexList->incContentsDepth();
5173 needsClosing=TRUE;
5174 }
5175 }
5176 break;
5177 case LayoutNavEntry::ModuleList:
5178 msg("Generating module index...\n");
5179 writeModuleIndex(ol);
5180 break;
5181 case LayoutNavEntry::ModuleMembers:
5182 msg("Generating module member index...\n");
5184 break;
5185 case LayoutNavEntry::Namespaces:
5186 {
5187 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5188 if (showNamespaces)
5189 {
5190 if (index.numDocumentedNamespaces()>0 && addToIndex)
5191 {
5192 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5193 Doxygen::indexList->incContentsDepth();
5194 needsClosing=TRUE;
5195 }
5196 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5197 {
5198 msg("Generating namespace index...\n");
5200 }
5201 }
5202 }
5203 break;
5204 case LayoutNavEntry::NamespaceList:
5205 {
5206 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5207 if (showNamespaces)
5208 {
5209 msg("Generating namespace index...\n");
5211 }
5212 }
5213 break;
5214 case LayoutNavEntry::NamespaceMembers:
5215 msg("Generating namespace member index...\n");
5217 break;
5218 case LayoutNavEntry::Classes:
5219 if (index.numAnnotatedClasses()>0 && addToIndex)
5220 {
5221 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5222 Doxygen::indexList->incContentsDepth();
5223 needsClosing=TRUE;
5224 }
5225 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5226 {
5227 msg("Generating annotated compound index...\n");
5229 }
5230 break;
5231 case LayoutNavEntry::Concepts:
5232 msg("Generating concept index...\n");
5234 break;
5235 case LayoutNavEntry::ClassList:
5236 msg("Generating annotated compound index...\n");
5238 break;
5239 case LayoutNavEntry::ClassIndex:
5240 msg("Generating alphabetical compound index...\n");
5242 break;
5243 case LayoutNavEntry::ClassHierarchy:
5244 msg("Generating hierarchical class index...\n");
5246 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5247 {
5248 msg("Generating graphical class hierarchy...\n");
5250 }
5251 break;
5252 case LayoutNavEntry::ClassMembers:
5253 if (!sliceOpt)
5254 {
5255 msg("Generating member index...\n");
5257 }
5258 break;
5259 case LayoutNavEntry::Interfaces:
5260 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5261 {
5262 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5263 Doxygen::indexList->incContentsDepth();
5264 needsClosing=TRUE;
5265 }
5266 break;
5267 case LayoutNavEntry::InterfaceList:
5268 if (sliceOpt)
5269 {
5270 msg("Generating annotated interface index...\n");
5272 }
5273 break;
5274 case LayoutNavEntry::InterfaceIndex:
5275 if (sliceOpt)
5276 {
5277 msg("Generating alphabetical interface index...\n");
5279 }
5280 break;
5281 case LayoutNavEntry::InterfaceHierarchy:
5282 if (sliceOpt)
5283 {
5284 msg("Generating hierarchical interface index...\n");
5286 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5287 {
5288 msg("Generating graphical interface hierarchy...\n");
5290 }
5291 }
5292 break;
5293 case LayoutNavEntry::Structs:
5294 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5295 {
5296 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5297 Doxygen::indexList->incContentsDepth();
5298 needsClosing=TRUE;
5299 }
5300 break;
5301 case LayoutNavEntry::StructList:
5302 if (sliceOpt)
5303 {
5304 msg("Generating annotated struct index...\n");
5306 }
5307 break;
5308 case LayoutNavEntry::StructIndex:
5309 if (sliceOpt)
5310 {
5311 msg("Generating alphabetical struct index...\n");
5313 }
5314 break;
5315 case LayoutNavEntry::Exceptions:
5316 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5317 {
5318 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5319 Doxygen::indexList->incContentsDepth();
5320 needsClosing=TRUE;
5321 }
5322 break;
5323 case LayoutNavEntry::ExceptionList:
5324 if (sliceOpt)
5325 {
5326 msg("Generating annotated exception index...\n");
5328 }
5329 break;
5330 case LayoutNavEntry::ExceptionIndex:
5331 if (sliceOpt)
5332 {
5333 msg("Generating alphabetical exception index...\n");
5335 }
5336 break;
5337 case LayoutNavEntry::ExceptionHierarchy:
5338 if (sliceOpt)
5339 {
5340 msg("Generating hierarchical exception index...\n");
5342 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5343 {
5344 msg("Generating graphical exception hierarchy...\n");
5346 }
5347 }
5348 break;
5349 case LayoutNavEntry::Files:
5350 {
5351 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5352 {
5353 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5354 Doxygen::indexList->incContentsDepth();
5355 needsClosing=TRUE;
5356 }
5357 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5358 {
5359 msg("Generating file index...\n");
5360 writeFileIndex(ol);
5361 }
5362 }
5363 break;
5364 case LayoutNavEntry::FileList:
5365 msg("Generating file index...\n");
5366 writeFileIndex(ol);
5367 break;
5368 case LayoutNavEntry::FileGlobals:
5369 msg("Generating file member index...\n");
5371 break;
5372 case LayoutNavEntry::Examples:
5373 msg("Generating example index...\n");
5375 break;
5376 case LayoutNavEntry::User:
5377 if (addToIndex)
5378 {
5379 // prepend a ! or ^ marker to the URL to avoid tampering with it
5380 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5381 bool isRelative=url.at(0)=='!';
5382 if (!url.isEmpty() && !isRelative) // absolute URL
5383 {
5384 url.prepend("^"); // prepend ^ to absolute URL
5385 }
5386 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5387 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5388 }
5389 break;
5390 case LayoutNavEntry::UserGroup:
5391 if (addToIndex)
5392 {
5393 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5394 if (!url.isEmpty())
5395 {
5396 if (url=="!") // result of a "[none]" url
5397 {
5398 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5399 }
5400 else
5401 {
5402 bool isRelative=url.at(0)=='!';
5403 if (!isRelative) // absolute URL
5404 {
5405 url.prepend("^"); // prepend ^ to absolute URL
5406 }
5407 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5408 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5409 }
5410 }
5411 else
5412 {
5413 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5414 }
5415 Doxygen::indexList->incContentsDepth();
5416 needsClosing=TRUE;
5417 }
5418 writeUserGroupStubPage(ol,lne.get());
5419 break;
5420 case LayoutNavEntry::None:
5421 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5422 break;
5423 }
5424 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5425 {
5426 indexWritten.at(idx)=TRUE;
5427 }
5428 }
5429 writeIndexHierarchyEntries(ol,lne->children());
5430 if (needsClosing)
5431 {
5432 switch(kind)
5433 {
5434 case LayoutNavEntry::Modules:
5435 case LayoutNavEntry::Namespaces:
5436 case LayoutNavEntry::Classes:
5437 case LayoutNavEntry::Files:
5438 case LayoutNavEntry::UserGroup:
5439 Doxygen::indexList->decContentsDepth();
5440 break;
5441 default:
5442 break;
5443 }
5444 }
5445 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5446 }
5447}
5448
5450{
5451 const auto &index = Index::instance();
5452 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5453 bool showFiles = Config_getBool(SHOW_FILES);
5454 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5455 switch (kind)
5456 {
5457 case LayoutNavEntry::MainPage: return TRUE;
5458 case LayoutNavEntry::User: return TRUE;
5459 case LayoutNavEntry::UserGroup: return TRUE;
5460 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5461 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5462 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5463 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5464 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5465 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5466 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5467 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5468 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5469 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5470 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5471 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5472 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5473 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5474 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5475 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5476 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5477 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5478 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5479 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5480 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5481 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5482 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5483 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5484 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5485 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5486 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5487 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5488 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5489 case LayoutNavEntry::None: // should never happen, means not properly initialized
5490 assert(kind != LayoutNavEntry::None);
5491 return FALSE;
5492 }
5493 return FALSE;
5494}
5495
5496template<class T>
5497void renderMemberIndicesAsJs(std::ostream &t,
5498 std::function<std::size_t(std::size_t)> numDocumented,
5499 std::function<Index::MemberIndexMap(std::size_t)> getMemberList,
5500 const T *(*getInfo)(size_t hl),
5501 std::size_t total)
5502{
5503 // index items per category member lists
5504 bool firstMember=TRUE;
5505 for (std::size_t i=0;i<total;i++)
5506 {
5507 if (numDocumented(i)>0)
5508 {
5509 t << ",";
5510 if (firstMember)
5511 {
5512 t << "children:[";
5513 firstMember=FALSE;
5514 }
5515 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5516 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5517
5518 // Check if we have many members, then add sub entries per letter...
5519 // quick alphabetical index
5520 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5521 if (quickIndex)
5522 {
5523 bool multiPageIndex=FALSE;
5524 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5525 {
5526 multiPageIndex=TRUE;
5527 }
5528 t << ",children:[\n";
5529 bool firstLetter=TRUE;
5530 for (const auto &[letter,list] : getMemberList(i))
5531 {
5532 if (!firstLetter) t << ",\n";
5533 QCString ci(letter);
5534 QCString is(letterToLabel(ci));
5535 QCString anchor;
5537 QCString fullName = getInfo(i)->fname;
5538 if (!multiPageIndex || firstLetter)
5539 anchor=fullName+extension+"#index_";
5540 else // other pages of multi page index
5541 anchor=fullName+"_"+is+extension+"#index_";
5542 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5543 << convertToJSString(anchor+convertToId(is)) << "\"}";
5544 firstLetter=FALSE;
5545 }
5546 t << "]";
5547 }
5548 t << "}";
5549 }
5550 }
5551 if (!firstMember)
5552 {
5553 t << "]";
5554 }
5555}
5556
5557static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5558{
5559 int count=0;
5560 for (const auto &entry : root->children())
5561 {
5562 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5563 }
5564 if (count>0) // at least one item is visible
5565 {
5566 bool firstChild = TRUE;
5567 if (!first) t << ",";
5568 t << "children:[\n";
5569 for (const auto &entry : root->children())
5570 {
5571 if (entry->visible() && quickLinkVisible(entry->kind()))
5572 {
5573 if (!firstChild) t << ",\n";
5574 firstChild=FALSE;
5575 QCString url = entry->url();
5576 if (isURL(url)) url = "^" + url;
5577 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5578 << convertToJSString(url) << "\"";
5579 bool hasChildren=FALSE;
5580 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5581 {
5582 auto numDoc = [](std::size_t i) {
5584 };
5585 auto memList = [](std::size_t i) {
5587 };
5588 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5589 }
5590 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5591 {
5592 auto numDoc = [](std::size_t i) {
5594 };
5595 auto memList = [](std::size_t i) {
5597 };
5598 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5599 }
5600 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5601 {
5602 auto numDoc = [](std::size_t i) {
5604 };
5605 auto memList = [](std::size_t i) {
5607 };
5608 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5609 }
5610 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5611 {
5612 auto numDoc = [](std::size_t i) {
5614 };
5615 auto memList = [](std::size_t i) {
5617 };
5618 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5619 }
5620 else // recursive into child list
5621 {
5622 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5623 }
5624 if (hasChildren) t << "]";
5625 t << "}";
5626 }
5627 }
5628 }
5629 return count>0;
5630}
5631
5632static void writeMenuData()
5633{
5634 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5635 QCString outputDir = Config_getBool(HTML_OUTPUT);
5637 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5638 if (t.is_open())
5639 {
5641 t << "var menudata={";
5642 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5643 if (hasChildren) t << "]";
5644 t << "}\n";
5645 }
5646}
5647
5649{
5650 writeMenuData();
5652 if (lne)
5653 {
5655 }
5656}
std::string m_letter
Definition index.cpp:2241
int row() const
Definition index.cpp:2237
const ClassDef * classDef() const
Definition index.cpp:2235
std::string letter() const
Definition index.cpp:2236
int column() const
Definition index.cpp:2238
AlphaIndexTableCell(int row, int col, const std::string &letter, const ClassDef *cd)
Definition index.cpp:2230
const ClassDef * m_class
Definition index.cpp:2242
A abstract class representing of a compound symbol.
Definition classdef.h:104
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual bool isSimple() const =0
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
virtual bool isImplicitTemplateInstance() const =0
CompoundType
The various compound types.
Definition classdef.h:109
@ Interface
Definition classdef.h:112
@ Exception
Definition classdef.h:115
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
static const QCString crawlFileName
Definition sitemap.h:75
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual bool isVisible() const =0
virtual const QCString & localName() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual bool hasSections() const =0
virtual QCString navigationPathAsString() const =0
virtual QCString getDefFileName() const =0
virtual bool isLinkable() const =0
virtual int getDefLine() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual int briefLine() const =0
virtual bool hasDocumentation() const =0
virtual bool isLinkableInProject() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual bool isAnonymous() const =0
virtual QCString getReference() const =0
virtual QCString getSourceFileBase() const =0
virtual const GroupList & partOfGroups() const =0
virtual QCString qualifiedName() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
virtual QCString briefFile() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual bool isReference() const =0
virtual const QCString & name() const =0
virtual void writeSummaryLinks(OutputList &) const =0
A model of a directory symbol.
Definition dirdef.h:110
virtual const QCString shortName() const =0
virtual const DirList & subDirs() const =0
virtual const FileList & getFiles() const =0
Represents a graphical class hierarchy.
Representation of a legend explaining the meaning of boxes, arrows, and colors.
void writeGraph(const QCString &path)
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:101
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:105
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96
static PageLinkedMap * exampleLinkedMap
Definition doxygen.h:99
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
static IndexList * indexList
Definition doxygen.h:134
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:97
static QCString htmlFileExtension
Definition doxygen.h:122
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:100
static DirLinkedMap * dirLinkedMap
Definition doxygen.h:129
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114
A class that generates a dynamic tree view side panel.
Definition ftvhelp.h:41
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def)
Definition ftvhelp.cpp:184
void decContentsDepth()
Definition ftvhelp.cpp:153
void incContentsDepth()
Definition ftvhelp.cpp:142
void generateTreeViewInline(TextStream &t)
Definition ftvhelp.cpp:875
A model of a file symbol.
Definition filedef.h:99
virtual QCString includeName() const =0
virtual QCString getPath() const =0
virtual bool generateSourceFile() const =0
virtual bool isDocumentationFile() const =0
A model of a group of symbols.
Definition groupdef.h:52
virtual const DirList & getDirs() const =0
virtual const GroupList & getSubGroups() const =0
virtual QCString groupTitle() const =0
virtual const FileList & getFiles() const =0
virtual const MemberLists & getMemberLists() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const PageLinkedRefMap & getPages() const =0
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
virtual bool isASubGroup() const =0
virtual bool isVisibleInHierarchy() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
virtual MemberList * getMemberList(MemberListType lt) const =0
void incrementDocumentedNamespaceMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:205
int numAnnotatedInterfacesPrinted() const
Definition index.cpp:116
void addClassMemberNameToIndex(const MemberDef *md)
Definition index.cpp:2840
std::vector< const MemberDef * > MemberIndexList
Definition index.h:167
void resetDocumentedNamespaceMembers(int i)
Definition index.cpp:168
int numDocumentedFiles() const
Definition index.cpp:128
int numDocumentedNamespaces() const
Definition index.cpp:124
int numIndexedPages() const
Definition index.cpp:127
int numAnnotatedClassesPrinted() const
Definition index.cpp:113
int numDocumentedGroups() const
Definition index.cpp:123
void resetDocumentedModuleMembers(int i)
Definition index.cpp:174
int numDocumentedModules() const
Definition index.cpp:126
void incrementDocumentedFileMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:199
int numAnnotatedStructs() const
Definition index.cpp:118
int numDocumentedConcepts() const
Definition index.cpp:125
void addNamespaceMemberNameToIndex(const MemberDef *md)
Definition index.cpp:2904
void resetDocumentedClassMembers(int i)
Definition index.cpp:156
int numAnnotatedStructsPrinted() const
Definition index.cpp:119
void incrementDocumentedClassMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:193
MemberIndexMap isClassIndexLetterUsed(ClassMemberHighlight::Enum e) const
Definition index.cpp:136
void addFileMemberNameToIndex(const MemberDef *md)
Definition index.cpp:2952
void incrementDocumentedModuleMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:211
int numHierarchyInterfaces() const
Definition index.cpp:117
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:131
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:134
void addModuleMemberNameToIndex(const MemberDef *md)
Definition index.cpp:3004
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:133
int numDocumentedPages() const
Definition index.cpp:129
int numHierarchyExceptions() const
Definition index.cpp:122
int numAnnotatedExceptionsPrinted() const
Definition index.cpp:121
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:132
int numAnnotatedExceptions() const
Definition index.cpp:120
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:141
void sortMemberIndexLists()
Definition index.cpp:218
std::map< std::string, MemberIndexList > MemberIndexMap
Definition index.h:168
static Index & instance()
Definition index.cpp:106
void countDataStructures()
Definition index.cpp:262
int numHierarchyClasses() const
Definition index.cpp:114
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:151
void resetDocumentedFileMembers(int i)
Definition index.cpp:162
int numDocumentedDirs() const
Definition index.cpp:130
int numAnnotatedInterfaces() const
Definition index.cpp:115
Index()
Definition index.cpp:100
std::unique_ptr< Private > p
Definition index.h:221
int numAnnotatedClasses() const
Definition index.cpp:112
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:146
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1435
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition layout.cpp:1446
std::unique_ptr< ClassDef > Ptr
Definition linkedmap.h:38
const T * find(const std::string &key) const
Definition linkedmap.h:47
size_t size() const
Definition linkedmap.h:375
bool empty() const
Definition linkedmap.h:374
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
virtual QCString typeString() const =0
virtual bool isSignal() const =0
virtual bool isFriend() const =0
virtual bool isForeign() const =0
virtual bool isRelated() const =0
virtual bool isSequence() const =0
virtual const ClassDef * getClassDef() const =0
virtual GroupDef * getGroupDef()=0
virtual bool isTypedef() const =0
virtual bool isSlot() const =0
virtual const MemberVector & enumFieldList() const =0
virtual const FileDef * getFileDef() const =0
virtual bool isEvent() const =0
virtual bool isFunction() const =0
virtual bool isDictionary() const =0
virtual const ModuleDef * getModuleDef() const =0
virtual bool isDefine() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool isEnumerate() const =0
virtual bool isVariable() const =0
virtual bool isStrong() const =0
virtual const MemberDef * getEnumScope() const =0
virtual bool isEnumValue() const =0
virtual bool isProperty() const =0
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:109
A vector of MemberDef object.
Definition memberlist.h:35
bool empty() const noexcept
Definition memberlist.h:60
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual int countVisibleMembers() const =0
virtual bool isPrimaryInterface() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
int numDocumentedModules() const
static ModuleManager & instance()
An abstract interface of a namespace symbol.
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual ConceptLinkedRefMap getConcepts() const =0
virtual ClassLinkedRefMap getStructs() const =0
virtual ClassLinkedRefMap getExceptions() const =0
virtual NamespaceLinkedRefMap getNamespaces() const =0
virtual int countVisibleMembers() const =0
virtual ClassLinkedRefMap getClasses() const =0
virtual ClassLinkedRefMap getInterfaces() const =0
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:314
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:671
void writeString(const QCString &text)
Definition outputlist.h:412
void writeSearchInfo()
Definition outputlist.h:398
void startIndexItem(const QCString &ref, const QCString &file)
Definition outputlist.h:434
void endTitleHead(const QCString &fileName, const QCString &name)
Definition outputlist.h:406
void endSection(const QCString &lab, SectionType t)
Definition outputlist.h:589
void endIndexValue(const QCString &name, bool b)
Definition outputlist.h:428
void startItemList()
Definition outputlist.h:430
void disable(OutputType o)
void startIndexKey()
Definition outputlist.h:422
void startTitleHead(const QCString &fileName)
Definition outputlist.h:404
void writeSplitBar(const QCString &name)
Definition outputlist.h:607
void enable(OutputType o)
void endContents()
Definition outputlist.h:619
void endHeaderSection()
Definition outputlist.h:468
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:440
void endIndexItem(const QCString &ref, const QCString &file)
Definition outputlist.h:436
void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
Definition outputlist.h:667
void startFile(const QCString &name, const QCString &manName, const QCString &title, int hierarchyLevel=0)
void startHeaderSection()
Definition outputlist.h:466
void endIndexList()
Definition outputlist.h:420
void docify(const QCString &s)
Definition outputlist.h:438
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:408
void endPageDoc()
Definition outputlist.h:623
void endIndexSection(IndexSection is)
Definition outputlist.h:388
void endFile()
Definition outputlist.h:402
void startProjectNumber()
Definition outputlist.h:392
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:669
void endParagraph()
Definition outputlist.h:410
void endIndexKey()
Definition outputlist.h:424
void startQuickIndices()
Definition outputlist.h:603
void endTextLink()
Definition outputlist.h:445
void startItemListItem()
Definition outputlist.h:458
void endItemListItem()
Definition outputlist.h:460
void startTypewriter()
Definition outputlist.h:450
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void lastIndexPage()
Definition outputlist.h:673
void startIndexValue(bool b)
Definition outputlist.h:426
void endIndexListItem()
Definition outputlist.h:416
void endQuickIndices()
Definition outputlist.h:605
void startPageDoc(const QCString &pageTitle)
Definition outputlist.h:621
void endItemList()
Definition outputlist.h:432
void startContents()
Definition outputlist.h:617
void writeFooter(const QCString &navPath)
Definition outputlist.h:400
void startIndexList()
Definition outputlist.h:418
void enableAll()
void endProjectNumber()
Definition outputlist.h:394
void writeQuickLinks(HighlightedItem hli, const QCString &file)
Definition outputlist.h:613
void endTypewriter()
Definition outputlist.h:452
void startIndexListItem()
Definition outputlist.h:414
void parseText(const QCString &textStr)
void startSection(const QCString &lab, const QCString &title, SectionType t)
Definition outputlist.h:587
void startIndexSection(IndexSection is)
Definition outputlist.h:386
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443
A model of a page symbol.
Definition pagedef.h:26
virtual void addSectionsToIndex()=0
virtual bool visibleInIndex() const =0
virtual const PageLinkedRefMap & getSubPages() const =0
virtual bool hasSubPages() const =0
virtual QCString title() const =0
This is an alternative implementation of QCString.
Definition qcstring.h:101
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
QCString & prepend(const char *s)
Definition qcstring.h:407
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
bool startsWith(const char *s) const
Definition qcstring.h:492
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:578
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
const std::string & str() const
Definition qcstring.h:537
QCString & replace(size_t index, size_t len, const char *s)
Definition qcstring.cpp:212
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:159
QCString left(size_t len) const
Definition qcstring.h:214
class that provide information about a section.
Definition section.h:57
QCString label() const
Definition section.h:68
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:175
static constexpr int Subsection
Definition section.h:34
Text streaming class that buffers data.
Definition textstream.h:36
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:229
static QCString getProtectionName(int prot)
static VhdlClasses convert(Protection prot)
Definition vhdldocgen.h:80
bool classHasVisibleRoot(const BaseClassList &bcl)
bool classVisibleInIndex(const ClassDef *cd)
bool classHasVisibleChildren(const ClassDef *cd)
std::vector< BaseClassDef > BaseClassList
Definition classdef.h:81
std::unordered_set< const ClassDef * > ClassDefSet
Definition classdef.h:95
#define Config_updateBool(name, value)
Definition config.h:40
#define Config_getBool(name)
Definition config.h:33
#define Config_getString(name)
Definition config.h:32
static constexpr auto hex
static void addMembersToIndex()
Definition doxygen.cpp:8091
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition filedef.cpp:267
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
Definition filedef.cpp:1887
constexpr auto JAVASCRIPT_LICENSE_TEXT
Definition ftvhelp.h:72
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition htmlgen.cpp:2708
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4536
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1901
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:384
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5129
static void writeClassTreeToOutput(OutputList &ol, const BaseClassList &bcl, int level, FTVHelp *ftv, bool addToIndex, ClassDefSet &visitedClasses)
Definition index.cpp:615
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition index.cpp:426
#define MAX_ITEMS_BEFORE_QUICK_INDEX
Definition index.cpp:56
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
Definition index.cpp:3283
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX
Definition index.cpp:55
static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1874
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5557
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1200
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2650
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2493
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3223
void writeGraphInfo(OutputList &ol)
Definition index.cpp:4000
static std::vector< bool > indexWritten
Definition index.cpp:5127
static int countConcepts()
Definition index.cpp:1677
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:393
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2622
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
Definition index.cpp:3102
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
Definition index.cpp:2122
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1538
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1305
static void endQuickIndexList(OutputList &ol)
Definition index.cpp:358
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2406
static int countClassHierarchy(ClassDef::CompoundType ct)
Definition index.cpp:1109
static void startQuickIndexItem(OutputList &ol, const QCString &l, bool hl, bool, bool &first)
Definition index.cpp:364
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2636
static void writePageIndex(OutputList &ol)
Definition index.cpp:3926
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:1991
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1973
void renderMemberIndicesAsJs(std::ostream &t, std::function< std::size_t(std::size_t)> numDocumented, std::function< Index::MemberIndexMap(std::size_t)> getMemberList, const T *(*getInfo)(size_t hl), std::size_t total)
Definition index.cpp:5497
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2664
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1226
static void writeNamespaceMembers(const NamespaceDef *nd, bool addToIndex)
Definition index.cpp:1757
static void countRelatedPages(int &docPages, int &indexPages)
Definition index.cpp:3837
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4725
static int countGroups()
Definition index.cpp:3968
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3458
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1814
static bool mainPageHasOwnTitle()
Definition index.cpp:3855
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4305
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1694
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3747
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4597
static int countDirs()
Definition index.cpp:3984
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3260
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1410
bool isId1(int c)
Definition index.cpp:2196
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
Definition index.cpp:400
static void writeFileLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevFileName)
Definition index.cpp:2690
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3611
static void writePages(PageDef *pd, FTVHelp *ftv)
Definition index.cpp:3866
static void countFiles(int &htmlFiles, int &files)
Definition index.cpp:1436
static void writeClassHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1058
static void writeSingleFileIndex(OutputList &ol, const FileDef *fd)
Definition index.cpp:1458
static void writeNamespaceLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
Definition index.cpp:2703
static void writeExampleIndex(OutputList &ol)
Definition index.cpp:3772
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1085
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2435
static void endQuickIndexItem(OutputList &ol)
Definition index.cpp:377
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2547
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3434
const ClassDef * get_pointer(const Ptr &p)
static int countAnnotatedClasses(int *cp, ClassDef::CompoundType ct)
Definition index.cpp:2097
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2464
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4281
static void writeModuleMembers(const ModuleDef *mod, bool addToIndex)
Definition index.cpp:1783
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4546
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3080
static void writeDirHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:895
std::set< std::string > UsedIndexLetters
Definition index.cpp:2247
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4513
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
Definition index.cpp:2677
void writeIndexHierarchy(OutputList &ol)
Definition index.cpp:5648
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4421
static bool dirHasVisibleChildren(const DirDef *dd)
Definition index.cpp:723
static int countNamespaces()
Definition index.cpp:1666
static void endIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:323
const int maxItemsBeforeQuickIndex
Definition index.cpp:341
static QCString letterToLabel(const QCString &startLetter)
Definition index.cpp:2201
static void writeQuickMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, const std::string &page, QCString fullName, bool multiPage)
Definition index.cpp:3044
static void writeConceptIndex(OutputList &ol)
Definition index.cpp:4619
static void writeModuleLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevModuleName)
Definition index.cpp:2716
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4445
static void MemberIndexMap_add(Index::MemberIndexMap &map, const std::string &letter, const MemberDef *md)
Definition index.cpp:180
static void writeIndex(OutputList &ol)
Definition index.cpp:4762
static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:751
static void startIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:307
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition index.cpp:5449
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4374
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1331
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3575
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1119
static void writeMenuData()
Definition index.cpp:5632
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4051
static void writeMemberToIndex(const Definition *def, const MemberDef *md, bool addToIndex)
Definition index.cpp:463
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2731
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3399
static void writeClassTreeForList(OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
Definition index.cpp:959
void endFileWithNavPath(OutputList &ol, const Definition *d)
Definition index.cpp:446
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3627
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2250
static void startQuickIndexList(OutputList &ol, bool letterTabs=FALSE)
Definition index.cpp:345
HighlightedItem
Definition index.h:59
@ AnnotatedExceptions
Definition index.h:76
@ InterfaceHierarchy
Definition index.h:66
@ AnnotatedInterfaces
Definition index.h:74
@ NamespaceMembers
Definition index.h:78
@ AnnotatedClasses
Definition index.h:73
@ AnnotatedStructs
Definition index.h:75
@ ExceptionHierarchy
Definition index.h:67
@ isMainPage
Definition index.h:35
@ isTitlePageAuthor
Definition index.h:34
@ isFileIndex
Definition index.h:43
@ isFileDocumentation
Definition index.h:51
@ isPageDocumentation
Definition index.h:53
@ isModuleDocumentation
Definition index.h:45
@ isClassHierarchyIndex
Definition index.h:41
@ isModuleIndex
Definition index.h:36
@ isTopicIndex
Definition index.h:37
@ isConceptIndex
Definition index.h:40
@ isExampleDocumentation
Definition index.h:52
@ isClassDocumentation
Definition index.h:49
@ isCompoundIndex
Definition index.h:42
@ isEndIndex
Definition index.h:55
@ isConceptDocumentation
Definition index.h:50
@ isNamespaceIndex
Definition index.h:39
@ isNamespaceDocumentation
Definition index.h:48
@ isTitlePageStart
Definition index.h:33
@ isTopicDocumentation
Definition index.h:46
Translator * theTranslator
Definition language.cpp:71
std::vector< std::unique_ptr< LayoutNavEntry > > LayoutNavEntryList
Definition layout.h:152
#define warn(file, line, fmt,...)
Definition message.h:97
#define msg(fmt,...)
Definition message.h:94
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665
bool namespaceHasNestedNamespace(const NamespaceDef *nd)
bool namespaceHasNestedClass(const NamespaceDef *nd, bool filterClasses, ClassDef::CompoundType ct)
NamespaceDef * getResolvedNamespace(const QCString &name)
bool namespaceHasNestedConcept(const NamespaceDef *nd)
Portable versions of functions that are platform dependent.
int qstricmp(const char *s1, const char *s2)
Definition qcstring.cpp:442
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:477
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Definition qcstring.h:58
#define ASSERT(x)
Definition qcstring.h:39
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2539
AnnotatedIndexContext(int numAnno, int numPrint, LayoutNavEntry::Kind lk, LayoutNavEntry::Kind fk, const QCString &title, const QCString &intro, ClassDef::CompoundType ct, const QCString &fn, HighlightedItem hi)
Definition index.cpp:2524
const ClassDef::CompoundType compoundType
Definition index.cpp:2542
const HighlightedItem hiItem
Definition index.cpp:2544
const QCString fileBaseName
Definition index.cpp:2543
const LayoutNavEntry::Kind listKind
Definition index.cpp:2538
const QCString listDefaultTitleText
Definition index.cpp:2540
const int numAnnotated
Definition index.cpp:2536
const QCString listDefaultIntroText
Definition index.cpp:2541
Helper class representing a class member in the navigation menu.
Definition index.cpp:3074
CmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3075
QCString title
Definition index.cpp:3077
const char * fname
Definition index.cpp:3076
Helper class representing a file member in the navigation menu.
Definition index.cpp:3254
FmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3255
const char * fname
Definition index.cpp:3256
QCString title
Definition index.cpp:3257
std::array< MemberIndexMap, ModuleMemberHighlight::Total > moduleIndexLetterUsed
Definition index.cpp:97
int annotatedExceptions
Definition index.cpp:79
std::array< MemberIndexMap, ClassMemberHighlight::Total > classIndexLetterUsed
Definition index.cpp:94
int documentedModules
Definition index.cpp:85
int annotatedExceptionsPrinted
Definition index.cpp:80
int documentedPages
Definition index.cpp:88
int documentedConcepts
Definition index.cpp:84
int annotatedStructs
Definition index.cpp:77
int annotatedInterfaces
Definition index.cpp:74
int hierarchyInterfaces
Definition index.cpp:76
int annotatedStructsPrinted
Definition index.cpp:78
std::array< int, FileMemberHighlight::Total > documentedFileMembers
Definition index.cpp:91
int documentedDirs
Definition index.cpp:89
std::array< MemberIndexMap, FileMemberHighlight::Total > fileIndexLetterUsed
Definition index.cpp:95
int indexedPages
Definition index.cpp:86
std::array< int, ModuleMemberHighlight::Total > documentedModuleMembers
Definition index.cpp:93
int annotatedClasses
Definition index.cpp:71
int annotatedInterfacesPrinted
Definition index.cpp:75
int hierarchyExceptions
Definition index.cpp:81
int documentedFiles
Definition index.cpp:87
int documentedNamespaces
Definition index.cpp:83
std::array< int, NamespaceMemberHighlight::Total > documentedNamespaceMembers
Definition index.cpp:92
int documentedGroups
Definition index.cpp:82
std::array< int, ClassMemberHighlight::Total > documentedClassMembers
Definition index.cpp:90
std::array< MemberIndexMap, NamespaceMemberHighlight::Total > namespaceIndexLetterUsed
Definition index.cpp:96
int annotatedClassesPrinted
Definition index.cpp:72
int hierarchyClasses
Definition index.cpp:73
Represents of a member declaration list with configurable title and subtitle.
Definition layout.h:112
MemberListType type
Definition layout.h:118
Represents of a member definition list with configurable title.
Definition layout.h:132
MemberListType type
Definition layout.h:137
Base class for the layout of a navigation item at the top of the HTML pages.
Definition layout.h:156
QCString title() const
Definition layout.h:216
const LayoutNavEntryList & children() const
Definition layout.h:219
QCString intro() const
Definition layout.h:217
QCString baseFile() const
Definition layout.h:214
LayoutNavEntry * find(LayoutNavEntry::Kind k, const QCString &file=QCString()) const
Definition layout.cpp:133
bool visible() const
Definition layout.h:222
Kind
Definition layout.h:193
Helper class representing a module member in the navigation menu.
Definition index.cpp:3605
MmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3606
QCString title
Definition index.cpp:3608
const char * fname
Definition index.cpp:3607
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3428
const char * fname
Definition index.cpp:3430
QCString title
Definition index.cpp:3431
NmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3429
SrcLangExt
Language as given by extension.
Definition types.h:42
std::string convertUTF8ToUpper(const std::string &input)
Converts the input string into a upper case version, also taking into account non-ASCII characters th...
Definition utf8.cpp:192
std::string convertUTF8ToLower(const std::string &input)
Converts the input string into a lower case version, also taking into account non-ASCII characters th...
Definition utf8.cpp:187
std::string getUTF8CharAt(const std::string &input, size_t pos)
Returns the UTF8 character found at byte position pos in the input string.
Definition utf8.cpp:127
Various UTF8 related helper functions.
bool mainPageHasTitle()
Definition util.cpp:6771
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:6414
QCString filterTitle(const QCString &title)
Definition util.cpp:6077
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:6576
bool isURL(const QCString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:6402
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:309
QCString convertToJSString(const QCString &s)
Definition util.cpp:4523
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
Definition util.cpp:4197
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6386
QCString getDotImageExtension()
Definition util.cpp:6776
int getPrefixIndex(const QCString &name)
Definition util.cpp:3736
QCString convertToId(const QCString &s)
Definition util.cpp:4372
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5399
A bunch of utility functions.
QCString fixSpaces(const QCString &s)
Definition util.h:471