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;
622 if (cd->getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
623 {
624 continue;
625 }
626
627 bool b = cd->getLanguage()==SrcLangExt::VHDL ? classHasVisibleRoot(cd->subClasses()) : classHasVisibleRoot(cd->baseClasses());
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 dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3111 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3112
3113 bool multiPageIndex=FALSE;
3114 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3115 {
3116 multiPageIndex=TRUE;
3117 }
3118
3119 ol.pushGeneratorState();
3121
3123 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3124 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3125 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3126 bool addToIndex = lne==nullptr || lne->visible();
3127
3128 if (addToIndex)
3129 {
3130 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3131 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3132 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3133 }
3134
3135 bool first=TRUE;
3136 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3137 {
3138 QCString fileName = getCmhlInfo(hl)->fname;
3139 if (multiPageIndex)
3140 {
3141 QCString cs(letter);
3142 if (!first)
3143 {
3144 fileName+="_"+letterToLabel(cs);
3145 }
3146 if (addToIndex)
3147 {
3148 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3149 }
3150 }
3151
3152 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3153
3154 auto writeQuickLinks = [&,cap_letter=letter]()
3155 {
3157 if (!dynamicMenus)
3158 {
3160
3161 // index item for global member list
3164 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3166
3167 // index items per category member lists
3168 for (int i=1;i<ClassMemberHighlight::Total;i++)
3169 {
3170 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3171 {
3173 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3174 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3175 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3177 }
3178 }
3179
3181
3182 // quick alphabetical index
3183 if (quickIndex)
3184 {
3185 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3186 getCmhlInfo(hl)->fname,multiPageIndex);
3187 }
3188
3189 ol.writeString("</div><!-- main-nav -->\n");
3190 }
3191 };
3192
3193 ol.startFile(fileName+extension,QCString(),title);
3194 ol.startQuickIndices();
3195 if (!disableIndex && !quickLinksAfterSplitbar)
3196 {
3197 writeQuickLinks();
3198 }
3199 ol.endQuickIndices();
3200 ol.writeSplitBar(fileName);
3201 if (quickLinksAfterSplitbar)
3202 {
3203 writeQuickLinks();
3204 if (!dynamicMenus)
3205 {
3206 ol.writeString("<div id=\"doc-content\">\n");
3207 }
3208 }
3209 ol.writeSearchInfo();
3210
3211 ol.startContents();
3212
3213 ol.startTextBlock();
3214 ol.parseText(hl == ClassMemberHighlight::All && lne ? lne->intro() : theTranslator->trCompoundMembersDescriptionTotal(hl));
3215 ol.endTextBlock();
3216
3217 writeMemberList(ol,quickIndex,
3218 multiPageIndex ? letter : std::string(),
3219 index.isClassIndexLetterUsed(hl),
3221 endFile(ol);
3222 first=FALSE;
3223 }
3224
3225 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3226
3227 ol.popGeneratorState();
3228}
3229
3231{
3232 const auto &index = Index::instance();
3233 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3234 bool addToIndex = lne==nullptr || lne->visible();
3235
3236 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3237 {
3238 Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
3239 Doxygen::indexList->incContentsDepth();
3240 }
3250 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3251 {
3252 Doxygen::indexList->decContentsDepth();
3253 }
3254
3255}
3256
3257//----------------------------------------------------------------------------
3258
3259/** Helper class representing a file member in the navigation menu. */
3261{
3262 FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3263 const char *fname;
3265};
3266
3267static const FmhlInfo *getFmhlInfo(size_t hl)
3268{
3269 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3270 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3271 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3272 static FmhlInfo fmhlInfo[] =
3273 {
3274 FmhlInfo("globals", theTranslator->trAll()),
3275 FmhlInfo("globals_func",
3276 fortranOpt ? theTranslator->trSubprograms() :
3277 vhdlOpt ? theTranslator->trFunctionAndProc() :
3278 theTranslator->trFunctions()),
3279 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3280 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3281 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3282 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3283 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3284 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3285 FmhlInfo("globals_defs",theTranslator->trDefines())
3286 };
3287 return &fmhlInfo[hl];
3288}
3289
3291{
3292 const auto &index = Index::instance();
3293 if (index.numDocumentedFileMembers(hl)==0) return;
3294
3295 bool disableIndex = Config_getBool(DISABLE_INDEX);
3296 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3297 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3298 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3299 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3300
3301 bool multiPageIndex=FALSE;
3302 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3303 {
3304 multiPageIndex=TRUE;
3305 }
3306
3307 ol.pushGeneratorState();
3309
3311 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3312 QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3313 bool addToIndex = lne==nullptr || lne->visible();
3314
3315 if (addToIndex)
3316 {
3317 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3318 getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3319 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3320 }
3321
3322 bool first=TRUE;
3323 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3324 {
3325 QCString fileName = getFmhlInfo(hl)->fname;
3326 if (multiPageIndex)
3327 {
3328 QCString cs(letter);
3329 if (!first)
3330 {
3331 fileName+="_"+letterToLabel(cs);
3332 }
3333 if (addToIndex)
3334 {
3335 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3336 }
3337 }
3338
3339 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3340
3341 auto writeQuickLinks = [&,cap_letter=letter]()
3342 {
3344 if (!dynamicMenus)
3345 {
3347
3348 // index item for all file member lists
3351 ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3353
3354 // index items for per category member lists
3355 for (int i=1;i<FileMemberHighlight::Total;i++)
3356 {
3357 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3358 {
3360 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3361 ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3363 }
3364 }
3365
3367
3368 if (quickIndex)
3369 {
3370 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3371 getFmhlInfo(hl)->fname,multiPageIndex);
3372 }
3373
3374 ol.writeString("</div><!-- main-nav -->\n");
3375 }
3376 };
3377
3378 ol.startFile(fileName+extension,QCString(),title);
3379 ol.startQuickIndices();
3380 if (!disableIndex && !quickLinksAfterSplitbar)
3381 {
3382 writeQuickLinks();
3383 }
3384 ol.endQuickIndices();
3385 ol.writeSplitBar(fileName);
3386 if (quickLinksAfterSplitbar)
3387 {
3388 writeQuickLinks();
3389 if (!dynamicMenus)
3390 {
3391 ol.writeString("<div id=\"doc-content\">\n");
3392 }
3393 }
3394 ol.writeSearchInfo();
3395
3396 ol.startContents();
3397
3398 ol.startTextBlock();
3399 ol.parseText(hl == FileMemberHighlight::All && lne ? lne->intro() : theTranslator->trFileMembersDescriptionTotal(hl));
3400 ol.endTextBlock();
3401
3402 writeMemberList(ol,quickIndex,
3403 multiPageIndex ? letter : std::string(),
3404 index.isFileIndexLetterUsed(hl),
3406 endFile(ol);
3407 first=FALSE;
3408 }
3409 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3410 ol.popGeneratorState();
3411}
3412
3437
3438//----------------------------------------------------------------------------
3439
3440/** Helper class representing a namespace member in the navigation menu. */
3442{
3443 NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3444 const char *fname;
3446};
3447
3448static const NmhlInfo *getNmhlInfo(size_t hl)
3449{
3450 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3451 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3452 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3453 static NmhlInfo nmhlInfo[] =
3454 {
3455 NmhlInfo("namespacemembers", theTranslator->trAll()),
3456 NmhlInfo("namespacemembers_func",
3457 fortranOpt ? theTranslator->trSubprograms() :
3458 vhdlOpt ? theTranslator->trFunctionAndProc() :
3459 theTranslator->trFunctions()),
3460 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3461 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3462 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3463 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3464 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3465 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3466 };
3467 return &nmhlInfo[hl];
3468}
3469
3470//----------------------------------------------------------------------------
3471
3474{
3475 const auto &index = Index::instance();
3476 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3477
3478 bool disableIndex = Config_getBool(DISABLE_INDEX);
3479 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3480 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3481 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3482 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3483
3484 bool multiPageIndex=FALSE;
3485 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3486 {
3487 multiPageIndex=TRUE;
3488 }
3489
3490 ol.pushGeneratorState();
3492
3494 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3495 QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3496 bool addToIndex = lne==nullptr || lne->visible();
3497
3498 if (addToIndex)
3499 {
3500 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3501 getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3502 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3503 }
3504
3505 bool first=TRUE;
3506 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3507 {
3508 QCString fileName = getNmhlInfo(hl)->fname;
3509 if (multiPageIndex)
3510 {
3511 QCString cs(letter);
3512 if (!first)
3513 {
3514 fileName+="_"+letterToLabel(cs);
3515 }
3516 if (addToIndex)
3517 {
3518 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3519 }
3520 }
3521
3522 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3523
3524 auto writeQuickLinks = [&,cap_letter=letter]()
3525 {
3527 if (!dynamicMenus)
3528 {
3530
3531 // index item for all namespace member lists
3534 ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3536
3537 // index items per category member lists
3538 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3539 {
3540 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3541 {
3543 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3544 ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3546 }
3547 }
3548
3550
3551 if (quickIndex)
3552 {
3553 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3554 getNmhlInfo(hl)->fname,multiPageIndex);
3555 }
3556
3557 ol.writeString("</div><!-- main-nav -->\n");
3558 }
3559 };
3560
3561 ol.startFile(fileName+extension,QCString(),title);
3562 ol.startQuickIndices();
3563 if (!disableIndex && !quickLinksAfterSplitbar)
3564 {
3565 writeQuickLinks();
3566 }
3567 ol.endQuickIndices();
3568 ol.writeSplitBar(fileName);
3569 if (quickLinksAfterSplitbar)
3570 {
3571 writeQuickLinks();
3572 if (!dynamicMenus)
3573 {
3574 ol.writeString("<div id=\"doc-content\">\n");
3575 }
3576 }
3577 ol.writeSearchInfo();
3578
3579 ol.startContents();
3580
3581 ol.startTextBlock();
3582 ol.parseText(hl == NamespaceMemberHighlight::All && lne ? lne->intro() : theTranslator->trNamespaceMembersDescriptionTotal(hl));
3583 ol.endTextBlock();
3584
3585 writeMemberList(ol,quickIndex,
3586 multiPageIndex ? letter : std::string(),
3587 index.isNamespaceIndexLetterUsed(hl),
3589 endFile(ol);
3590 first=FALSE;
3591 }
3592 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3593 ol.popGeneratorState();
3594}
3595
3597{
3598 const auto &index = Index::instance();
3599 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3600 bool addToIndex = lne==nullptr || lne->visible();
3601 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3602 {
3603 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
3604 Doxygen::indexList->incContentsDepth();
3605 }
3606 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3615 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3616 {
3617 Doxygen::indexList->decContentsDepth();
3618 }
3619
3620}
3621
3622//----------------------------------------------------------------------------
3623
3624/** Helper class representing a module member in the navigation menu. */
3626{
3627 MmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3628 const char *fname;
3630};
3631
3632static const MmhlInfo *getMmhlInfo(size_t hl)
3633{
3634 static MmhlInfo nmhlInfo[] =
3635 {
3636 MmhlInfo("modulemembers", theTranslator->trAll()),
3637 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3638 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3639 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3640 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3641 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3642 };
3643 return &nmhlInfo[hl];
3644}
3645
3646//----------------------------------------------------------------------------
3647
3650{
3651 const auto &index = Index::instance();
3652 if (index.numDocumentedModuleMembers(hl)==0) return;
3653
3654 bool disableIndex = Config_getBool(DISABLE_INDEX);
3655 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3656 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3657 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3658 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3659
3660 bool multiPageIndex=FALSE;
3661 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3662 {
3663 multiPageIndex=TRUE;
3664 }
3665
3666 ol.pushGeneratorState();
3668
3670 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3671 QCString title = lne ? lne->title() : theTranslator->trModulesMembers();
3672 bool addToIndex = lne==nullptr || lne->visible();
3673
3674 if (addToIndex)
3675 {
3676 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,QCString(),
3677 getMmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3678 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3679 }
3680
3681 bool first=TRUE;
3682 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3683 {
3684 QCString fileName = getMmhlInfo(hl)->fname;
3685 if (multiPageIndex)
3686 {
3687 QCString cs(letter);
3688 if (!first)
3689 {
3690 fileName+="_"+letterToLabel(cs);
3691 }
3692 if (addToIndex)
3693 {
3694 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3695 }
3696 }
3697
3698 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3699
3700 auto writeQuickLinks = [&,cap_letter=letter]()
3701 {
3703 if (!dynamicMenus)
3704 {
3706
3707 // index item for all namespace member lists
3710 ol.writeString(fixSpaces(getMmhlInfo(0)->title));
3712
3713 // index items per category member lists
3714 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3715 {
3716 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3717 {
3719 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3720 ol.writeString(fixSpaces(getMmhlInfo(i)->title));
3722 }
3723 }
3724
3726
3727 if (quickIndex)
3728 {
3729 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3730 getMmhlInfo(hl)->fname,multiPageIndex);
3731 }
3732
3733 ol.writeString("</div><!-- main-nav -->\n");
3734 }
3735 };
3736
3737 ol.startFile(fileName+extension,QCString(),title);
3738 ol.startQuickIndices();
3739 if (!disableIndex && !quickLinksAfterSplitbar)
3740 {
3741 writeQuickLinks();
3742 }
3743 ol.endQuickIndices();
3744 ol.writeSplitBar(fileName);
3745 if (quickLinksAfterSplitbar)
3746 {
3747 writeQuickLinks();
3748 if (!dynamicMenus)
3749 {
3750 ol.writeString("<div id=\"doc-content\">\n");
3751 }
3752 }
3753 ol.writeSearchInfo();
3754
3755 ol.startContents();
3756
3757 ol.startTextBlock();
3758 ol.parseText(hl == ModuleMemberHighlight::All && lne ? lne->intro() : theTranslator->trModuleMembersDescriptionTotal(hl));
3759 ol.endTextBlock();
3760
3761 writeMemberList(ol,quickIndex,
3762 multiPageIndex ? letter : std::string(),
3763 index.isModuleIndexLetterUsed(hl),
3765 endFile(ol);
3766 first=FALSE;
3767 }
3768 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3769 ol.popGeneratorState();
3770}
3771
3772
3773//----------------------------------------------------------------------------
3774
3776{
3777 const auto &index = Index::instance();
3778 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3779 bool addToIndex = lne==nullptr || lne->visible();
3780 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3781 {
3782 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3783 Doxygen::indexList->incContentsDepth();
3784 }
3785 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3792 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3793 {
3794 Doxygen::indexList->decContentsDepth();
3795 }
3796}
3797
3798//----------------------------------------------------------------------------
3799
3801{
3802 if (Doxygen::exampleLinkedMap->empty()) return;
3803 ol.pushGeneratorState();
3806 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3807 QCString title = lne ? lne->title() : theTranslator->trExamples();
3808 bool addToIndex = lne==nullptr || lne->visible();
3809
3810 startFile(ol,"examples",QCString(),title,HighlightedItem::Examples);
3811
3812 startTitle(ol,QCString());
3813 ol.parseText(title);
3814 endTitle(ol,QCString(),QCString());
3815
3816 ol.startContents();
3817
3818 if (addToIndex)
3819 {
3820 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3821 Doxygen::indexList->incContentsDepth();
3822 }
3823
3824 ol.startTextBlock();
3825 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3826 ol.endTextBlock();
3827
3828 ol.startItemList();
3829 for (const auto &pd : *Doxygen::exampleLinkedMap)
3830 {
3831 ol.startItemListItem();
3832 QCString n=pd->getOutputFileBase();
3833 if (!pd->title().isEmpty())
3834 {
3835 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3836 if (addToIndex)
3837 {
3838 Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,QCString(),FALSE,TRUE);
3839 }
3840 }
3841 else
3842 {
3843 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3844 if (addToIndex)
3845 {
3846 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3847 }
3848 }
3849 ol.endItemListItem();
3850 //ol.writeString("\n");
3851 }
3852 ol.endItemList();
3853
3854 if (addToIndex)
3855 {
3856 Doxygen::indexList->decContentsDepth();
3857 }
3858 endFile(ol);
3859 ol.popGeneratorState();
3860}
3861
3862
3863//----------------------------------------------------------------------------
3864
3865static void countRelatedPages(int &docPages,int &indexPages)
3866{
3867 docPages=indexPages=0;
3868 for (const auto &pd : *Doxygen::pageLinkedMap)
3869 {
3870 if (pd->visibleInIndex() && !pd->hasParentPage())
3871 {
3872 indexPages++;
3873 }
3874 if (pd->documentedPage())
3875 {
3876 docPages++;
3877 }
3878 }
3879}
3880
3881//----------------------------------------------------------------------------
3882
3884{
3885 QCString projectName = Config_getString(PROJECT_NAME);
3886 QCString title;
3888 {
3889 title = filterTitle(Doxygen::mainPage->title());
3890 }
3891 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3892}
3893
3894static void writePages(PageDef *pd,FTVHelp *ftv)
3895{
3896 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3897 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3898 bool addToIndex = lne==nullptr || lne->visible();
3899 if (!addToIndex) return;
3900
3901 bool hasSubPages = pd->hasSubPages();
3902 bool hasSections = pd->hasSections();
3903
3904 if (pd->visibleInIndex())
3905 {
3906 QCString pageTitle;
3907
3908 if (pd->title().isEmpty())
3909 pageTitle=pd->name();
3910 else
3911 pageTitle=filterTitle(pd->title());
3912
3913 if (ftv)
3914 {
3915 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
3916 ftv->addContentsItem(
3917 hasSubPages,pageTitle,
3918 pd->getReference(),pd->getOutputFileBase(),
3919 QCString(),hasSubPages,TRUE,pd);
3920 }
3921 if (addToIndex && pd!=Doxygen::mainPage.get())
3922 {
3923 Doxygen::indexList->addContentsItem(
3924 hasSubPages || hasSections,pageTitle,
3925 pd->getReference(),pd->getOutputFileBase(),
3926 QCString(),hasSubPages,TRUE,pd);
3927 }
3928 }
3929 if (hasSubPages && ftv) ftv->incContentsDepth();
3930 bool doIndent = (hasSections || hasSubPages) &&
3931 (pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
3932 if (doIndent)
3933 {
3934 Doxygen::indexList->incContentsDepth();
3935 }
3936 if (hasSections)
3937 {
3938 pd->addSectionsToIndex();
3939 }
3940 for (const auto &subPage : pd->getSubPages())
3941 {
3942 writePages(subPage,ftv);
3943 }
3944 if (hasSubPages && ftv) ftv->decContentsDepth();
3945 if (doIndent)
3946 {
3947 Doxygen::indexList->decContentsDepth();
3948 }
3949 //printf("end writePages()=%s\n",qPrint(pd->title()));
3950}
3951
3952//----------------------------------------------------------------------------
3953
3955{
3956 if (Index::instance().numIndexedPages()==0) return;
3957 ol.pushGeneratorState();
3959 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3960 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
3961 startFile(ol,"pages",QCString(),title,HighlightedItem::Pages);
3962 startTitle(ol,QCString());
3963 ol.parseText(title);
3964 endTitle(ol,QCString(),QCString());
3965 ol.startContents();
3966 ol.startTextBlock();
3967 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
3968 ol.endTextBlock();
3969
3970 {
3971 FTVHelp ftv(false);
3972 for (const auto &pd : *Doxygen::pageLinkedMap)
3973 {
3974 if ((pd->getOuterScope()==nullptr ||
3975 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
3976 pd->visibleInIndex()
3977 )
3978 {
3979 writePages(pd.get(),&ftv);
3980 }
3981 }
3982 TextStream t;
3984 ol.writeString(t.str().c_str());
3985 }
3986
3987// ol.popGeneratorState();
3988 // ------
3989
3990 endFile(ol);
3991 ol.popGeneratorState();
3992}
3993
3994//----------------------------------------------------------------------------
3995
3996static int countGroups()
3997{
3998 int count=0;
3999 for (const auto &gd : *Doxygen::groupLinkedMap)
4000 {
4001 if (!gd->isReference())
4002 {
4003 //gd->visited=FALSE;
4004 count++;
4005 }
4006 }
4007 return count;
4008}
4009
4010//----------------------------------------------------------------------------
4011
4012static int countDirs()
4013{
4014 int count=0;
4015 for (const auto &dd : *Doxygen::dirLinkedMap)
4016 {
4017 if (dd->isLinkableInProject())
4018 {
4019 count++;
4020 }
4021 }
4022 return count;
4023}
4024
4025
4026//----------------------------------------------------------------------------
4027
4029{
4030 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4031 ol.pushGeneratorState();
4033
4034 DotLegendGraph gd;
4035 gd.writeGraph(Config_getString(HTML_OUTPUT));
4036
4037 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4038 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4039 // temporarily disable the stripping of comments for our own code example!
4040 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4041 // temporarily disable create subdirs for linking to our example
4042 Config_updateBool(CREATE_SUBDIRS,FALSE);
4043
4044 startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
4045 startTitle(ol,QCString());
4046 ol.parseText(theTranslator->trLegendTitle());
4047 endTitle(ol,QCString(),QCString());
4048 ol.startContents();
4049 QCString legendDocs = theTranslator->trLegendDocs();
4050 int s = legendDocs.find("<center>");
4051 int e = legendDocs.find("</center>");
4052 QCString imgExt = getDotImageExtension();
4053 if (imgExt=="svg" && s!=-1 && e!=-1)
4054 {
4055 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4056 //printf("legendDocs=%s\n",qPrint(legendDocs));
4057 }
4058
4059 {
4060 auto fd = createFileDef("","graph_legend.dox");
4061 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,FALSE,FALSE,
4063 }
4064
4065 // restore config settings
4066 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4067 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4068
4069 endFile(ol);
4070 ol.popGeneratorState();
4071}
4072
4073
4074
4075//----------------------------------------------------------------------------
4076/*!
4077 * write groups as hierarchical trees
4078 */
4079static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex)
4080{
4081 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4082 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4083 if (level>20)
4084 {
4085 warn(gd->getDefFileName(),gd->getDefLine(),
4086 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->name());
4087 return;
4088 }
4089
4090 /* Some groups should appear twice under different parent-groups.
4091 * That is why we should not check if it was visited
4092 */
4093 if ((!gd->isASubGroup() || level>0) && gd->isVisible() && gd->isVisibleInHierarchy())
4094 {
4095 //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
4096 // write group info
4097 bool hasSubGroups = !gd->getSubGroups().empty();
4098 bool hasSubPages = !gd->getPages().empty();
4099 size_t numSubItems = 0;
4100 for (const auto &ml : gd->getMemberLists())
4101 {
4102 if (ml->listType().isDocumentation())
4103 {
4104 numSubItems += ml->size();
4105 }
4106 }
4107 numSubItems += gd->getNamespaces().size();
4108 numSubItems += gd->getClasses().size();
4109 numSubItems += gd->getFiles().size();
4110 numSubItems += gd->getConcepts().size();
4111 numSubItems += gd->getDirs().size();
4112 numSubItems += gd->getPages().size();
4113
4114 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4115 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
4116 if (addToIndex)
4117 {
4118 Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),QCString(),isDir,TRUE);
4119 Doxygen::indexList->incContentsDepth();
4120 }
4121 if (ftv)
4122 {
4123 ftv->addContentsItem(hasSubGroups,gd->groupTitle(),
4125 FALSE,FALSE,gd);
4126 ftv->incContentsDepth();
4127 }
4128
4129 //ol.writeListItem();
4130 //ol.startTextLink(gd->getOutputFileBase(),0);
4131 //parseText(ol,gd->groupTitle());
4132 //ol.endTextLink();
4133
4134 ol.startIndexListItem();
4136 ol.parseText(gd->groupTitle());
4138 if (gd->isReference())
4139 {
4140 ol.startTypewriter();
4141 ol.docify(" [external]");
4142 ol.endTypewriter();
4143 }
4144
4145 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
4146 {
4147 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4148 {
4149 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
4150 if (lmd)
4151 {
4152 MemberList *ml = gd->getMemberList(lmd->type);
4153 if (ml)
4154 {
4155 for (const auto &md : *ml)
4156 {
4157 const MemberVector &enumList = md->enumFieldList();
4158 isDir = !enumList.empty() && md->isEnumerate();
4159 if (md->isVisible() && !md->isAnonymous())
4160 {
4161 Doxygen::indexList->addContentsItem(isDir,
4162 md->qualifiedName(),md->getReference(),
4163 md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
4164 }
4165 if (isDir)
4166 {
4167 Doxygen::indexList->incContentsDepth();
4168 for (const auto &emd : enumList)
4169 {
4170 if (emd->isVisible())
4171 {
4172 Doxygen::indexList->addContentsItem(FALSE,
4173 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4174 emd->anchor(),FALSE,addToIndex);
4175 }
4176 }
4177 Doxygen::indexList->decContentsDepth();
4178 }
4179 }
4180 }
4181 }
4182 }
4183 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4184 {
4185 for (const auto &cd : gd->getClasses())
4186 {
4187 //bool nestedClassInSameGroup =
4188 // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
4189 // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
4190 //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
4191 if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
4192 {
4194 LayoutDocManager::Class,
4195 cd->displayName(),
4196 cd->anchor(),
4197 addToIndex,
4198 TRUE);
4199 }
4200 }
4201 }
4202 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex && Config_getBool(SHOW_NAMESPACES))
4203 {
4204 for (const auto &nd : gd->getNamespaces())
4205 {
4206 if (nd->isVisible())
4207 {
4208 Doxygen::indexList->addContentsItem(FALSE,
4209 nd->displayName(),nd->getReference(),
4210 nd->getOutputFileBase(),QCString(),FALSE,Config_getBool(SHOW_NAMESPACES));
4211 }
4212 }
4213 }
4214 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4215 {
4216 for (const auto &cd : gd->getConcepts())
4217 {
4218 if (cd->isVisible())
4219 {
4220 Doxygen::indexList->addContentsItem(FALSE,
4221 cd->displayName(),cd->getReference(),
4222 cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
4223 }
4224 }
4225 }
4226 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4227 {
4228 for (const auto &fd : gd->getFiles())
4229 {
4230 if (fd->isVisible())
4231 {
4232 Doxygen::indexList->addContentsItem(FALSE,
4233 fd->displayName(),fd->getReference(),
4234 fd->getOutputFileBase(),QCString(),FALSE,fd->isLinkableViaGroup());
4235 }
4236 }
4237 }
4238 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4239 {
4240 for (const auto &dd : gd->getDirs())
4241 {
4242 if (dd->isVisible())
4243 {
4244 Doxygen::indexList->addContentsItem(FALSE,
4245 dd->shortName(),dd->getReference(),
4246 dd->getOutputFileBase(),QCString(),FALSE,FALSE);
4247 }
4248 }
4249 }
4250 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4251 {
4252 for (const auto &pd : gd->getPages())
4253 {
4254 const SectionInfo *si=nullptr;
4255 if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
4256 hasSubPages = pd->hasSubPages();
4257 bool hasSections = pd->hasSections();
4258 Doxygen::indexList->addContentsItem(
4259 hasSubPages || hasSections,
4260 pd->title(),
4261 gd->getReference(),
4262 gd->getOutputFileBase(),
4263 si ? si->label() : QCString(),
4264 hasSubPages || hasSections,
4265 TRUE); // addToNavIndex
4266 if (hasSections || hasSubPages)
4267 {
4268 Doxygen::indexList->incContentsDepth();
4269 }
4270 if (hasSections)
4271 {
4272 pd->addSectionsToIndex();
4273 }
4274 writePages(pd,nullptr);
4275 if (hasSections || hasSubPages)
4276 {
4277 Doxygen::indexList->decContentsDepth();
4278 }
4279 }
4280 }
4281 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4282 {
4283 if (!gd->getSubGroups().empty())
4284 {
4285 startIndexHierarchy(ol,level+1);
4286 for (const auto &subgd : gd->getSubGroups())
4287 {
4288 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4289 }
4290 endIndexHierarchy(ol,level+1);
4291 }
4292 }
4293 }
4294
4295 ol.endIndexListItem();
4296
4297 if (addToIndex)
4298 {
4299 Doxygen::indexList->decContentsDepth();
4300 }
4301 if (ftv)
4302 {
4303 ftv->decContentsDepth();
4304 }
4305 //gd->visited=TRUE;
4306 }
4307}
4308
4309static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
4310{
4311 if (ftv)
4312 {
4313 ol.pushGeneratorState();
4315 }
4316 startIndexHierarchy(ol,0);
4317 for (const auto &gd : *Doxygen::groupLinkedMap)
4318 {
4319 if (gd->isVisibleInHierarchy())
4320 {
4321 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4322 }
4323 }
4324 endIndexHierarchy(ol,0);
4325 if (ftv)
4326 {
4327 ol.popGeneratorState();
4328 }
4329}
4330
4331//----------------------------------------------------------------------------
4332
4334{
4335 if (Index::instance().numDocumentedGroups()==0) return;
4336 ol.pushGeneratorState();
4337 // 1.{
4340 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4341 QCString title = lne ? lne->title() : theTranslator->trTopics();
4342 bool addToIndex = lne==nullptr || lne->visible();
4343
4344 startFile(ol,"topics",QCString(),title,HighlightedItem::Topics);
4345 startTitle(ol,QCString());
4346 ol.parseText(title);
4347 endTitle(ol,QCString(),QCString());
4348 ol.startContents();
4349 ol.startTextBlock();
4350 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4351 ol.endTextBlock();
4352
4353 // ---------------
4354 // Normal group index for Latex/RTF
4355 // ---------------
4356 // 2.{
4357 ol.pushGeneratorState();
4359 Doxygen::indexList->disable();
4360
4361 writeGroupHierarchy(ol,nullptr,FALSE);
4362
4363 Doxygen::indexList->enable();
4364 ol.popGeneratorState();
4365 // 2.}
4366
4367 // ---------------
4368 // interactive group index for HTML
4369 // ---------------
4370 // 2.{
4371 ol.pushGeneratorState();
4373
4374 {
4375 if (addToIndex)
4376 {
4377 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"topics",QCString(),TRUE,TRUE);
4378 Doxygen::indexList->incContentsDepth();
4379 }
4380 FTVHelp ftv(false);
4381 writeGroupHierarchy(ol,&ftv,addToIndex);
4382 TextStream t;
4385 ol.writeString(t.str().c_str());
4386 if (addToIndex)
4387 {
4388 Doxygen::indexList->decContentsDepth();
4389 }
4390 }
4391 ol.popGeneratorState();
4392 // 2.}
4393
4394 endFile(ol);
4395 ol.popGeneratorState();
4396 // 1.}
4397}
4398
4399
4400//----------------------------------------------------------------------------
4401
4402static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod,
4403 FTVHelp* ftv, bool addToIndex)
4404{
4405 int visibleMembers = mod->countVisibleMembers();
4406 bool isDir=visibleMembers>0;
4407 if (addToIndex)
4408 {
4409 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4410 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4411 }
4412 if (ftv)
4413 {
4414 ftv->addContentsItem(false,mod->name(),
4415 mod->getReference(),mod->getOutputFileBase(),QCString(),
4416 false,false,mod);
4417 }
4418 ol.startIndexListItem();
4420 ol.parseText(mod->qualifiedName());
4422 if (mod->isReference())
4423 {
4424 ol.startTypewriter();
4425 ol.docify(" [external]");
4426 ol.endTypewriter();
4427 }
4428 if (addToIndex && isDir)
4429 {
4430 Doxygen::indexList->incContentsDepth();
4431 }
4432 if (isDir)
4433 {
4434 //ftv->incContentsDepth();
4435 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4436 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4437 writeModuleMembers(mod,addToIndex);
4438 //ftv->decContentsDepth();
4439 }
4440 if (addToIndex && isDir)
4441 {
4442 Doxygen::indexList->decContentsDepth();
4443 }
4444 ol.endIndexListItem();
4445}
4446
4447//----------------------------------------------------------------------------
4448
4449static void writeModuleList(OutputList &ol, FTVHelp *ftv,bool addToIndex)
4450{
4451 if (ftv)
4452 {
4453 ol.pushGeneratorState();
4455 }
4456 startIndexHierarchy(ol,0);
4457 for (const auto &mod : ModuleManager::instance().modules())
4458 {
4459 if (mod->isPrimaryInterface())
4460 {
4461 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4462 }
4463 }
4464 endIndexHierarchy(ol,0);
4465 if (ftv)
4466 {
4467 ol.popGeneratorState();
4468 }
4469}
4470
4471//----------------------------------------------------------------------------
4472
4474{
4475 if (ModuleManager::instance().numDocumentedModules()==0) return;
4476 ol.pushGeneratorState();
4477 // 1.{
4478
4481 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4482 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4483 QCString title = lne ? lne->title() : theTranslator->trModules();
4484 bool addToIndex = lne==nullptr || lne->visible();
4485
4486 startFile(ol,"modules",QCString(),title,HighlightedItem::Modules);
4487 startTitle(ol,QCString());
4488 ol.parseText(title);
4489 endTitle(ol,QCString(),QCString());
4490 ol.startContents();
4491 ol.startTextBlock();
4492 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4493 ol.endTextBlock();
4494
4495 // ---------------
4496 // Normal group index for Latex/RTF
4497 // ---------------
4498 // 2.{
4499 ol.pushGeneratorState();
4501 Doxygen::indexList->disable();
4502
4503 writeModuleList(ol,nullptr,FALSE);
4504
4505 Doxygen::indexList->enable();
4506 ol.popGeneratorState();
4507 // 2.}
4508
4509 // ---------------
4510 // interactive group index for HTML
4511 // ---------------
4512 // 2.{
4513 ol.pushGeneratorState();
4515
4516 {
4517 if (addToIndex)
4518 {
4519 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4520 Doxygen::indexList->incContentsDepth();
4521 }
4522 FTVHelp ftv(false);
4523 writeModuleList(ol,&ftv,addToIndex);
4524 TextStream t;
4526 ol.writeString(t.str().c_str());
4527 if (addToIndex)
4528 {
4529 Doxygen::indexList->decContentsDepth();
4530 }
4531 }
4532 ol.popGeneratorState();
4533 // 2.}
4534 endFile(ol);
4535 ol.popGeneratorState();
4536 // 1.}
4537}
4538
4539//----------------------------------------------------------------------------
4540
4541static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex)
4542{
4543 for (const auto &cd : concepts)
4544 {
4545 if (cd->isLinkableInProject())
4546 {
4547 if (ftv)
4548 {
4549 ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4550 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4551 }
4552 if (addToIndex)
4553 {
4554 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4555 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4556 }
4557 }
4558 }
4559}
4560
4562 bool rootOnly, bool addToIndex);
4563
4565 bool rootOnly, bool addToIndex)
4566{
4567 for (const auto &nd : nsLinkedMap)
4568 {
4569 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4570 }
4571}
4572
4573
4575 bool rootOnly, bool addToIndex)
4576{
4577 if (!nd->isAnonymous() &&
4578 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4579 {
4580 bool isDir = namespaceHasNestedConcept(nd);
4581 bool isLinkable = nd->isLinkableInProject();
4582
4583 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4584
4585 QCString ref;
4586 QCString file;
4587 if (isLinkable)
4588 {
4589 ref = nd->getReference();
4590 file = nd->getOutputFileBase();
4591 }
4592
4593 if (isDir)
4594 {
4595 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4596
4597 if (addToIndex)
4598 {
4599 // the namespace entry is already shown under the namespace list so don't
4600 // add it to the nav index and don't create a separate index file for it otherwise
4601 // it will overwrite the one written for the namespace list.
4602 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4603 false, // separateIndex
4604 false // addToNavIndex
4605 );
4606 }
4607 if (addToIndex)
4608 {
4609 Doxygen::indexList->incContentsDepth();
4610 }
4611
4612 ftv->incContentsDepth();
4614 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4615 ftv->decContentsDepth();
4616
4617 if (addToIndex)
4618 {
4619 Doxygen::indexList->decContentsDepth();
4620 }
4621 }
4622 }
4623}
4624
4625static void writeConceptRootList(FTVHelp *ftv,bool addToIndex)
4626{
4627 for (const auto &cd : *Doxygen::conceptLinkedMap)
4628 {
4629 if ((cd->getOuterScope()==nullptr ||
4630 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4631 )
4632 {
4633 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4634 ftv->addContentsItem(
4635 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4636 QCString(),false,cd->partOfGroups().empty(),cd.get());
4637 if (addToIndex)
4638 {
4639 Doxygen::indexList->addContentsItem(
4640 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4641 QCString(),false,cd->partOfGroups().empty(),cd.get());
4642 }
4643 }
4644 }
4645}
4646
4648{
4649 if (Index::instance().numDocumentedConcepts()==0) return;
4650 ol.pushGeneratorState();
4651 // 1.{
4654 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4655 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4656 bool addToIndex = lne==nullptr || lne->visible();
4657
4658 startFile(ol,"concepts",QCString(),title,HighlightedItem::Concepts);
4659 startTitle(ol,QCString());
4660 ol.parseText(title);
4661 endTitle(ol,QCString(),QCString());
4662 ol.startContents();
4663 ol.startTextBlock();
4664 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4665 ol.endTextBlock();
4666
4667 // ---------------
4668 // Normal group index for Latex/RTF
4669 // ---------------
4670 // 2.{
4671 ol.pushGeneratorState();
4673
4674 bool first=TRUE;
4675 for (const auto &cd : *Doxygen::conceptLinkedMap)
4676 {
4677 if (cd->isLinkableInProject())
4678 {
4679 if (first)
4680 {
4681 ol.startIndexList();
4682 first=FALSE;
4683 }
4684 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4685 ol.startIndexKey();
4686 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4687 ol.endIndexKey();
4688
4689 bool hasBrief = !cd->briefDescription().isEmpty();
4690 ol.startIndexValue(hasBrief);
4691 if (hasBrief)
4692 {
4693 //ol.docify(" (");
4694 ol.generateDoc(
4695 cd->briefFile(),cd->briefLine(),
4696 cd.get(),nullptr,
4697 cd->briefDescription(TRUE),
4698 FALSE, // index words
4699 FALSE, // isExample
4700 QCString(), // example name
4701 TRUE, // single line
4702 TRUE, // link from index
4703 Config_getBool(MARKDOWN_SUPPORT)
4704 );
4705 //ol.docify(")");
4706 }
4707 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4708
4709 }
4710 }
4711 if (!first) ol.endIndexList();
4712
4713 ol.popGeneratorState();
4714 // 2.}
4715
4716 // ---------------
4717 // interactive group index for HTML
4718 // ---------------
4719 // 2.{
4720 ol.pushGeneratorState();
4722
4723 {
4724 if (addToIndex)
4725 {
4726 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
4727 Doxygen::indexList->incContentsDepth();
4728 }
4729 FTVHelp ftv(false);
4730 for (const auto &nd : *Doxygen::namespaceLinkedMap)
4731 {
4732 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4733 }
4734 writeConceptRootList(&ftv,addToIndex);
4735 TextStream t;
4737 ol.writeString(t.str().c_str());
4738 if (addToIndex)
4739 {
4740 Doxygen::indexList->decContentsDepth();
4741 }
4742 }
4743 ol.popGeneratorState();
4744 // 2.}
4745
4746 endFile(ol);
4747 ol.popGeneratorState();
4748 // 1.}
4749}
4750
4751//----------------------------------------------------------------------------
4752
4754{
4755 if (lne->baseFile().startsWith("usergroup"))
4756 {
4757 ol.pushGeneratorState();
4760 startTitle(ol,QCString());
4761 ol.parseText(lne->title());
4762 endTitle(ol,QCString(),QCString());
4763 ol.startContents();
4764 int count=0;
4765 for (const auto &entry: lne->children())
4766 {
4767 if (entry->visible()) count++;
4768 }
4769 if (count>0)
4770 {
4771 ol.writeString("<ul>\n");
4772 for (const auto &entry: lne->children())
4773 {
4774 if (entry->visible())
4775 {
4776 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4777 fixSpaces(entry->title())+"</span></a></li>\n");
4778 }
4779 }
4780 ol.writeString("</ul>\n");
4781 }
4782 endFile(ol);
4783 ol.popGeneratorState();
4784 }
4785}
4786
4787//----------------------------------------------------------------------------
4788
4789
4790static void writeIndex(OutputList &ol)
4791{
4792 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4793 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4794 bool disableIndex = Config_getBool(DISABLE_INDEX);
4795 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4796 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4797 QCString projectName = Config_getString(PROJECT_NAME);
4798 // save old generator state
4799 ol.pushGeneratorState();
4800
4801 QCString projPrefix;
4802 if (!projectName.isEmpty())
4803 {
4804 projPrefix=projectName+" ";
4805 }
4806
4807 //--------------------------------------------------------------------
4808 // write HTML index
4809 //--------------------------------------------------------------------
4811
4812 QCString defFileName =
4813 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4814 int defLine =
4815 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4816
4817 QCString title;
4818 if (!mainPageHasTitle())
4819 {
4820 title = theTranslator->trMainPage();
4821 }
4822 else if (Doxygen::mainPage)
4823 {
4824 title = filterTitle(Doxygen::mainPage->title());
4825 }
4826
4827 QCString indexName="index";
4828 ol.startFile(indexName,QCString(),title);
4829
4831 {
4832 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4833 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4834 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4835 if (hasTitle) // to avoid duplicate entries in the treeview
4836 {
4837 Doxygen::indexList->addContentsItem(hasSubs,
4838 title,
4839 QCString(),
4840 indexName,
4841 QCString(),
4842 hasSubs,
4843 TRUE);
4844 }
4845 if (hasSubs)
4846 {
4847 writePages(Doxygen::mainPage.get(),nullptr);
4848 }
4849 }
4850
4851 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4852 ol.startQuickIndices();
4853 if (!disableIndex && !quickLinksAfterSplitbar)
4854 {
4856 }
4857 ol.endQuickIndices();
4858 ol.writeSplitBar(indexName);
4859 if (quickLinksAfterSplitbar)
4860 {
4862 }
4863 ol.writeSearchInfo();
4864 bool headerWritten=FALSE;
4866 {
4867 if (!Doxygen::mainPage->title().isEmpty())
4868 {
4869 if (Doxygen::mainPage->title().lower() != "notitle")
4870 ol.startPageDoc(Doxygen::mainPage->title());
4871 else
4872 ol.startPageDoc("");
4873 }
4874 else
4875 ol.startPageDoc(projectName);
4876 }
4877 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4878 {
4879 if (Doxygen::mainPage->title().lower()!="notitle")
4880 {
4881 ol.startHeaderSection();
4883 ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
4884 Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),false,false,
4885 QCString(),true,false,Config_getBool(MARKDOWN_SUPPORT));
4886 headerWritten = TRUE;
4887 }
4888 }
4889 else
4890 {
4891 if (!projectName.isEmpty())
4892 {
4893 ol.startHeaderSection();
4895 ol.parseText(theTranslator->trDocumentation(projectName));
4896 headerWritten = TRUE;
4897 }
4898 }
4899 if (headerWritten)
4900 {
4902 ol.endHeaderSection();
4903 }
4904
4905 ol.startContents();
4906 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4907 {
4909 }
4910
4912 {
4913 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections())
4914 {
4915 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4916 }
4917
4918 ol.startTextBlock();
4919 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,
4920 Doxygen::mainPage->documentation(),true,false,
4921 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4922 ol.endTextBlock();
4923 ol.endPageDoc();
4924 }
4925
4928 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4929 Doxygen::indexList->addIndexFile(fn);
4930
4931 endFile(ol);
4932
4934
4935 //--------------------------------------------------------------------
4936 // write LaTeX/RTF index
4937 //--------------------------------------------------------------------
4941
4943 {
4944 msg("Generating main page...\n");
4945 Doxygen::mainPage->writeDocumentation(ol);
4946 }
4947
4948 ol.startFile("refman",QCString(),QCString());
4952
4953 if (projPrefix.isEmpty())
4954 {
4955 ol.parseText(theTranslator->trReferenceManual());
4956 }
4957 else
4958 {
4959 ol.parseText(projPrefix);
4960 }
4961
4962 if (!Config_getString(PROJECT_NUMBER).isEmpty())
4963 {
4964 ol.startProjectNumber();
4965 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,Config_getString(PROJECT_NUMBER),false,false,
4966 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4967 ol.endProjectNumber();
4968 }
4971 ol.parseText(theTranslator->trGeneratedBy());
4975
4976 ol.lastIndexPage();
4978 {
4981 }
4982 const auto &index = Index::instance();
4983 if (index.numDocumentedPages()>0)
4984 {
4987 }
4988
4990 if (!Config_getBool(LATEX_HIDE_INDICES))
4991 {
4992 //if (indexedPages>0)
4993 //{
4994 // ol.startIndexSection(isPageIndex);
4995 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
4996 // ol.endIndexSection(isPageIndex);
4997 //}
4998 if (index.numDocumentedModules()>0)
4999 {
5001 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5003 }
5004 if (index.numDocumentedGroups()>0)
5005 {
5007 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5009 }
5010 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5011 {
5012 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5013 if (lne)
5014 {
5016 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5018 }
5019 }
5020 if (index.numDocumentedConcepts()>0)
5021 {
5023 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5025 }
5026 if (index.numHierarchyInterfaces()>0)
5027 {
5029 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5031 }
5032 if (index.numHierarchyClasses()>0)
5033 {
5034 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5035 if (lne)
5036 {
5038 ol.parseText(/*projPrefix+*/
5039 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5040 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5041 theTranslator->trHierarchicalIndex()
5042 ));
5044 }
5045 }
5046 if (index.numHierarchyExceptions()>0)
5047 {
5049 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5051 }
5052 if (index.numAnnotatedInterfacesPrinted()>0)
5053 {
5055 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5057 }
5058 if (index.numAnnotatedClassesPrinted()>0)
5059 {
5061 ol.parseText(/*projPrefix+*/
5062 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5063 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5064 theTranslator->trCompoundIndex()
5065 ));
5067 }
5068 if (index.numAnnotatedStructsPrinted()>0)
5069 {
5071 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5073 }
5074 if (index.numAnnotatedExceptionsPrinted()>0)
5075 {
5077 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5079 }
5080 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5081 {
5083 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5085 }
5086 }
5088
5089 if (index.numDocumentedModules()>0)
5090 {
5092 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5094 }
5095 if (index.numDocumentedGroups()>0)
5096 {
5098 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5100 }
5101 if (index.numDocumentedNamespaces()>0)
5102 {
5104 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5106 }
5107 if (index.numDocumentedConcepts()>0)
5108 {
5110 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5112 }
5113 if (index.numAnnotatedInterfacesPrinted()>0)
5114 {
5116 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5118 }
5119 if (index.numAnnotatedClassesPrinted()>0)
5120 {
5122 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5124 }
5125 if (index.numAnnotatedStructsPrinted()>0)
5126 {
5128 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5130 }
5131 if (index.numAnnotatedExceptionsPrinted()>0)
5132 {
5134 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5136 }
5137 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5138 {
5140 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5142 }
5143 if (!Doxygen::exampleLinkedMap->empty())
5144 {
5146 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5148 }
5150 endFile(ol);
5151
5152 ol.popGeneratorState();
5153}
5154
5155static std::vector<bool> indexWritten;
5156
5158{
5159 auto isRef = [](const QCString &s)
5160 {
5161 return s.startsWith("@ref") || s.startsWith("\\ref");
5162 };
5163 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5164 const auto &index = Index::instance();
5165 for (const auto &lne : entries)
5166 {
5167 LayoutNavEntry::Kind kind = lne->kind();
5168 size_t idx = static_cast<size_t>(kind);
5169 if (idx>=indexWritten.size())
5170 {
5171 size_t oldSize = indexWritten.size();
5172 size_t newSize = idx+1;
5173 indexWritten.resize(newSize);
5174 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5175 }
5176 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5177 bool addToIndex=lne->visible();
5178 bool needsClosing=FALSE;
5179 if (!indexWritten.at(idx))
5180 {
5181 switch(kind)
5182 {
5183 case LayoutNavEntry::MainPage:
5184 msg("Generating index page...\n");
5185 writeIndex(ol);
5186 break;
5187 case LayoutNavEntry::Pages:
5188 msg("Generating page index...\n");
5189 writePageIndex(ol);
5190 break;
5191 case LayoutNavEntry::Topics:
5192 msg("Generating topic index...\n");
5193 writeTopicIndex(ol);
5194 break;
5195 case LayoutNavEntry::Modules:
5196 {
5197 if (index.numDocumentedModules()>0 && addToIndex)
5198 {
5199 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5200 Doxygen::indexList->incContentsDepth();
5201 needsClosing=TRUE;
5202 }
5203 }
5204 break;
5205 case LayoutNavEntry::ModuleList:
5206 msg("Generating module index...\n");
5207 writeModuleIndex(ol);
5208 break;
5209 case LayoutNavEntry::ModuleMembers:
5210 msg("Generating module member index...\n");
5212 break;
5213 case LayoutNavEntry::Namespaces:
5214 {
5215 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5216 if (showNamespaces)
5217 {
5218 if (index.numDocumentedNamespaces()>0 && addToIndex)
5219 {
5220 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5221 Doxygen::indexList->incContentsDepth();
5222 needsClosing=TRUE;
5223 }
5224 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5225 {
5226 msg("Generating namespace index...\n");
5228 }
5229 }
5230 }
5231 break;
5232 case LayoutNavEntry::NamespaceList:
5233 {
5234 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5235 if (showNamespaces)
5236 {
5237 msg("Generating namespace index...\n");
5239 }
5240 }
5241 break;
5242 case LayoutNavEntry::NamespaceMembers:
5243 msg("Generating namespace member index...\n");
5245 break;
5246 case LayoutNavEntry::Classes:
5247 if (index.numAnnotatedClasses()>0 && addToIndex)
5248 {
5249 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5250 Doxygen::indexList->incContentsDepth();
5251 needsClosing=TRUE;
5252 }
5253 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5254 {
5255 msg("Generating annotated compound index...\n");
5257 }
5258 break;
5259 case LayoutNavEntry::Concepts:
5260 msg("Generating concept index...\n");
5262 break;
5263 case LayoutNavEntry::ClassList:
5264 msg("Generating annotated compound index...\n");
5266 break;
5267 case LayoutNavEntry::ClassIndex:
5268 msg("Generating alphabetical compound index...\n");
5270 break;
5271 case LayoutNavEntry::ClassHierarchy:
5272 msg("Generating hierarchical class index...\n");
5274 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5275 {
5276 msg("Generating graphical class hierarchy...\n");
5278 }
5279 break;
5280 case LayoutNavEntry::ClassMembers:
5281 if (!sliceOpt)
5282 {
5283 msg("Generating member index...\n");
5285 }
5286 break;
5287 case LayoutNavEntry::Interfaces:
5288 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5289 {
5290 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5291 Doxygen::indexList->incContentsDepth();
5292 needsClosing=TRUE;
5293 }
5294 break;
5295 case LayoutNavEntry::InterfaceList:
5296 if (sliceOpt)
5297 {
5298 msg("Generating annotated interface index...\n");
5300 }
5301 break;
5302 case LayoutNavEntry::InterfaceIndex:
5303 if (sliceOpt)
5304 {
5305 msg("Generating alphabetical interface index...\n");
5307 }
5308 break;
5309 case LayoutNavEntry::InterfaceHierarchy:
5310 if (sliceOpt)
5311 {
5312 msg("Generating hierarchical interface index...\n");
5314 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5315 {
5316 msg("Generating graphical interface hierarchy...\n");
5318 }
5319 }
5320 break;
5321 case LayoutNavEntry::Structs:
5322 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5323 {
5324 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5325 Doxygen::indexList->incContentsDepth();
5326 needsClosing=TRUE;
5327 }
5328 break;
5329 case LayoutNavEntry::StructList:
5330 if (sliceOpt)
5331 {
5332 msg("Generating annotated struct index...\n");
5334 }
5335 break;
5336 case LayoutNavEntry::StructIndex:
5337 if (sliceOpt)
5338 {
5339 msg("Generating alphabetical struct index...\n");
5341 }
5342 break;
5343 case LayoutNavEntry::Exceptions:
5344 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5345 {
5346 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5347 Doxygen::indexList->incContentsDepth();
5348 needsClosing=TRUE;
5349 }
5350 break;
5351 case LayoutNavEntry::ExceptionList:
5352 if (sliceOpt)
5353 {
5354 msg("Generating annotated exception index...\n");
5356 }
5357 break;
5358 case LayoutNavEntry::ExceptionIndex:
5359 if (sliceOpt)
5360 {
5361 msg("Generating alphabetical exception index...\n");
5363 }
5364 break;
5365 case LayoutNavEntry::ExceptionHierarchy:
5366 if (sliceOpt)
5367 {
5368 msg("Generating hierarchical exception index...\n");
5370 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5371 {
5372 msg("Generating graphical exception hierarchy...\n");
5374 }
5375 }
5376 break;
5377 case LayoutNavEntry::Files:
5378 {
5379 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5380 {
5381 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5382 Doxygen::indexList->incContentsDepth();
5383 needsClosing=TRUE;
5384 }
5385 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5386 {
5387 msg("Generating file index...\n");
5388 writeFileIndex(ol);
5389 }
5390 }
5391 break;
5392 case LayoutNavEntry::FileList:
5393 msg("Generating file index...\n");
5394 writeFileIndex(ol);
5395 break;
5396 case LayoutNavEntry::FileGlobals:
5397 msg("Generating file member index...\n");
5399 break;
5400 case LayoutNavEntry::Examples:
5401 msg("Generating example index...\n");
5403 break;
5404 case LayoutNavEntry::User:
5405 if (addToIndex)
5406 {
5407 // prepend a ! or ^ marker to the URL to avoid tampering with it
5408 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5409 bool isRelative=url.at(0)=='!';
5410 if (!url.isEmpty() && !isRelative) // absolute URL
5411 {
5412 url.prepend("^"); // prepend ^ to absolute URL
5413 }
5414 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5415 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5416 }
5417 break;
5418 case LayoutNavEntry::UserGroup:
5419 if (addToIndex)
5420 {
5421 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5422 if (!url.isEmpty())
5423 {
5424 if (url=="!") // result of a "[none]" url
5425 {
5426 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5427 }
5428 else
5429 {
5430 bool isRelative=url.at(0)=='!';
5431 if (!isRelative) // absolute URL
5432 {
5433 url.prepend("^"); // prepend ^ to absolute URL
5434 }
5435 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5436 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5437 }
5438 }
5439 else
5440 {
5441 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5442 }
5443 Doxygen::indexList->incContentsDepth();
5444 needsClosing=TRUE;
5445 }
5446 writeUserGroupStubPage(ol,lne.get());
5447 break;
5448 case LayoutNavEntry::None:
5449 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5450 break;
5451 }
5452 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5453 {
5454 indexWritten.at(idx)=TRUE;
5455 }
5456 }
5457 writeIndexHierarchyEntries(ol,lne->children());
5458 if (needsClosing)
5459 {
5460 switch(kind)
5461 {
5462 case LayoutNavEntry::Modules:
5463 case LayoutNavEntry::Namespaces:
5464 case LayoutNavEntry::Classes:
5465 case LayoutNavEntry::Files:
5466 case LayoutNavEntry::UserGroup:
5467 Doxygen::indexList->decContentsDepth();
5468 break;
5469 default:
5470 break;
5471 }
5472 }
5473 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5474 }
5475}
5476
5478{
5479 const auto &index = Index::instance();
5480 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5481 bool showFiles = Config_getBool(SHOW_FILES);
5482 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5483 switch (kind)
5484 {
5485 case LayoutNavEntry::MainPage: return TRUE;
5486 case LayoutNavEntry::User: return TRUE;
5487 case LayoutNavEntry::UserGroup: return TRUE;
5488 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5489 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5490 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5491 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5492 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5493 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5494 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5495 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5496 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5497 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5498 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5499 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5500 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5501 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5502 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5503 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5504 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5505 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5506 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5507 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5508 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5509 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5510 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5511 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5512 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5513 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5514 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5515 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5516 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5517 case LayoutNavEntry::None: // should never happen, means not properly initialized
5518 assert(kind != LayoutNavEntry::None);
5519 return FALSE;
5520 }
5521 return FALSE;
5522}
5523
5524template<class T>
5525void renderMemberIndicesAsJs(std::ostream &t,
5526 std::function<std::size_t(std::size_t)> numDocumented,
5527 std::function<Index::MemberIndexMap(std::size_t)> getMemberList,
5528 const T *(*getInfo)(size_t hl),
5529 std::size_t total)
5530{
5531 // index items per category member lists
5532 bool firstMember=TRUE;
5533 for (std::size_t i=0;i<total;i++)
5534 {
5535 if (numDocumented(i)>0)
5536 {
5537 t << ",";
5538 if (firstMember)
5539 {
5540 t << "children:[";
5541 firstMember=FALSE;
5542 }
5543 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5544 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5545
5546 // Check if we have many members, then add sub entries per letter...
5547 // quick alphabetical index
5548 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5549 if (quickIndex)
5550 {
5551 bool multiPageIndex=FALSE;
5552 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5553 {
5554 multiPageIndex=TRUE;
5555 }
5556 t << ",children:[\n";
5557 bool firstLetter=TRUE;
5558 for (const auto &[letter,list] : getMemberList(i))
5559 {
5560 if (!firstLetter) t << ",\n";
5561 QCString ci(letter);
5562 QCString is(letterToLabel(ci));
5563 QCString anchor;
5565 QCString fullName = getInfo(i)->fname;
5566 if (!multiPageIndex || firstLetter)
5567 anchor=fullName+extension+"#index_";
5568 else // other pages of multi page index
5569 anchor=fullName+"_"+is+extension+"#index_";
5570 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5571 << convertToJSString(anchor+convertToId(is)) << "\"}";
5572 firstLetter=FALSE;
5573 }
5574 t << "]";
5575 }
5576 t << "}";
5577 }
5578 }
5579 if (!firstMember)
5580 {
5581 t << "]";
5582 }
5583}
5584
5585static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5586{
5587 int count=0;
5588 for (const auto &entry : root->children())
5589 {
5590 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5591 }
5592 if (count>0) // at least one item is visible
5593 {
5594 bool firstChild = TRUE;
5595 if (!first) t << ",";
5596 t << "children:[\n";
5597 for (const auto &entry : root->children())
5598 {
5599 if (entry->visible() && quickLinkVisible(entry->kind()))
5600 {
5601 if (!firstChild) t << ",\n";
5602 firstChild=FALSE;
5603 QCString url = entry->url();
5604 if (isURL(url)) url = "^" + url;
5605 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5606 << convertToJSString(url) << "\"";
5607 bool hasChildren=FALSE;
5608 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5609 {
5610 auto numDoc = [](std::size_t i) {
5612 };
5613 auto memList = [](std::size_t i) {
5615 };
5616 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5617 }
5618 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5619 {
5620 auto numDoc = [](std::size_t i) {
5622 };
5623 auto memList = [](std::size_t i) {
5625 };
5626 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5627 }
5628 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5629 {
5630 auto numDoc = [](std::size_t i) {
5632 };
5633 auto memList = [](std::size_t i) {
5635 };
5636 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5637 }
5638 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5639 {
5640 auto numDoc = [](std::size_t i) {
5642 };
5643 auto memList = [](std::size_t i) {
5645 };
5646 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5647 }
5648 else // recursive into child list
5649 {
5650 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5651 }
5652 if (hasChildren) t << "]";
5653 t << "}";
5654 }
5655 }
5656 }
5657 return count>0;
5658}
5659
5660static void writeMenuData()
5661{
5662 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5663 QCString outputDir = Config_getBool(HTML_OUTPUT);
5665 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5666 if (t.is_open())
5667 {
5669 t << "var menudata={";
5670 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5671 if (hasChildren) t << "]";
5672 t << "}\n";
5673 }
5674}
5675
5677{
5678 writeMenuData();
5680 if (lne)
5681 {
5683 }
5684}
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:862
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 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
void writeQuickLinks(HighlightedItem hli, const QCString &file, bool extraTabs=false)
Definition outputlist.h:613
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:1888
constexpr auto JAVASCRIPT_LICENSE_TEXT
Definition ftvhelp.h:71
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition htmlgen.cpp:2685
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4564
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:5157
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:3290
#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:5585
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:3230
void writeGraphInfo(OutputList &ol)
Definition index.cpp:4028
static std::vector< bool > indexWritten
Definition index.cpp:5155
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:3954
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:5525
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:3865
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4753
static int countGroups()
Definition index.cpp:3996
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3472
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1814
static bool mainPageHasOwnTitle()
Definition index.cpp:3883
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4333
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:3775
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4625
static int countDirs()
Definition index.cpp:4012
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3267
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:3632
static void writePages(PageDef *pd, FTVHelp *ftv)
Definition index.cpp:3894
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:3800
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:3448
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:4309
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:4574
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:4541
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
Definition index.cpp:2677
void writeIndexHierarchy(OutputList &ol)
Definition index.cpp:5676
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4449
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:4647
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:4473
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:4790
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:5477
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4402
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1331
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3596
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1119
static void writeMenuData()
Definition index.cpp:5660
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4079
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:3413
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:3648
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:3261
FmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3262
const char * fname
Definition index.cpp:3263
QCString title
Definition index.cpp:3264
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:3626
MmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3627
QCString title
Definition index.cpp:3629
const char * fname
Definition index.cpp:3628
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3442
const char * fname
Definition index.cpp:3444
QCString title
Definition index.cpp:3445
NmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3443
SrcLangExt
Definition types.h:207
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:6760
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:6403
QCString filterTitle(const QCString &title)
Definition util.cpp:6086
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:6565
bool isURL(const QCString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:6391
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:309
QCString convertToJSString(const QCString &s)
Definition util.cpp:4532
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
Definition util.cpp:4206
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6375
QCString getDotImageExtension()
Definition util.cpp:6765
int getPrefixIndex(const QCString &name)
Definition util.cpp:3745
QCString convertToId(const QCString &s)
Definition util.cpp:4381
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5408
A bunch of utility functions.
QCString fixSpaces(const QCString &s)
Definition util.h:471