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{
386 bool generateOutlinePanel = Config_getBool(GENERATE_TREEVIEW) && Config_getBool(PAGE_OUTLINE_PANEL);
388 if (!generateOutlinePanel && def) def->writeSummaryLinks(ol);
389 ol.startTitleHead(fileName);
392}
393
394void endTitle(OutputList &ol,const QCString &fileName,const QCString &name)
395{
397 ol.endTitleHead(fileName,name);
398 ol.endHeaderSection();
399}
400
401void startFile(OutputList &ol,const QCString &name,const QCString &manName,
402 const QCString &title,HighlightedItem hli,bool additionalIndices,
403 const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
404{
405 bool disableIndex = Config_getBool(DISABLE_INDEX);
406 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
407 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
408 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
409 ol.startFile(name,manName,title,hierarchyLevel);
411 if (!disableIndex && !quickLinksAfterSplitbar)
412 {
413 ol.writeQuickLinks(hli,name);
414 }
415 if (!additionalIndices)
416 {
417 ol.endQuickIndices();
418 }
419 ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name, allMembersFile);
420 if (quickLinksAfterSplitbar)
421 {
422 ol.writeQuickLinks(hli,name);
423 }
424 ol.writeSearchInfo();
425}
426
427void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents,
428 const QCString &navPath)
429{
430 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
433 if (!skipNavIndex)
434 {
435 if (!skipEndContents) ol.endContents();
436 if (generateTreeView)
437 {
438 ol.writeString("</div><!-- doc-content -->\n");
439 ol.writeString("</div><!-- container -->\n");
440 }
441 }
442
443 ol.writeFooter(navPath); // write the footer
445 ol.endFile();
446}
447
448void endFileWithNavPath(OutputList &ol,const DefinitionMutable *d,bool showPageNavigation)
449{
450 bool generateTreeview = Config_getBool(GENERATE_TREEVIEW);
451 bool generateOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
452 QCString navPath;
453 if (generateTreeview)
454 {
457 ol.writeString("</div><!-- doc-content -->\n");
458 if (generateOutlinePanel && showPageNavigation) d->writePageNavigation(ol);
459 ol.writeString("</div><!-- container -->\n");
461 navPath = toDefinition(const_cast<DefinitionMutable*>(d))->navigationPathAsString();
462 }
463 endFile(ol,generateTreeview,TRUE,navPath);
464}
465
466//----------------------------------------------------------------------
467
468static void writeMemberToIndex(const Definition *def,const MemberDef *md,bool addToIndex)
469{
470 bool isAnonymous = md->isAnonymous();
471 bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
472 const MemberVector &enumList = md->enumFieldList();
473 bool isDir = !enumList.empty() && md->isEnumerate();
474 auto defType = def->definitionType();
475 bool namespaceMemberInFileDocs = md->getNamespaceDef() && defType==Definition::TypeFile;
476 bool lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
477 QCString name = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
478 md->qualifiedName() : md->name();
479 if (md->getOuterScope()==def ||
480 (md->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
482 {
483 Doxygen::indexList->addContentsItem(isDir,
484 name,md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
485 }
486 else // inherited member
487 {
488 Doxygen::indexList->addContentsItem(isDir,
489 name,def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
490 }
491 if (isDir)
492 {
493 if (!isAnonymous)
494 {
495 Doxygen::indexList->incContentsDepth();
496 }
497 for (const auto &emd : enumList)
498 {
499 if (!hideUndocMembers || emd->hasDocumentation())
500 {
501 namespaceMemberInFileDocs = emd->getNamespaceDef() && defType==Definition::TypeFile;
502 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
503 QCString ename = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
504 emd->qualifiedName() : emd->name();
505 if (emd->getOuterScope()==def ||
506 (emd->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
508 {
509 Doxygen::indexList->addContentsItem(FALSE,
510 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
511 }
512 else // inherited member
513 {
514 Doxygen::indexList->addContentsItem(FALSE,
515 ename,def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
516 }
517 }
518 }
519 if (!isAnonymous)
520 {
521 Doxygen::indexList->decContentsDepth();
522 }
523 }
524}
525
526//----------------------------------------------------------------------
527template<class T>
529 const QCString &name,const QCString &anchor,
530 bool addToIndex=TRUE,bool preventSeparateIndex=FALSE,
531 const ConceptLinkedRefMap *concepts = nullptr)
532
533{
534 int numClasses=0;
535 for (const auto &cd : def->getClasses())
536 {
537 if (cd->isLinkable()) numClasses++;
538 }
539 int numConcepts=0;
540 if (concepts)
541 {
542 for (const auto &cd : *concepts)
543 {
544 if (cd->isLinkable()) numConcepts++;
545 }
546 }
547 bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
548 Doxygen::indexList->addContentsItem(hasMembers,name,
549 def->getReference(),def->getOutputFileBase(),anchor,
550 hasMembers && !preventSeparateIndex,
551 addToIndex,
552 def);
553 //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
554 if (hasMembers || numClasses>0 || numConcepts>0)
555 {
556 Doxygen::indexList->incContentsDepth();
557 for (const auto &lde : LayoutDocManager::instance().docEntries(part))
558 {
559 auto kind = lde->kind();
560 if (kind==LayoutDocEntry::MemberDef)
561 {
562 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
563 if (lmd)
564 {
565 MemberList *ml = def->getMemberList(lmd->type);
566 if (ml)
567 {
568 for (const auto &md : *ml)
569 {
570 if (md->visibleInIndex())
571 {
572 writeMemberToIndex(def,md,addToIndex);
573 }
574 }
575 }
576 }
577 }
578 else if (kind==LayoutDocEntry::NamespaceClasses ||
579 kind==LayoutDocEntry::FileClasses ||
580 kind==LayoutDocEntry::ClassNestedClasses ||
581 kind==LayoutDocEntry::ModuleClasses
582 )
583 {
584 for (const auto &cd : def->getClasses())
585 {
586 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
587 {
588 bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
589 bool isNestedClass = def->definitionType()==Definition::TypeClass;
590 addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
591 addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
592 preventSeparateIndex || cd->isEmbeddedInOuterScope());
593 }
594 }
595 }
596 else if ((kind==LayoutDocEntry::FileConcepts || kind==LayoutDocEntry::ModuleConcepts) && concepts)
597 {
598 for (const auto &cd : *concepts)
599 {
600 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
601 {
602 Doxygen::indexList->addContentsItem(false,cd->displayName(),
603 cd->getReference(),cd->getOutputFileBase(),QCString(),
604 addToIndex,
605 false,
606 cd);
607 }
608 }
609 }
610 }
611
612 Doxygen::indexList->decContentsDepth();
613 }
614}
615
616
617//----------------------------------------------------------------------------
618/*! Generates HTML Help tree of classes */
619
620static void writeClassTreeToOutput(OutputList &ol,const BaseClassList &bcl,int level,FTVHelp* ftv,bool addToIndex,ClassDefSet &visitedClasses)
621{
622 if (bcl.empty()) return;
623 bool started=FALSE;
624 for (const auto &bcd : bcl)
625 {
626 ClassDef *cd=bcd.classDef;
627 if (cd->getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
628 {
629 continue;
630 }
631
632 bool b = cd->getLanguage()==SrcLangExt::VHDL ? classHasVisibleRoot(cd->subClasses()) : classHasVisibleRoot(cd->baseClasses());
633
634 if (cd->isVisibleInHierarchy() && b) // classHasVisibleRoot(cd->baseClasses()))
635 {
636 if (!started)
637 {
638 startIndexHierarchy(ol,level);
639 if (addToIndex)
640 {
641 Doxygen::indexList->incContentsDepth();
642 }
643 if (ftv)
644 {
645 ftv->incContentsDepth();
646 }
647 started=TRUE;
648 }
650 //printf("Passed...\n");
651 bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
653 //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
654 if (cd->isLinkable())
655 {
656 //printf("Writing class %s\n",qPrint(cd->displayName()));
658 ol.parseText(cd->displayName());
660 if (cd->isReference())
661 {
662 ol.startTypewriter();
663 ol.docify(" [external]");
664 ol.endTypewriter();
665 }
666 if (addToIndex)
667 {
668 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor());
669 }
670 if (ftv)
671 {
672 if (cd->getLanguage()==SrcLangExt::VHDL)
673 {
674 ftv->addContentsItem(hasChildren,bcd.usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
675 }
676 else
677 {
678 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
679 }
680 }
681 }
682 else
683 {
685 ol.parseText(cd->name());
687 if (addToIndex)
688 {
689 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString());
690 }
691 if (ftv)
692 {
693 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd);
694 }
695 }
696 if (hasChildren)
697 {
698 //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
699 visitedClasses.insert(cd);
700 if (cd->getLanguage()==SrcLangExt::VHDL)
701 {
702 writeClassTreeToOutput(ol,cd->baseClasses(),level+1,ftv,addToIndex,visitedClasses);
703 }
704 else
705 {
706 writeClassTreeToOutput(ol,cd->subClasses(),level+1,ftv,addToIndex,visitedClasses);
707 }
708 }
709 ol.endIndexListItem();
710 }
711 }
712 if (started)
713 {
714 endIndexHierarchy(ol,level);
715 if (addToIndex)
716 {
717 Doxygen::indexList->decContentsDepth();
718 }
719 if (ftv)
720 {
721 ftv->decContentsDepth();
722 }
723 }
724}
725
726//----------------------------------------------------------------------------
727
728static bool dirHasVisibleChildren(const DirDef *dd)
729{
730 if (dd->hasDocumentation()) return TRUE;
731
732 for (const auto &fd : dd->getFiles())
733 {
734 bool genSourceFile = false;
735 if (fileVisibleInIndex(fd,genSourceFile))
736 {
737 return TRUE;
738 }
739 if (genSourceFile)
740 {
741 return TRUE;
742 }
743 }
744
745 for(const auto &subdd : dd->subDirs())
746 {
747 if (dirHasVisibleChildren(subdd))
748 {
749 return TRUE;
750 }
751 }
752 return FALSE;
753}
754
755//----------------------------------------------------------------------------
756static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp* ftv,bool addToIndex)
757{
758 if (level>20)
759 {
760 warn(dd->getDefFileName(),dd->getDefLine(),
761 "maximum nesting level exceeded for directory {}: "
762 "check for possible recursive directory relation!",dd->name());
763 return;
764 }
765
766 if (!dirHasVisibleChildren(dd))
767 {
768 return;
769 }
770
771 bool tocExpand = TRUE; //Config_getBool(TOC_EXPAND);
772 bool isDir = !dd->subDirs().empty() || // there are subdirs
773 (tocExpand && // or toc expand and
774 !dd->getFiles().empty() // there are files
775 );
776 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
777 if (addToIndex)
778 {
779 Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),QCString(),TRUE,TRUE);
780 Doxygen::indexList->incContentsDepth();
781 }
782 if (ftv)
783 {
784 ftv->addContentsItem(isDir,dd->shortName(),dd->getReference(),
786 ftv->incContentsDepth();
787 }
788
791 ol.parseText(dd->shortName());
793 if (dd->isReference())
794 {
795 ol.startTypewriter();
796 ol.docify(" [external]");
797 ol.endTypewriter();
798 }
799
800 // write sub directories
801 if (dd->subDirs().size()>0)
802 {
803 startIndexHierarchy(ol,level+1);
804 for(const auto &subdd : dd->subDirs())
805 {
806 writeDirTreeNode(ol,subdd,level+1,ftv,addToIndex);
807 }
808 endIndexHierarchy(ol,level+1);
809 }
810
811 int fileCount=0;
812 if (!dd->getFiles().empty())
813 {
814 for (const auto &fd : dd->getFiles())
815 {
816 //bool allExternals = Config_getBool(ALLEXTERNALS);
817 //if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
818 //{
819 // fileCount++;
820 //}
821 bool genSourceFile = false;
822 if (fileVisibleInIndex(fd,genSourceFile))
823 {
824 fileCount++;
825 }
826 else if (genSourceFile)
827 {
828 fileCount++;
829 }
830 }
831 if (fileCount>0)
832 {
833 startIndexHierarchy(ol,level+1);
834 for (const auto &fd : dd->getFiles())
835 {
836 bool src = false;
837 bool doc = fileVisibleInIndex(fd,src);
838 QCString reference;
839 QCString outputBase;
840 if (doc)
841 {
842 reference = fd->getReference();
843 outputBase = fd->getOutputFileBase();
844 }
845 if (doc || src)
846 {
848 ol.startIndexItem(reference,outputBase);
849 ol.parseText(fd->displayName());
850 ol.endIndexItem(reference,outputBase);
851 ol.endIndexListItem();
852 if (ftv && (src || doc))
853 {
855 fd->displayName(),
856 reference,outputBase,
857 QCString(),FALSE,FALSE,fd);
858 }
859 }
860 }
861 endIndexHierarchy(ol,level+1);
862 }
863 }
864
865 if (tocExpand && addToIndex)
866 {
867 // write files of this directory
868 if (fileCount>0)
869 {
870 for (const auto &fd : dd->getFiles())
871 {
872 bool src = false;
873 bool doc = fileVisibleInIndex(fd,src);
874 if (doc)
875 {
876 addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),
877 !fd->isLinkableViaGroup(),FALSE,&fd->getConcepts());
878 }
879 else if (src)
880 {
881 Doxygen::indexList->addContentsItem(
882 FALSE, fd->name(), QCString(),
883 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd);
884 }
885 }
886 }
887 }
888 ol.endIndexListItem();
889
890 if (addToIndex)
891 {
892 Doxygen::indexList->decContentsDepth();
893 }
894 if (ftv)
895 {
896 ftv->decContentsDepth();
897 }
898}
899
900static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
901{
902 if (ftv)
903 {
906 }
908 for (const auto &dd : *Doxygen::dirLinkedMap)
909 {
910 if (dd->getOuterScope()==Doxygen::globalScope)
911 {
912 writeDirTreeNode(ol,dd.get(),0,ftv,addToIndex);
913 }
914 }
915 if (ftv)
916 {
917 for (const auto &fn : *Doxygen::inputNameLinkedMap)
918 {
919 for (const auto &fd : *fn)
920 {
921 if (fd->getDirDef()==nullptr) // top level file
922 {
923 bool src = false;
924 bool doc = fileVisibleInIndex(fd.get(),src);
925 QCString reference, outputBase;
926 if (doc)
927 {
928 reference = fd->getReference();
929 outputBase = fd->getOutputFileBase();
930 }
931 if (doc || src)
932 {
933 ftv->addContentsItem(FALSE,fd->displayName(),
934 reference, outputBase, QCString(),
935 FALSE,FALSE,fd.get());
936 }
937 if (addToIndex)
938 {
939 if (doc)
940 {
941 addMembersToIndex(fd.get(),LayoutDocManager::File,fd->displayName(),QCString(),TRUE,FALSE,&fd->getConcepts());
942 }
943 else if (src)
944 {
945 Doxygen::indexList->addContentsItem(
946 FALSE, fd->displayName(), QCString(),
947 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd.get());
948 }
949 }
950 }
951 }
952 }
953 }
954 endIndexHierarchy(ol,0);
955 if (ftv)
956 {
958 }
959}
960
961
962//----------------------------------------------------------------------------
963
964static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &started,FTVHelp* ftv,bool addToIndex,
965 ClassDef::CompoundType ct,ClassDefSet &visitedClasses)
966{
967 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
968 for (const auto &cd : cl)
969 {
970 //printf("class %s classHasVisibleRoot=%d isVisibleInHierarchy=%d\n",
971 // qPrint(cd->name()),
972 // classHasVisibleRoot(cd->baseClasses()),
973 // cd->isVisibleInHierarchy()
974 // );
975 bool b = false;
976 if (cd->getLanguage()==SrcLangExt::VHDL)
977 {
978 if (VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
979 {
980 continue;
981 }
982 b=!classHasVisibleRoot(cd->subClasses());
983 }
984 else if (sliceOpt && cd->compoundType() != ct)
985 {
986 continue;
987 }
988 else
989 {
990 b=!classHasVisibleRoot(cd->baseClasses());
991 }
992
993 if (b) //filter on root classes
994 {
995 if (cd->isVisibleInHierarchy()) // should it be visible
996 {
997 if (!started)
998 {
1000 if (addToIndex)
1001 {
1002 Doxygen::indexList->incContentsDepth();
1003 }
1004 started=TRUE;
1005 }
1006 ol.startIndexListItem();
1007 bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
1008 classHasVisibleChildren(cd.get());
1009 //printf("list: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
1010 if (cd->isLinkable())
1011 {
1012 //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->isImplicitTemplateinstance()=%d\n",
1013 // qPrint(cd->displayName()),cd->isLinkable(),cd->isLinkableInProject(),cd->isImplicitTemplateInstance());
1014 ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
1015 ol.parseText(cd->displayName());
1016 ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
1017 if (cd->isReference())
1018 {
1019 ol.startTypewriter();
1020 ol.docify(" [external]");
1021 ol.endTypewriter();
1022 }
1023 if (addToIndex)
1024 {
1025 if (cd->getLanguage()!=SrcLangExt::VHDL) // prevents double insertion in Design Unit List
1026 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE);
1027 }
1028 if (ftv)
1029 {
1030 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd.get());
1031 }
1032 }
1033 else
1034 {
1036 ol.parseText(cd->displayName());
1038 if (addToIndex)
1039 {
1040 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE);
1041 }
1042 if (ftv)
1043 {
1044 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd.get());
1045 }
1046 }
1047 if (cd->getLanguage()==SrcLangExt::VHDL && hasChildren)
1048 {
1049 writeClassTreeToOutput(ol,cd->baseClasses(),1,ftv,addToIndex,visitedClasses);
1050 visitedClasses.insert(cd.get());
1051 }
1052 else if (hasChildren)
1053 {
1054 writeClassTreeToOutput(ol,cd->subClasses(),1,ftv,addToIndex,visitedClasses);
1055 visitedClasses.insert(cd.get());
1056 }
1057 ol.endIndexListItem();
1058 }
1059 }
1060 }
1061}
1062
1063static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex,ClassDef::CompoundType ct)
1064{
1065 ClassDefSet visitedClasses;
1066 if (ftv)
1067 {
1068 ol.pushGeneratorState();
1070 }
1071 bool started=FALSE;
1072 writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1073 writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1074 if (started)
1075 {
1076 endIndexHierarchy(ol,0);
1077 if (addToIndex)
1078 {
1079 Doxygen::indexList->decContentsDepth();
1080 }
1081 }
1082 if (ftv)
1083 {
1084 ol.popGeneratorState();
1085 }
1086}
1087
1088//----------------------------------------------------------------------------
1089
1091{
1092 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1093 int count=0;
1094 for (const auto &cd : cl)
1095 {
1096 if (sliceOpt && cd->compoundType() != ct)
1097 {
1098 continue;
1099 }
1100 if (!classHasVisibleRoot(cd->baseClasses())) // filter on root classes
1101 {
1102 if (cd->isVisibleInHierarchy()) // should it be visible
1103 {
1104 if (!cd->subClasses().empty()) // should have sub classes
1105 {
1106 count++;
1107 }
1108 }
1109 }
1110 }
1111 return count;
1112}
1113
1115{
1116 int count=0;
1119 return count;
1120}
1121
1122//----------------------------------------------------------------------------
1123
1125{
1126 if (Index::instance().numHierarchyClasses()==0) return;
1127 ol.pushGeneratorState();
1128 //1.{
1131
1132 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1133 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1134 bool addToIndex = lne==nullptr || lne->visible();
1135
1136 startFile(ol,"hierarchy",QCString(), title, HighlightedItem::ClassHierarchy);
1137 startTitle(ol,QCString());
1138 ol.parseText(title);
1139 endTitle(ol,QCString(),QCString());
1140 ol.startContents();
1141 ol.startTextBlock();
1142
1143 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1144 {
1145 ol.pushGeneratorState();
1149 ol.startParagraph();
1150 ol.startTextLink("inherits",QCString());
1151 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1152 ol.endTextLink();
1153 ol.endParagraph();
1154 ol.popGeneratorState();
1155 }
1156 ol.parseText(lne ? lne->intro() : theTranslator->trClassHierarchyDescription());
1157 ol.endTextBlock();
1158
1159 // ---------------
1160 // Static class hierarchy for Latex/RTF
1161 // ---------------
1162 ol.pushGeneratorState();
1163 //2.{
1165 Doxygen::indexList->disable();
1166
1167 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Class);
1168
1169 Doxygen::indexList->enable();
1170 ol.popGeneratorState();
1171 //2.}
1172
1173 // ---------------
1174 // Dynamic class hierarchical index for HTML
1175 // ---------------
1176 ol.pushGeneratorState();
1177 //2.{
1179
1180 {
1181 if (addToIndex)
1182 {
1183 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"hierarchy",QCString(),TRUE,TRUE);
1184 }
1185 FTVHelp ftv(false);
1186 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Class);
1187 TextStream t;
1189 ol.pushGeneratorState();
1191 ol.writeString(t.str().c_str());
1192 ol.popGeneratorState();
1193 }
1194 ol.popGeneratorState();
1195 //2.}
1196 // ------
1197
1198 endFile(ol);
1199 ol.popGeneratorState();
1200 //1.}
1201}
1202
1203//----------------------------------------------------------------------------
1204
1206{
1207 if (Index::instance().numHierarchyClasses()==0) return;
1209 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1210 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1211 startFile(ol,"inherits",QCString(),title,HighlightedItem::ClassHierarchy,FALSE,"hierarchy");
1212 startTitle(ol,QCString());
1213 ol.parseText(title);
1214 endTitle(ol,QCString(),QCString());
1215 ol.startContents();
1216 ol.startTextBlock();
1217 ol.startParagraph();
1218 ol.startTextLink("hierarchy",QCString());
1219 ol.parseText(theTranslator->trGotoTextualHierarchy());
1220 ol.endTextLink();
1221 ol.endParagraph();
1222 ol.endTextBlock();
1225 endFile(ol);
1226 ol.enableAll();
1227}
1228
1229//----------------------------------------------------------------------------
1230
1232{
1233 if (Index::instance().numHierarchyInterfaces()==0) return;
1234 ol.pushGeneratorState();
1235 //1.{
1237
1238 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1239 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1240 bool addToIndex = lne==nullptr || lne->visible();
1241
1242 startFile(ol,"interfacehierarchy",QCString(), title, HighlightedItem::InterfaceHierarchy);
1243 startTitle(ol,QCString());
1244 ol.parseText(title);
1245 endTitle(ol,QCString(),QCString());
1246 ol.startContents();
1247 ol.startTextBlock();
1248
1249 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1250 {
1253 ol.startParagraph();
1254 ol.startTextLink("interfaceinherits",QCString());
1255 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1256 ol.endTextLink();
1257 ol.endParagraph();
1260 }
1261 ol.parseText(lne ? lne->intro() : theTranslator->trInterfaceHierarchyDescription());
1262 ol.endTextBlock();
1263
1264 // ---------------
1265 // Static interface hierarchy for Latex/RTF
1266 // ---------------
1267 ol.pushGeneratorState();
1268 //2.{
1270 Doxygen::indexList->disable();
1271
1272 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Interface);
1273
1274 Doxygen::indexList->enable();
1275 ol.popGeneratorState();
1276 //2.}
1277
1278 // ---------------
1279 // Dynamic interface hierarchical index for HTML
1280 // ---------------
1281 ol.pushGeneratorState();
1282 //2.{
1284
1285 {
1286 if (addToIndex)
1287 {
1288 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"interfacehierarchy",QCString(),TRUE,TRUE);
1289 }
1290 FTVHelp ftv(false);
1291 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Interface);
1292 TextStream t;
1294 ol.pushGeneratorState();
1296 ol.writeString(t.str().c_str());
1297 ol.popGeneratorState();
1298 }
1299 ol.popGeneratorState();
1300 //2.}
1301 // ------
1302
1303 endFile(ol);
1304 ol.popGeneratorState();
1305 //1.}
1306}
1307
1308//----------------------------------------------------------------------------
1309
1311{
1312 if (Index::instance().numHierarchyInterfaces()==0) return;
1314 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1315 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1316 startFile(ol,"interfaceinherits",QCString(),title,HighlightedItem::InterfaceHierarchy,FALSE,"interfacehierarchy");
1317 startTitle(ol,QCString());
1318 ol.parseText(title);
1319 endTitle(ol,QCString(),QCString());
1320 ol.startContents();
1321 ol.startTextBlock();
1322 ol.startParagraph();
1323 ol.startTextLink("interfacehierarchy",QCString());
1324 ol.parseText(theTranslator->trGotoTextualHierarchy());
1325 ol.endTextLink();
1326 ol.endParagraph();
1327 ol.endTextBlock();
1330 endFile(ol);
1331 ol.enableAll();
1332}
1333
1334//----------------------------------------------------------------------------
1335
1337{
1338 if (Index::instance().numHierarchyExceptions()==0) return;
1339 ol.pushGeneratorState();
1340 //1.{
1342
1343 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1344 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1345 bool addToIndex = lne==nullptr || lne->visible();
1346
1347 startFile(ol,"exceptionhierarchy",QCString(), title, HighlightedItem::ExceptionHierarchy);
1348 startTitle(ol,QCString());
1349 ol.parseText(title);
1350 endTitle(ol,QCString(),QCString());
1351 ol.startContents();
1352 ol.startTextBlock();
1353
1354 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1355 {
1358 ol.startParagraph();
1359 ol.startTextLink("exceptioninherits",QCString());
1360 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1361 ol.endTextLink();
1362 ol.endParagraph();
1365 }
1366 ol.parseText(lne ? lne->intro() : theTranslator->trExceptionHierarchyDescription());
1367 ol.endTextBlock();
1368
1369 // ---------------
1370 // Static exception hierarchy for Latex/RTF
1371 // ---------------
1372 ol.pushGeneratorState();
1373 //2.{
1375 Doxygen::indexList->disable();
1376
1377 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Exception);
1378
1379 Doxygen::indexList->enable();
1380 ol.popGeneratorState();
1381 //2.}
1382
1383 // ---------------
1384 // Dynamic exception hierarchical index for HTML
1385 // ---------------
1386 ol.pushGeneratorState();
1387 //2.{
1389
1390 {
1391 if (addToIndex)
1392 {
1393 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"exceptionhierarchy",QCString(),TRUE,TRUE);
1394 }
1395 FTVHelp ftv(false);
1396 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Exception);
1397 TextStream t;
1399 ol.pushGeneratorState();
1401 ol.writeString(t.str().c_str());
1402 ol.popGeneratorState();
1403 }
1404 ol.popGeneratorState();
1405 //2.}
1406 // ------
1407
1408 endFile(ol);
1409 ol.popGeneratorState();
1410 //1.}
1411}
1412
1413//----------------------------------------------------------------------------
1414
1416{
1417 if (Index::instance().numHierarchyExceptions()==0) return;
1419 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1420 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1421 startFile(ol,"exceptioninherits",QCString(),title,HighlightedItem::ExceptionHierarchy,FALSE,"exceptionhierarchy");
1422 startTitle(ol,QCString());
1423 ol.parseText(title);
1424 endTitle(ol,QCString(),QCString());
1425 ol.startContents();
1426 ol.startTextBlock();
1427 ol.startParagraph();
1428 ol.startTextLink("exceptionhierarchy",QCString());
1429 ol.parseText(theTranslator->trGotoTextualHierarchy());
1430 ol.endTextLink();
1431 ol.endParagraph();
1432 ol.endTextBlock();
1435 endFile(ol);
1436 ol.enableAll();
1437}
1438
1439//----------------------------------------------------------------------------
1440
1441static void countFiles(int &allFiles,int &docFiles)
1442{
1443 allFiles=0;
1444 docFiles=0;
1445 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1446 {
1447 for (const auto &fd: *fn)
1448 {
1449 bool src = false;
1450 bool doc = fileVisibleInIndex(fd.get(),src);
1451 if (doc || src)
1452 {
1453 allFiles++;
1454 }
1455 if (doc)
1456 {
1457 docFiles++;
1458 }
1459 }
1460 }
1461}
1462
1463static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
1464{
1465 //printf("Found filedef %s\n",qPrint(fd->name()));
1466 bool doc = fd->isLinkableInProject();
1467 bool src = fd->generateSourceFile();
1468 bool nameOk = !fd->isDocumentationFile();
1469 if (nameOk && (doc || src) && !fd->isReference())
1470 {
1471 QCString path;
1472 if (Config_getBool(FULL_PATH_NAMES))
1473 {
1474 path=stripFromPath(fd->getPath());
1475 }
1476 QCString fullName=fd->name();
1477 if (!path.isEmpty())
1478 {
1479 if (path.at(path.length()-1)!='/') fullName.prepend("/");
1480 fullName.prepend(path);
1481 }
1482
1483 ol.startIndexKey();
1484 ol.docify(path);
1485 if (doc)
1486 {
1488 //if (addToIndex)
1489 //{
1490 // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1491 //}
1492 }
1493 else if (src)
1494 {
1496 }
1497 if (doc && src)
1498 {
1499 ol.pushGeneratorState();
1501 ol.docify(" ");
1503 ol.docify("[");
1504 ol.parseText(theTranslator->trCode());
1505 ol.docify("]");
1506 ol.endTextLink();
1507 ol.popGeneratorState();
1508 }
1509 ol.endIndexKey();
1510 bool hasBrief = !fd->briefDescription().isEmpty();
1511 ol.startIndexValue(hasBrief);
1512 if (hasBrief)
1513 {
1514 //ol.docify(" (");
1515 ol.generateDoc(
1516 fd->briefFile(),fd->briefLine(),
1517 fd,nullptr,
1519 FALSE, // index words
1520 FALSE, // isExample
1521 QCString(), // example name
1522 TRUE, // single line
1523 TRUE // link from index
1524 );
1525 //ol.docify(")");
1526 }
1527 if (doc)
1528 {
1529 ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1530 }
1531 else // src
1532 {
1533 ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1534 }
1535 //ol.popGeneratorState();
1536 // --------------------------------------------------------
1537 }
1538}
1539//----------------------------------------------------------------------------
1540
1542{
1543 if (Index::instance().numDocumentedDirs()==0) return;
1544 ol.pushGeneratorState();
1546
1547 QCString title = theTranslator->trDirectories();
1548 startFile(ol,"dirs",QCString(),title,HighlightedItem::Files);
1549 startTitle(ol,title);
1550 ol.parseText(title);
1551 endTitle(ol,QCString(),QCString());
1552
1553 ol.startIndexList();
1554 for (const auto &dir : *Doxygen::dirLinkedMap)
1555 {
1556 if (dir->hasDocumentation())
1557 {
1558 writeDirTreeNode(ol, dir.get(), 1, nullptr, false);
1559 }
1560 }
1561
1562 ol.endIndexList();
1563
1564 endFile(ol);
1565 ol.popGeneratorState();
1566}
1567
1568//----------------------------------------------------------------------------
1569
1571{
1572 if (Index::instance().numDocumentedFiles()==0 || !Config_getBool(SHOW_FILES)) return;
1573
1574 ol.pushGeneratorState();
1577
1578 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileList);
1579 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files); // fall back
1580 QCString title = lne ? lne->title() : theTranslator->trFileList();
1581 bool addToIndex = lne==nullptr || lne->visible();
1582
1583 startFile(ol,"files",QCString(),title,HighlightedItem::Files);
1584 startTitle(ol,QCString());
1585 //if (!Config_getString(PROJECT_NAME).isEmpty())
1586 //{
1587 // title.prepend(Config_getString(PROJECT_NAME)+" ");
1588 //}
1589 ol.parseText(title);
1590 endTitle(ol,QCString(),QCString());
1591 ol.startContents();
1592 ol.startTextBlock();
1593
1594 if (addToIndex)
1595 {
1596 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"files",QCString(),TRUE,TRUE);
1597 Doxygen::indexList->incContentsDepth();
1598 }
1599
1600 ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool(EXTRACT_ALL)));
1601 ol.endTextBlock();
1602
1603 // ---------------
1604 // Flat file index
1605 // ---------------
1606
1607 // 1. {
1608 ol.pushGeneratorState();
1610
1611 ol.startIndexList();
1612 if (Config_getBool(FULL_PATH_NAMES))
1613 {
1614 std::unordered_map<std::string,size_t> pathMap;
1615 std::vector<FilesInDir> outputFiles;
1616
1617 // re-sort input files in (dir,file) output order instead of (file,dir) input order
1618 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1619 {
1620 for (const auto &fd : *fn)
1621 {
1622 QCString path=fd->getPath();
1623 if (path.isEmpty()) path="[external]";
1624 auto it = pathMap.find(path.str());
1625 if (it!=pathMap.end()) // existing path -> append
1626 {
1627 outputFiles.at(it->second).files.push_back(fd.get());
1628 }
1629 else // new path -> create path entry + append
1630 {
1631 pathMap.emplace(path.str(),outputFiles.size());
1632 outputFiles.emplace_back(path);
1633 outputFiles.back().files.push_back(fd.get());
1634 }
1635 }
1636 }
1637
1638 // sort the files by path
1639 std::stable_sort(outputFiles.begin(),
1640 outputFiles.end(),
1641 [](const auto &fp1,const auto &fp2) { return qstricmp_sort(fp1.path,fp2.path)<0; });
1642 // sort the files inside the directory by name
1643 for (auto &fp : outputFiles)
1644 {
1645 std::stable_sort(fp.files.begin(), fp.files.end(), compareFileDefs);
1646 }
1647 // write the results
1648 for (const auto &fp : outputFiles)
1649 {
1650 for (const auto &fd : fp.files)
1651 {
1652 writeSingleFileIndex(ol,fd);
1653 }
1654 }
1655 }
1656 else
1657 {
1658 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1659 {
1660 for (const auto &fd : *fn)
1661 {
1662 writeSingleFileIndex(ol,fd.get());
1663 }
1664 }
1665 }
1666 ol.endIndexList();
1667
1668 // 1. }
1669 ol.popGeneratorState();
1670
1671 // ---------------
1672 // Hierarchical file index for HTML
1673 // ---------------
1674 ol.pushGeneratorState();
1676
1677 {
1678 FTVHelp ftv(false);
1679 writeDirHierarchy(ol,&ftv,addToIndex);
1680 TextStream t;
1682 ol.writeString(t.str().c_str());
1683 }
1684
1685 ol.popGeneratorState();
1686 // ------
1687
1688 if (addToIndex)
1689 {
1690 Doxygen::indexList->decContentsDepth();
1691 }
1692
1693 endFile(ol);
1694 ol.popGeneratorState();
1695}
1696
1697//----------------------------------------------------------------------------
1699{
1700 int count=0;
1701 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1702 {
1703 if (nd->isLinkableInProject()) count++;
1704 }
1705 return count;
1706}
1707
1708//----------------------------------------------------------------------------
1709static int countConcepts()
1710{
1711 int count=0;
1712 for (const auto &cd : *Doxygen::conceptLinkedMap)
1713 {
1714 if (cd->isLinkableInProject()) count++;
1715 }
1716 return count;
1717}
1718
1719
1720//----------------------------------------------------------------------------
1721template<typename Ptr> const ClassDef *get_pointer(const Ptr &p);
1722template<> const ClassDef *get_pointer(const ClassLinkedMap::Ptr &p) { return p.get(); }
1723template<> const ClassDef *get_pointer(const ClassLinkedRefMap::Ptr &p) { return p; }
1724
1725template<class ListType>
1726static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool globalOnly,ClassDef::CompoundType ct)
1727{
1728 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1729 for (const auto &cdi : cl)
1730 {
1731 const ClassDef *cd = get_pointer(cdi);
1732 if (cd->getLanguage()==SrcLangExt::VHDL)
1733 {
1736 )// no architecture
1737 {
1738 continue;
1739 }
1740 }
1741
1742 if (sliceOpt && cd->compoundType() != ct)
1743 {
1744 continue;
1745 }
1746
1747 if (!globalOnly ||
1748 cd->getOuterScope()==nullptr ||
1750 )
1751 {
1752 int count=0;
1753 for (const auto &ccd : cd->getClasses())
1754 {
1755 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1756 {
1757 count++;
1758 }
1759 }
1761 {
1762 if (ftv)
1763 {
1764 ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
1765 cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
1766 }
1767 if (addToIndex &&
1768 (cd->getOuterScope()==nullptr ||
1770 )
1771 )
1772 {
1773 addMembersToIndex(cd,LayoutDocManager::Class,
1774 cd->displayName(FALSE),
1775 cd->anchor(),
1776 cd->partOfGroups().empty() && !cd->isSimple());
1777 }
1778 if (count>0)
1779 {
1780 if (ftv) ftv->incContentsDepth();
1781 writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1782 if (ftv) ftv->decContentsDepth();
1783 }
1784 }
1785 }
1786 }
1787}
1788
1789static void writeNamespaceMembers(const NamespaceDef *nd,bool addToIndex)
1790{
1791 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1792 {
1793 if (lde->kind()==LayoutDocEntry::MemberDef)
1794 {
1795 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1796 if (lmd)
1797 {
1798 MemberList *ml = nd->getMemberList(lmd->type);
1799 if (ml)
1800 {
1801 for (const auto &md : *ml)
1802 {
1803 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1804 if (md->visibleInIndex())
1805 {
1806 writeMemberToIndex(nd,md,addToIndex);
1807 }
1808 }
1809 }
1810 }
1811 }
1812 }
1813}
1814
1815static void writeModuleMembers(const ModuleDef *mod,bool addToIndex)
1816{
1817 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Module))
1818 {
1819 if (lde->kind()==LayoutDocEntry::MemberDecl)
1820 {
1821 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1822 if (lmd)
1823 {
1824 MemberList *ml = mod->getMemberList(lmd->type);
1825 if (ml)
1826 {
1827 for (const auto &md : *ml)
1828 {
1829 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1830 if (md->visibleInIndex())
1831 {
1832 writeMemberToIndex(mod,md,addToIndex);
1833 }
1834 }
1835 }
1836 }
1837 }
1838 }
1839}
1840
1841
1842static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex);
1843static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1844 bool rootOnly,bool addToIndex);
1845
1847 bool rootOnly,bool addToIndex)
1848{
1849 if (!nd->isAnonymous() &&
1850 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1851 {
1852
1853 bool hasNestedNamespace = namespaceHasNestedNamespace(nd);
1854 bool hasChildren = hasNestedNamespace ||
1857 bool isLinkable = nd->isLinkable();
1858 int visibleMembers = nd->countVisibleMembers();
1859
1860 //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
1861
1862 QCString ref;
1863 QCString file;
1864 if (isLinkable)
1865 {
1866 ref = nd->getReference();
1867 file = nd->getOutputFileBase();
1868 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1869 {
1870 file=file.replace(0,qstrlen("namespace"),"class");
1871 }
1872 }
1873
1874 bool isDir = hasChildren || visibleMembers>0;
1875 if (isLinkable || isDir)
1876 {
1877 ftv->addContentsItem(hasNestedNamespace,nd->localName(),ref,file,QCString(),FALSE,nd->partOfGroups().empty(),nd);
1878
1879 if (addToIndex)
1880 {
1881 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1882 hasChildren && !file.isEmpty(),nd->partOfGroups().empty());
1883 }
1884 if (addToIndex && isDir)
1885 {
1886 Doxygen::indexList->incContentsDepth();
1887 }
1888
1889 if (isDir)
1890 {
1891 ftv->incContentsDepth();
1892 writeNamespaceTree(nd->getNamespaces(),ftv,FALSE,addToIndex);
1893 writeClassTree(nd->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
1894 writeConceptList(nd->getConcepts(),nullptr,addToIndex);
1895 writeNamespaceMembers(nd,addToIndex);
1896 ftv->decContentsDepth();
1897 }
1898 if (addToIndex && isDir)
1899 {
1900 Doxygen::indexList->decContentsDepth();
1901 }
1902 }
1903 }
1904}
1905
1906static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1907 bool rootOnly,bool addToIndex)
1908{
1909 for (const auto &nd : nsLinkedMap)
1910 {
1911 if (nd->isVisibleInHierarchy())
1912 {
1913 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1914 }
1915 }
1916}
1917
1918static void writeNamespaceTree(const NamespaceLinkedMap &nsLinkedMap,FTVHelp *ftv,
1919 bool rootOnly,bool addToIndex)
1920{
1921 for (const auto &nd : nsLinkedMap)
1922 {
1923 if (nd->isVisibleInHierarchy())
1924 {
1925 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1926 }
1927 }
1928}
1929
1930static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1931 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct);
1932
1934 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1935{
1936 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1937 if (!nd->isAnonymous() &&
1938 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1939 {
1940 bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
1941 bool isLinkable = nd->isLinkableInProject();
1942
1943 //printf("writeClassTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
1944
1945 QCString ref;
1946 QCString file;
1947 if (isLinkable)
1948 {
1949 ref = nd->getReference();
1950 file = nd->getOutputFileBase();
1951 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1952 {
1953 file=file.replace(0,qstrlen("namespace"),"class");
1954 }
1955 }
1956
1957 if (isDir)
1958 {
1959 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
1960
1961 if (addToIndex)
1962 {
1963 // the namespace entry is already shown under the namespace list so don't
1964 // add it to the nav index and don't create a separate index file for it otherwise
1965 // it will overwrite the one written for the namespace list.
1966 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1967 false, // separateIndex
1968 false // addToNavIndex
1969 );
1970 }
1971 if (addToIndex)
1972 {
1973 Doxygen::indexList->incContentsDepth();
1974 }
1975
1976 ftv->incContentsDepth();
1977 writeClassTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex,ct);
1978 ClassLinkedRefMap d = nd->getClasses();
1979 if (sliceOpt)
1980 {
1981 if (ct == ClassDef::Interface)
1982 {
1983 d = nd->getInterfaces();
1984 }
1985 else if (ct == ClassDef::Struct)
1986 {
1987 d = nd->getStructs();
1988 }
1989 else if (ct == ClassDef::Exception)
1990 {
1991 d = nd->getExceptions();
1992 }
1993 }
1994 writeClassTree(d,ftv,addToIndex,FALSE,ct);
1995 ftv->decContentsDepth();
1996
1997 if (addToIndex)
1998 {
1999 Doxygen::indexList->decContentsDepth();
2000 }
2001 }
2002 }
2003}
2004
2006 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
2007{
2008 for (const auto &nd : nsLinkedMap)
2009 {
2010 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
2011 }
2012}
2013
2015 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
2016{
2017 for (const auto &nd : nsLinkedMap)
2018 {
2019 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
2020 }
2021}
2022
2024{
2025 if (Index::instance().numDocumentedNamespaces()==0) return;
2026 ol.pushGeneratorState();
2029 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceList);
2030 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
2031 QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
2032 bool addToIndex = lne==nullptr || lne->visible();
2033 startFile(ol,"namespaces",QCString(),title,HighlightedItem::Namespaces);
2034 startTitle(ol,QCString());
2035 ol.parseText(title);
2036 endTitle(ol,QCString(),QCString());
2037 ol.startContents();
2038 ol.startTextBlock();
2039 ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
2040 ol.endTextBlock();
2041
2042 bool first=TRUE;
2043
2044 // ---------------
2045 // Linear namespace index for Latex/RTF
2046 // ---------------
2047 ol.pushGeneratorState();
2049
2050 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2051 {
2052 if (nd->isLinkableInProject())
2053 {
2054 if (first)
2055 {
2056 ol.startIndexList();
2057 first=FALSE;
2058 }
2059 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
2060 ol.startIndexKey();
2061 if (nd->getLanguage()==SrcLangExt::VHDL)
2062 {
2063 ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
2064 }
2065 else
2066 {
2067 ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
2068 }
2069 ol.endIndexKey();
2070
2071 bool hasBrief = !nd->briefDescription().isEmpty();
2072 ol.startIndexValue(hasBrief);
2073 if (hasBrief)
2074 {
2075 //ol.docify(" (");
2076 ol.generateDoc(
2077 nd->briefFile(),nd->briefLine(),
2078 nd.get(),nullptr,
2079 nd->briefDescription(TRUE),
2080 FALSE, // index words
2081 FALSE, // isExample
2082 QCString(), // example name
2083 TRUE, // single line
2084 TRUE // link from index
2085 );
2086 //ol.docify(")");
2087 }
2088 ol.endIndexValue(nd->getOutputFileBase(),hasBrief);
2089
2090 }
2091 }
2092 if (!first) ol.endIndexList();
2093
2094 ol.popGeneratorState();
2095
2096 // ---------------
2097 // Hierarchical namespace index for HTML
2098 // ---------------
2099 ol.pushGeneratorState();
2101
2102 {
2103 if (addToIndex)
2104 {
2105 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"namespaces",QCString(),TRUE,TRUE);
2106 Doxygen::indexList->incContentsDepth();
2107 }
2108 FTVHelp ftv(false);
2110 TextStream t;
2112 ol.writeString(t.str().c_str());
2113 if (addToIndex)
2114 {
2115 Doxygen::indexList->decContentsDepth();
2116 }
2117 }
2118
2119 ol.popGeneratorState();
2120 // ------
2121
2122 endFile(ol);
2123 ol.popGeneratorState();
2124}
2125
2126//----------------------------------------------------------------------------
2127
2129{
2130 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2131 int count=0;
2132 int countPrinted=0;
2133 for (const auto &cd : *Doxygen::classLinkedMap)
2134 {
2135 if (sliceOpt && cd->compoundType() != ct)
2136 {
2137 continue;
2138 }
2139 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2140 {
2141 if (!cd->isEmbeddedInOuterScope())
2142 {
2143 countPrinted++;
2144 }
2145 count++;
2146 }
2147 }
2148 *cp = countPrinted;
2149 return count;
2150}
2151
2152
2154{
2155 //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
2156 //bool addToIndex = lne==nullptr || lne->visible();
2157 bool first=TRUE;
2158
2159 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2160
2161 for (const auto &cd : *Doxygen::classLinkedMap)
2162 {
2163 if (cd->getLanguage()==SrcLangExt::VHDL &&
2164 (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
2166 ) // no architecture
2167 {
2168 continue;
2169 }
2170 if (first)
2171 {
2172 ol.startIndexList();
2173 first=FALSE;
2174 }
2175
2176 if (sliceOpt && cd->compoundType() != ct)
2177 {
2178 continue;
2179 }
2180
2181 ol.pushGeneratorState();
2182 if (cd->isEmbeddedInOuterScope())
2183 {
2187 }
2188 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2189 {
2190 ol.startIndexKey();
2191 if (cd->getLanguage()==SrcLangExt::VHDL)
2192 {
2194 ol.docify(prot);
2195 ol.writeString(" ");
2196 }
2197 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
2198 ol.endIndexKey();
2199 bool hasBrief = !cd->briefDescription().isEmpty();
2200 ol.startIndexValue(hasBrief);
2201 if (hasBrief)
2202 {
2203 ol.generateDoc(
2204 cd->briefFile(),cd->briefLine(),
2205 cd.get(),nullptr,
2206 cd->briefDescription(TRUE),
2207 FALSE, // indexWords
2208 FALSE, // isExample
2209 QCString(), // example name
2210 TRUE, // single line
2211 TRUE // link from index
2212 );
2213 }
2214 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2215
2216 //if (addToIndex)
2217 //{
2218 // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2219 //}
2220 }
2221 ol.popGeneratorState();
2222 }
2223 if (!first) ol.endIndexList();
2224}
2225
2226inline bool isId1(int c)
2227{
2228 return (c<127 && c>31); // printable ASCII character
2229}
2230
2231static QCString letterToLabel(const QCString &startLetter)
2232{
2233 if (startLetter.isEmpty()) return startLetter;
2234 const char *p = startLetter.data();
2235 char c = *p;
2236 QCString result;
2237 if (isId1(c))
2238 {
2239 result+=c;
2240 }
2241 else
2242 {
2243 result="0x";
2244 const char hex[]="0123456789abcdef";
2245 while ((c=*p++))
2246 {
2247 result+=hex[static_cast<unsigned char>(c)>>4];
2248 result+=hex[static_cast<unsigned char>(c)&0xf];
2249 }
2250 }
2251 return result;
2252}
2253
2254//----------------------------------------------------------------------------
2255
2256/** Class representing a cell in the alphabetical class index. */
2258{
2259 public:
2260 AlphaIndexTableCell(int row,int col,const std::string &letter,const ClassDef *cd) :
2261 m_letter(letter), m_class(cd), m_row(row), m_col(col)
2262 {
2263 }
2264
2265 const ClassDef *classDef() const { return m_class; }
2266 std::string letter() const { return m_letter; }
2267 int row() const { return m_row; }
2268 int column() const { return m_col; }
2269
2270 private:
2271 std::string m_letter;
2275};
2276
2277using UsedIndexLetters = std::set<std::string>;
2278
2279// write an alphabetical index of all class with a header for each letter
2280static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int /* annotatedCount */)
2281{
2282 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2283
2284 // What starting letters are used
2285 UsedIndexLetters indexLettersUsed;
2286
2287 // first count the number of headers
2288 for (const auto &cd : *Doxygen::classLinkedMap)
2289 {
2290 if (sliceOpt && cd->compoundType() != ct)
2291 continue;
2292 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2293 {
2294 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2295 continue;
2296
2297 // get the first UTF8 character (after the part that should be ignored)
2298 int index = getPrefixIndex(cd->className());
2299 std::string letter = getUTF8CharAt(cd->className().str(),index);
2300 if (!letter.empty())
2301 {
2302 indexLettersUsed.insert(convertUTF8ToUpper(letter));
2303 }
2304 }
2305 }
2306
2307 // write quick link index (row of letters)
2308 QCString alphaLinks = "<div class=\"qindex\">";
2309 bool first=true;
2310 for (const auto &letter : indexLettersUsed)
2311 {
2312 if (!first) alphaLinks += "&#160;|&#160;";
2313 first=false;
2314 QCString li = letterToLabel(letter.c_str());
2315 alphaLinks += "<a class=\"qindex\" href=\"#letter_" +
2316 li + "\">" +
2317 QCString(letter) + "</a>";
2318 }
2319 alphaLinks += "</div>\n";
2320 ol.writeString(alphaLinks);
2321
2322 std::map<std::string, std::vector<const ClassDef*> > classesByLetter;
2323
2324 // fill the columns with the class list (row elements in each column,
2325 // expect for the columns with number >= itemsInLastRow, which get one
2326 // item less.
2327 for (const auto &cd : *Doxygen::classLinkedMap)
2328 {
2329 if (sliceOpt && cd->compoundType() != ct)
2330 continue;
2331 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2332 continue;
2333
2334 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2335 {
2336 QCString className = cd->className();
2337 int index = getPrefixIndex(className);
2338 std::string letter = getUTF8CharAt(className.str(),index);
2339 if (!letter.empty())
2340 {
2341 letter = convertUTF8ToUpper(letter);
2342 auto it = classesByLetter.find(letter);
2343 if (it!=classesByLetter.end()) // add class to the existing list
2344 {
2345 it->second.push_back(cd.get());
2346 }
2347 else // new entry
2348 {
2349 classesByLetter.emplace(letter, std::vector<const ClassDef*>({ cd.get() }));
2350 }
2351 }
2352 }
2353 }
2354
2355 // sort the class lists per letter while ignoring the prefix
2356 for (auto &[letter,list] : classesByLetter)
2357 {
2358 std::stable_sort(list.begin(), list.end(),
2359 [](const auto &c1,const auto &c2)
2360 {
2361 QCString n1 = c1->className();
2362 QCString n2 = c2->className();
2363 return qstricmp_sort(n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2))<0;
2364 });
2365 }
2366
2367 // generate table
2368 if (!classesByLetter.empty())
2369 {
2370 ol.writeString("<div class=\"classindex\">\n");
2371 int counter=0;
2372 for (const auto &cl : classesByLetter)
2373 {
2374 QCString parity = (counter++%2)==0 ? "even" : "odd";
2375 ol.writeString("<dl class=\"classindex " + parity + "\">\n");
2376
2377 // write character heading
2378 ol.writeString("<dt class=\"alphachar\">");
2379 QCString s = letterToLabel(cl.first.c_str());
2380 ol.writeString("<a id=\"letter_");
2381 ol.writeString(s);
2382 ol.writeString("\" name=\"letter_");
2383 ol.writeString(s);
2384 ol.writeString("\">");
2385 ol.writeString(cl.first.c_str());
2386 ol.writeString("</a>");
2387 ol.writeString("</dt>\n");
2388
2389 // write class links
2390 for (const auto &cd : cl.second)
2391 {
2392 ol.writeString("<dd>");
2393 QCString namesp,cname;
2394 extractNamespaceName(cd->name(),cname,namesp);
2395 QCString nsDispName;
2396 SrcLangExt lang = cd->getLanguage();
2398 if (sep!="::")
2399 {
2400 nsDispName=substitute(namesp,"::",sep);
2401 cname=substitute(cname,"::",sep);
2402 }
2403 else
2404 {
2405 nsDispName=namesp;
2406 }
2407
2408 ol.writeObjectLink(cd->getReference(),
2409 cd->getOutputFileBase(),cd->anchor(),cname);
2410 if (!namesp.isEmpty())
2411 {
2412 ol.writeString(" (");
2413 NamespaceDef *nd = getResolvedNamespace(namesp);
2414 if (nd && nd->isLinkable())
2415 {
2417 nd->getOutputFileBase(),QCString(),nsDispName);
2418 }
2419 else
2420 {
2421 ol.docify(nsDispName);
2422 }
2423 ol.writeString(")");
2424 }
2425 ol.writeString("</dd>");
2426 }
2427
2428 ol.writeString("</dl>\n");
2429 }
2430 ol.writeString("</div>\n");
2431 }
2432}
2433
2434//----------------------------------------------------------------------------
2435
2437{
2438 if (Index::instance().numAnnotatedClasses()==0) return;
2439 ol.pushGeneratorState();
2441 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassIndex);
2442 QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
2443 bool addToIndex = lne==nullptr || lne->visible();
2444
2445 startFile(ol,"classes",QCString(),title,HighlightedItem::Classes);
2446
2447 startTitle(ol,QCString());
2448 ol.parseText(title);
2449 endTitle(ol,QCString(),QCString());
2450
2451 if (addToIndex)
2452 {
2453 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"classes",QCString(),FALSE,TRUE);
2454 }
2455
2456 ol.startContents();
2457 writeAlphabeticalClassList(ol, ClassDef::Class, Index::instance().numAnnotatedClasses());
2458 endFile(ol); // contains ol.endContents()
2459
2460 ol.popGeneratorState();
2461}
2462
2463//----------------------------------------------------------------------------
2464
2466{
2467 if (Index::instance().numAnnotatedInterfaces()==0) return;
2468 ol.pushGeneratorState();
2470 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex);
2471 QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2472 bool addToIndex = lne==nullptr || lne->visible();
2473
2474 startFile(ol,"interfaces",QCString(),title,HighlightedItem::Interfaces);
2475
2476 startTitle(ol,QCString());
2477 ol.parseText(title);
2478 endTitle(ol,QCString(),QCString());
2479
2480 if (addToIndex)
2481 {
2482 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"interfaces",QCString(),FALSE,TRUE);
2483 }
2484
2485 ol.startContents();
2486 writeAlphabeticalClassList(ol, ClassDef::Interface, Index::instance().numAnnotatedInterfaces());
2487 endFile(ol); // contains ol.endContents()
2488
2489 ol.popGeneratorState();
2490}
2491
2492//----------------------------------------------------------------------------
2493
2495{
2496 if (Index::instance().numAnnotatedStructs()==0) return;
2497 ol.pushGeneratorState();
2499 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex);
2500 QCString title = lne ? lne->title() : theTranslator->trStructIndex();
2501 bool addToIndex = lne==nullptr || lne->visible();
2502
2503 startFile(ol,"structs",QCString(),title,HighlightedItem::Structs);
2504
2505 startTitle(ol,QCString());
2506 ol.parseText(title);
2507 endTitle(ol,QCString(),QCString());
2508
2509 if (addToIndex)
2510 {
2511 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"structs",QCString(),FALSE,TRUE);
2512 }
2513
2514 ol.startContents();
2515 writeAlphabeticalClassList(ol, ClassDef::Struct, Index::instance().numAnnotatedStructs());
2516 endFile(ol); // contains ol.endContents()
2517
2518 ol.popGeneratorState();
2519}
2520
2521//----------------------------------------------------------------------------
2522
2524{
2525 if (Index::instance().numAnnotatedExceptions()==0) return;
2526 ol.pushGeneratorState();
2528 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2529 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2530 bool addToIndex = lne==nullptr || lne->visible();
2531
2532 startFile(ol,"exceptions",QCString(),title,HighlightedItem::Exceptions);
2533
2534 startTitle(ol,QCString());
2535 ol.parseText(title);
2536 endTitle(ol,QCString(),QCString());
2537
2538 if (addToIndex)
2539 {
2540 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2541 }
2542
2543 ol.startContents();
2544 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2545 endFile(ol); // contains ol.endContents()
2546
2547 ol.popGeneratorState();
2548}
2549
2550//----------------------------------------------------------------------------
2551
2576
2578{
2579 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2580 // annotatedClasses,annotatedClassesPrinted);
2581 if (ctx.numAnnotated==0) return;
2582
2583 ol.pushGeneratorState();
2585 if (ctx.numPrinted==0)
2586 {
2589 }
2591 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2592 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2593 bool addToIndex = lne==nullptr || lne->visible();
2594
2595 startFile(ol,ctx.fileBaseName,QCString(),title,ctx.hiItem);
2596
2597 startTitle(ol,QCString());
2598 ol.parseText(title);
2599 endTitle(ol,QCString(),QCString());
2600
2601 ol.startContents();
2602
2603 ol.startTextBlock();
2604 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2605 ol.endTextBlock();
2606
2607 // ---------------
2608 // Linear class index for Latex/RTF
2609 // ---------------
2610 ol.pushGeneratorState();
2612 Doxygen::indexList->disable();
2613
2615
2616 Doxygen::indexList->enable();
2617 ol.popGeneratorState();
2618
2619 // ---------------
2620 // Hierarchical class index for HTML
2621 // ---------------
2622 ol.pushGeneratorState();
2624
2625 {
2626 if (addToIndex)
2627 {
2628 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2629 Doxygen::indexList->incContentsDepth();
2630 }
2631 FTVHelp ftv(false);
2634 TextStream t;
2636 ol.writeString(t.str().c_str());
2637 if (addToIndex)
2638 {
2639 Doxygen::indexList->decContentsDepth();
2640 }
2641 }
2642
2643 ol.popGeneratorState();
2644 // ------
2645
2646 endFile(ol); // contains ol.endContents()
2647 ol.popGeneratorState();
2648}
2649
2650//----------------------------------------------------------------------------
2651
2653{
2654 const auto &index = Index::instance();
2656 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2657 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2658 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2660 "annotated",
2662}
2663
2664//----------------------------------------------------------------------------
2665
2667{
2668 const auto &index = Index::instance();
2670 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2671 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2672 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2674 "annotatedinterfaces",
2676}
2677
2678//----------------------------------------------------------------------------
2679
2681{
2682 const auto &index = Index::instance();
2684 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2685 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2686 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2688 "annotatedstructs",
2690}
2691
2692//----------------------------------------------------------------------------
2693
2695{
2696 const auto &index = Index::instance();
2698 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2699 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2700 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2702 "annotatedexceptions",
2704}
2705
2706//----------------------------------------------------------------------------
2707static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2708 QCString &prevClassName)
2709{
2710 const ClassDef *cd=md->getClassDef();
2711 if ( cd && prevClassName!=cd->displayName())
2712 {
2713 ol.writeString(separator);
2715 cd->displayName());
2716 prevClassName = cd->displayName();
2717 }
2718}
2719
2720static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2721 QCString &prevFileName)
2722{
2723 const FileDef *fd=md->getFileDef();
2724 if (fd && prevFileName!=fd->name())
2725 {
2726 ol.writeString(separator);
2728 fd->name());
2729 prevFileName = fd->name();
2730 }
2731}
2732
2733static void writeNamespaceLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2734 QCString &prevNamespaceName)
2735{
2736 const NamespaceDef *nd=md->getNamespaceDef();
2737 if (nd && prevNamespaceName!=nd->displayName())
2738 {
2739 ol.writeString(separator);
2741 nd->displayName());
2742 prevNamespaceName = nd->displayName();
2743 }
2744}
2745
2746static void writeModuleLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2747 QCString &prevModuleName)
2748{
2749 const ModuleDef *mod=md->getModuleDef();
2750 if (mod && prevModuleName!=mod->displayName())
2751 {
2752 ol.writeString(separator);
2753 // link to the member declaration in the module page
2754 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2755 mod->displayName());
2756 prevModuleName = mod->displayName();
2757 }
2758}
2759
2760
2761static void writeMemberList(OutputList &ol,bool useSections,const std::string &page,
2762 const Index::MemberIndexMap &memberIndexMap,
2764{
2765 int index = static_cast<int>(type);
2766 const int numIndices = 4;
2767 ASSERT(index<numIndices);
2768
2769 typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
2770 QCString &prevNamespaceName);
2771
2772 // each index tab has its own write function
2773 static writeLinkForMember_t writeLinkForMemberMap[numIndices] =
2774 {
2779 };
2780 QCString prevName;
2781 QCString prevDefName;
2782 bool first=TRUE;
2783 bool firstSection=TRUE;
2784 bool firstItem=TRUE;
2785 const Index::MemberIndexList *mil = nullptr;
2786 std::string letter;
2787 for (const auto &kv : memberIndexMap)
2788 {
2789 if (!page.empty()) // specific page mode
2790 {
2791 auto it = memberIndexMap.find(page);
2792 if (it != memberIndexMap.end())
2793 {
2794 mil = &it->second;
2795 letter = page;
2796 }
2797 }
2798 else // do all pages
2799 {
2800 mil = &kv.second;
2801 letter = kv.first;
2802 }
2803 if (mil==nullptr || mil->empty()) continue;
2804 for (const auto &md : *mil)
2805 {
2806 const char *sep = nullptr;
2807 bool isFunc=!md->isObjCMethod() &&
2808 (md->isFunction() || md->isSlot() || md->isSignal());
2809 QCString name=type==Definition::TypeModule ? md->qualifiedName() : md->name();
2810 int startIndex = getPrefixIndex(name);
2811 if (name.data()+startIndex!=prevName) // new entry
2812 {
2813 if ((prevName.isEmpty() ||
2814 tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2815 useSections) // new section
2816 {
2817 if (!firstItem) ol.endItemListItem();
2818 if (!firstSection) ol.endItemList();
2819 QCString cs = letterToLabel(letter.c_str());
2820 QCString anchor=QCString("index_")+convertToId(cs);
2821 QCString title=QCString("- ")+letter.c_str()+" -";
2822 ol.startSection(anchor,title,SectionType::Subsection);
2823 ol.docify(title);
2825 ol.startItemList();
2826 firstSection=FALSE;
2827 firstItem=TRUE;
2828 }
2829 else if (!useSections && first)
2830 {
2831 ol.startItemList();
2832 first=FALSE;
2833 }
2834
2835 // member name
2836 if (!firstItem) ol.endItemListItem();
2837 ol.startItemListItem();
2838 firstItem=FALSE;
2839 ol.docify(name);
2840 if (isFunc) ol.docify("()");
2841 //ol.writeString("\n");
2842
2843 // link to class
2844 prevDefName="";
2845 sep = "&#160;:&#160;";
2846 prevName = name.data()+startIndex;
2847 }
2848 else // same entry
2849 {
2850 sep = ", ";
2851 // link to class for other members with the same name
2852 }
2853 if (index<numIndices)
2854 {
2855 // write the link for the specific list type
2856 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2857 }
2858 }
2859 if (!page.empty())
2860 {
2861 break;
2862 }
2863 }
2864 if (!firstItem) ol.endItemListItem();
2865 ol.endItemList();
2866}
2867
2868//----------------------------------------------------------------------------
2869
2871{
2872 bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
2873 const ClassDef *cd=nullptr;
2874
2875 if (md->isLinkableInProject() &&
2876 (cd=md->getClassDef()) &&
2877 cd->isLinkableInProject() &&
2879 {
2880 QCString n = md->name();
2881 std::string letter = getUTF8CharAt(n.str(),getPrefixIndex(n));
2882 if (!letter.empty())
2883 {
2884 letter = convertUTF8ToLower(letter);
2885 bool isFriendToHide = hideFriendCompounds &&
2886 (QCString(md->typeString())=="friend class" ||
2887 QCString(md->typeString())=="friend struct" ||
2888 QCString(md->typeString())=="friend union");
2889 if (!(md->isFriend() && isFriendToHide) &&
2890 (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
2891 )
2892 {
2894 }
2895 if (md->isFunction() || md->isSlot() || md->isSignal())
2896 {
2898 }
2899 else if (md->isVariable())
2900 {
2902 }
2903 else if (md->isTypedef())
2904 {
2906 }
2907 else if (md->isEnumerate())
2908 {
2910 }
2911 else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
2912 {
2914 }
2915 else if (md->isProperty())
2916 {
2918 }
2919 else if (md->isEvent())
2920 {
2922 }
2923 else if (md->isRelated() || md->isForeign() ||
2924 (md->isFriend() && !isFriendToHide))
2925 {
2927 }
2928 }
2929 }
2930}
2931
2932//----------------------------------------------------------------------------
2933
2935{
2936 const NamespaceDef *nd=md->getNamespaceDef();
2937 if (nd && nd->isLinkableInProject() && md->isLinkableInProject())
2938 {
2939 QCString n = md->name();
2940 std::string letter = getUTF8CharAt(n.str(),getPrefixIndex(n));
2941 if (!letter.empty())
2942 {
2943 letter = convertUTF8ToLower(letter);
2944 if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
2945 {
2947 }
2948 if (md->isFunction())
2949 {
2951 }
2952 else if (md->isVariable())
2953 {
2955 }
2956 else if (md->isTypedef())
2957 {
2959 }
2960 else if (md->isSequence())
2961 {
2963 }
2964 else if (md->isDictionary())
2965 {
2967 }
2968 else if (md->isEnumerate())
2969 {
2971 }
2972 else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
2973 {
2975 }
2976 }
2977 }
2978}
2979
2980//----------------------------------------------------------------------------
2981
2983{
2984 const FileDef *fd=md->getFileDef();
2985 if (fd && fd->isLinkableInProject() && md->isLinkableInProject())
2986 {
2987 QCString n = md->name();
2988 std::string letter = getUTF8CharAt(n.str(),getPrefixIndex(n));
2989 if (!letter.empty())
2990 {
2991 letter = convertUTF8ToLower(letter);
2992 if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
2993 {
2995 }
2996 if (md->isFunction())
2997 {
2999 }
3000 else if (md->isVariable())
3001 {
3003 }
3004 else if (md->isTypedef())
3005 {
3007 }
3008 else if (md->isSequence())
3009 {
3011 }
3012 else if (md->isDictionary())
3013 {
3015 }
3016 else if (md->isEnumerate())
3017 {
3019 }
3020 else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
3021 {
3023 }
3024 else if (md->isDefine())
3025 {
3027 }
3028 }
3029 }
3030}
3031
3032//----------------------------------------------------------------------------
3033
3035{
3036 const ModuleDef *mod = md->getModuleDef();
3037 if (mod && mod->isPrimaryInterface() && mod->isLinkableInProject() && md->isLinkableInProject())
3038 {
3039 QCString n = md->name();
3040 std::string letter = getUTF8CharAt(n.str(),getPrefixIndex(n));
3041 if (!letter.empty())
3042 {
3043 letter = convertUTF8ToLower(letter);
3044 if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
3045 {
3047 }
3048 if (md->isFunction())
3049 {
3051 }
3052 else if (md->isVariable())
3053 {
3055 }
3056 else if (md->isTypedef())
3057 {
3059 }
3060 else if (md->isEnumerate())
3061 {
3063 }
3064 else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
3065 {
3067 }
3068 }
3069 }
3070}
3071
3072//----------------------------------------------------------------------------
3073
3075 const Index::MemberIndexMap &map,const std::string &page,
3076 QCString fullName,bool multiPage)
3077{
3078 bool first=TRUE;
3080 for (const auto &[letter,list] : map)
3081 {
3082 QCString ci(letter);
3083 QCString is = letterToLabel(ci);
3084 QCString anchor;
3086 if (!multiPage)
3087 anchor="#index_";
3088 else if (first)
3089 anchor=fullName+extension+"#index_";
3090 else
3091 anchor=fullName+"_"+is+extension+"#index_";
3092 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,TRUE,first);
3093 ol.writeString(ci);
3095 first=FALSE;
3096 }
3098}
3099
3100//----------------------------------------------------------------------------
3101
3102/** Helper class representing a class member in the navigation menu. */
3104{
3105 CmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3106 const char *fname;
3108};
3109
3110static const CmhlInfo *getCmhlInfo(size_t hl)
3111{
3112 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3113 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3114 static CmhlInfo cmhlInfo[] =
3115 {
3116 CmhlInfo("functions", theTranslator->trAll()),
3117 CmhlInfo("functions_func",
3118 fortranOpt ? theTranslator->trSubprograms() :
3119 vhdlOpt ? theTranslator->trFunctionAndProc() :
3120 theTranslator->trFunctions()),
3121 CmhlInfo("functions_vars",theTranslator->trVariables()),
3122 CmhlInfo("functions_type",theTranslator->trTypedefs()),
3123 CmhlInfo("functions_enum",theTranslator->trEnumerations()),
3124 CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
3125 CmhlInfo("functions_prop",theTranslator->trProperties()),
3126 CmhlInfo("functions_evnt",theTranslator->trEvents()),
3127 CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
3128 };
3129 return &cmhlInfo[hl];
3130}
3131
3133{
3134 const auto &index = Index::instance();
3135 if (index.numDocumentedClassMembers(hl)==0) return;
3136
3137 bool disableIndex = Config_getBool(DISABLE_INDEX);
3138 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3139 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3140 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3141 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3142
3143 bool multiPageIndex=FALSE;
3144 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3145 {
3146 multiPageIndex=TRUE;
3147 }
3148
3149 ol.pushGeneratorState();
3151
3153 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3154 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3155 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3156 bool addToIndex = lne==nullptr || lne->visible();
3157
3158 if (addToIndex)
3159 {
3160 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3161 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3162 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3163 }
3164
3165 bool first=TRUE;
3166 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3167 {
3168 QCString fileName = getCmhlInfo(hl)->fname;
3169 if (multiPageIndex)
3170 {
3171 QCString cs(letter);
3172 if (!first)
3173 {
3174 fileName+="_"+letterToLabel(cs);
3175 }
3176 if (addToIndex)
3177 {
3178 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3179 }
3180 }
3181
3182 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3183
3184 auto writeQuickLinks = [&,cap_letter=letter]()
3185 {
3187 if (!dynamicMenus)
3188 {
3190
3191 // index item for global member list
3194 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3196
3197 // index items per category member lists
3198 for (int i=1;i<ClassMemberHighlight::Total;i++)
3199 {
3200 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3201 {
3203 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3204 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3205 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3207 }
3208 }
3209
3211
3212 // quick alphabetical index
3213 if (quickIndex)
3214 {
3215 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3216 getCmhlInfo(hl)->fname,multiPageIndex);
3217 }
3218
3219 ol.writeString("</div><!-- main-nav -->\n");
3220 }
3221 };
3222
3223 ol.startFile(fileName+extension,QCString(),title);
3224 ol.startQuickIndices();
3225 if (!disableIndex && !quickLinksAfterSplitbar)
3226 {
3227 writeQuickLinks();
3228 }
3229 ol.endQuickIndices();
3230 ol.writeSplitBar(fileName,QCString());
3231 if (quickLinksAfterSplitbar)
3232 {
3233 writeQuickLinks();
3234 if (!dynamicMenus)
3235 {
3236 ol.writeString("<div id=\"container\">\n");
3237 ol.writeString("<div id=\"doc-content\">\n");
3238 }
3239 }
3240 ol.writeSearchInfo();
3241
3242 ol.startContents();
3243
3244 ol.startTextBlock();
3245 ol.parseText(hl == ClassMemberHighlight::All && lne ? lne->intro() : theTranslator->trCompoundMembersDescriptionTotal(hl));
3246 ol.endTextBlock();
3247
3248 writeMemberList(ol,quickIndex,
3249 multiPageIndex ? letter : std::string(),
3250 index.isClassIndexLetterUsed(hl),
3252 endFile(ol);
3253 first=FALSE;
3254 }
3255
3256 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3257
3258 ol.popGeneratorState();
3259}
3260
3262{
3263 const auto &index = Index::instance();
3264 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3265 bool addToIndex = lne==nullptr || lne->visible();
3266
3267 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3268 {
3269 Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
3270 Doxygen::indexList->incContentsDepth();
3271 }
3281 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3282 {
3283 Doxygen::indexList->decContentsDepth();
3284 }
3285
3286}
3287
3288//----------------------------------------------------------------------------
3289
3290/** Helper class representing a file member in the navigation menu. */
3292{
3293 FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3294 const char *fname;
3296};
3297
3298static const FmhlInfo *getFmhlInfo(size_t hl)
3299{
3300 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3301 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3302 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3303 static FmhlInfo fmhlInfo[] =
3304 {
3305 FmhlInfo("globals", theTranslator->trAll()),
3306 FmhlInfo("globals_func",
3307 fortranOpt ? theTranslator->trSubprograms() :
3308 vhdlOpt ? theTranslator->trFunctionAndProc() :
3309 theTranslator->trFunctions()),
3310 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3311 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3312 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3313 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3314 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3315 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3316 FmhlInfo("globals_defs",theTranslator->trDefines())
3317 };
3318 return &fmhlInfo[hl];
3319}
3320
3322{
3323 const auto &index = Index::instance();
3324 if (index.numDocumentedFileMembers(hl)==0) return;
3325
3326 bool disableIndex = Config_getBool(DISABLE_INDEX);
3327 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3328 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3329 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3330 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3331
3332 bool multiPageIndex=FALSE;
3333 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3334 {
3335 multiPageIndex=TRUE;
3336 }
3337
3338 ol.pushGeneratorState();
3340
3342 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3343 QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3344 bool addToIndex = lne==nullptr || lne->visible();
3345
3346 if (addToIndex)
3347 {
3348 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3349 getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3350 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3351 }
3352
3353 bool first=TRUE;
3354 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3355 {
3356 QCString fileName = getFmhlInfo(hl)->fname;
3357 if (multiPageIndex)
3358 {
3359 QCString cs(letter);
3360 if (!first)
3361 {
3362 fileName+="_"+letterToLabel(cs);
3363 }
3364 if (addToIndex)
3365 {
3366 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3367 }
3368 }
3369
3370 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3371
3372 auto writeQuickLinks = [&,cap_letter=letter]()
3373 {
3375 if (!dynamicMenus)
3376 {
3378
3379 // index item for all file member lists
3382 ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3384
3385 // index items for per category member lists
3386 for (int i=1;i<FileMemberHighlight::Total;i++)
3387 {
3388 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3389 {
3391 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3392 ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3394 }
3395 }
3396
3398
3399 if (quickIndex)
3400 {
3401 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3402 getFmhlInfo(hl)->fname,multiPageIndex);
3403 }
3404
3405 ol.writeString("</div><!-- main-nav -->\n");
3406 }
3407 };
3408
3409 ol.startFile(fileName+extension,QCString(),title);
3410 ol.startQuickIndices();
3411 if (!disableIndex && !quickLinksAfterSplitbar)
3412 {
3413 writeQuickLinks();
3414 }
3415 ol.endQuickIndices();
3416 ol.writeSplitBar(fileName,QCString());
3417 if (quickLinksAfterSplitbar)
3418 {
3419 writeQuickLinks();
3420 if (!dynamicMenus)
3421 {
3422 ol.writeString("<div id=\"container\">\n");
3423 ol.writeString("<div id=\"doc-content\">\n");
3424 }
3425 }
3426 ol.writeSearchInfo();
3427
3428 ol.startContents();
3429
3430 ol.startTextBlock();
3431 ol.parseText(hl == FileMemberHighlight::All && lne ? lne->intro() : theTranslator->trFileMembersDescriptionTotal(hl));
3432 ol.endTextBlock();
3433
3434 writeMemberList(ol,quickIndex,
3435 multiPageIndex ? letter : std::string(),
3436 index.isFileIndexLetterUsed(hl),
3438 endFile(ol);
3439 first=FALSE;
3440 }
3441 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3442 ol.popGeneratorState();
3443}
3444
3469
3470//----------------------------------------------------------------------------
3471
3472/** Helper class representing a namespace member in the navigation menu. */
3474{
3475 NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3476 const char *fname;
3478};
3479
3480static const NmhlInfo *getNmhlInfo(size_t hl)
3481{
3482 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3483 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3484 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3485 static NmhlInfo nmhlInfo[] =
3486 {
3487 NmhlInfo("namespacemembers", theTranslator->trAll()),
3488 NmhlInfo("namespacemembers_func",
3489 fortranOpt ? theTranslator->trSubprograms() :
3490 vhdlOpt ? theTranslator->trFunctionAndProc() :
3491 theTranslator->trFunctions()),
3492 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3493 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3494 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3495 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3496 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3497 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3498 };
3499 return &nmhlInfo[hl];
3500}
3501
3502//----------------------------------------------------------------------------
3503
3506{
3507 const auto &index = Index::instance();
3508 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3509
3510 bool disableIndex = Config_getBool(DISABLE_INDEX);
3511 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3512 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3513 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3514 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3515
3516 bool multiPageIndex=FALSE;
3517 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3518 {
3519 multiPageIndex=TRUE;
3520 }
3521
3522 ol.pushGeneratorState();
3524
3526 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3527 QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3528 bool addToIndex = lne==nullptr || lne->visible();
3529
3530 if (addToIndex)
3531 {
3532 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3533 getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3534 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3535 }
3536
3537 bool first=TRUE;
3538 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3539 {
3540 QCString fileName = getNmhlInfo(hl)->fname;
3541 if (multiPageIndex)
3542 {
3543 QCString cs(letter);
3544 if (!first)
3545 {
3546 fileName+="_"+letterToLabel(cs);
3547 }
3548 if (addToIndex)
3549 {
3550 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3551 }
3552 }
3553
3554 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3555
3556 auto writeQuickLinks = [&,cap_letter=letter]()
3557 {
3559 if (!dynamicMenus)
3560 {
3562
3563 // index item for all namespace member lists
3566 ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3568
3569 // index items per category member lists
3570 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3571 {
3572 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3573 {
3575 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3576 ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3578 }
3579 }
3580
3582
3583 if (quickIndex)
3584 {
3585 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3586 getNmhlInfo(hl)->fname,multiPageIndex);
3587 }
3588
3589 ol.writeString("</div><!-- main-nav -->\n");
3590 }
3591 };
3592
3593 ol.startFile(fileName+extension,QCString(),title);
3594 ol.startQuickIndices();
3595 if (!disableIndex && !quickLinksAfterSplitbar)
3596 {
3597 writeQuickLinks();
3598 }
3599 ol.endQuickIndices();
3600 ol.writeSplitBar(fileName,QCString());
3601 if (quickLinksAfterSplitbar)
3602 {
3603 writeQuickLinks();
3604 if (!dynamicMenus)
3605 {
3606 ol.writeString("<div id=\"container\">\n");
3607 ol.writeString("<div id=\"doc-content\">\n");
3608 }
3609 }
3610 ol.writeSearchInfo();
3611
3612 ol.startContents();
3613
3614 ol.startTextBlock();
3615 ol.parseText(hl == NamespaceMemberHighlight::All && lne ? lne->intro() : theTranslator->trNamespaceMembersDescriptionTotal(hl));
3616 ol.endTextBlock();
3617
3618 writeMemberList(ol,quickIndex,
3619 multiPageIndex ? letter : std::string(),
3620 index.isNamespaceIndexLetterUsed(hl),
3622 endFile(ol);
3623 first=FALSE;
3624 }
3625 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3626 ol.popGeneratorState();
3627}
3628
3630{
3631 const auto &index = Index::instance();
3632 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3633 bool addToIndex = lne==nullptr || lne->visible();
3634 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3635 {
3636 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
3637 Doxygen::indexList->incContentsDepth();
3638 }
3639 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3648 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3649 {
3650 Doxygen::indexList->decContentsDepth();
3651 }
3652
3653}
3654
3655//----------------------------------------------------------------------------
3656
3657/** Helper class representing a module member in the navigation menu. */
3659{
3660 MmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3661 const char *fname;
3663};
3664
3665static const MmhlInfo *getMmhlInfo(size_t hl)
3666{
3667 static MmhlInfo nmhlInfo[] =
3668 {
3669 MmhlInfo("modulemembers", theTranslator->trAll()),
3670 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3671 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3672 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3673 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3674 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3675 };
3676 return &nmhlInfo[hl];
3677}
3678
3679//----------------------------------------------------------------------------
3680
3683{
3684 const auto &index = Index::instance();
3685 if (index.numDocumentedModuleMembers(hl)==0) return;
3686
3687 bool disableIndex = Config_getBool(DISABLE_INDEX);
3688 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3689 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3690 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3691 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3692
3693 bool multiPageIndex=FALSE;
3694 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3695 {
3696 multiPageIndex=TRUE;
3697 }
3698
3699 ol.pushGeneratorState();
3701
3703 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3704 QCString title = lne ? lne->title() : theTranslator->trModulesMembers();
3705 bool addToIndex = lne==nullptr || lne->visible();
3706
3707 if (addToIndex)
3708 {
3709 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,QCString(),
3710 getMmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3711 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3712 }
3713
3714 bool first=TRUE;
3715 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3716 {
3717 QCString fileName = getMmhlInfo(hl)->fname;
3718 if (multiPageIndex)
3719 {
3720 QCString cs(letter);
3721 if (!first)
3722 {
3723 fileName+="_"+letterToLabel(cs);
3724 }
3725 if (addToIndex)
3726 {
3727 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3728 }
3729 }
3730
3731 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3732
3733 auto writeQuickLinks = [&,cap_letter=letter]()
3734 {
3736 if (!dynamicMenus)
3737 {
3739
3740 // index item for all namespace member lists
3743 ol.writeString(fixSpaces(getMmhlInfo(0)->title));
3745
3746 // index items per category member lists
3747 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3748 {
3749 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3750 {
3752 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3753 ol.writeString(fixSpaces(getMmhlInfo(i)->title));
3755 }
3756 }
3757
3759
3760 if (quickIndex)
3761 {
3762 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3763 getMmhlInfo(hl)->fname,multiPageIndex);
3764 }
3765
3766 ol.writeString("</div><!-- main-nav -->\n");
3767 }
3768 };
3769
3770 ol.startFile(fileName+extension,QCString(),title);
3771 ol.startQuickIndices();
3772 if (!disableIndex && !quickLinksAfterSplitbar)
3773 {
3774 writeQuickLinks();
3775 }
3776 ol.endQuickIndices();
3777 ol.writeSplitBar(fileName,QCString());
3778 if (quickLinksAfterSplitbar)
3779 {
3780 writeQuickLinks();
3781 if (!dynamicMenus)
3782 {
3783 ol.writeString("<div id=\"container\">\n");
3784 ol.writeString("<div id=\"doc-content\">\n");
3785 }
3786 }
3787 ol.writeSearchInfo();
3788
3789 ol.startContents();
3790
3791 ol.startTextBlock();
3792 ol.parseText(hl == ModuleMemberHighlight::All && lne ? lne->intro() : theTranslator->trModuleMembersDescriptionTotal(hl));
3793 ol.endTextBlock();
3794
3795 writeMemberList(ol,quickIndex,
3796 multiPageIndex ? letter : std::string(),
3797 index.isModuleIndexLetterUsed(hl),
3799 endFile(ol);
3800 first=FALSE;
3801 }
3802 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3803 ol.popGeneratorState();
3804}
3805
3806
3807//----------------------------------------------------------------------------
3808
3810{
3811 const auto &index = Index::instance();
3812 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3813 bool addToIndex = lne==nullptr || lne->visible();
3814 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3815 {
3816 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3817 Doxygen::indexList->incContentsDepth();
3818 }
3819 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3826 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3827 {
3828 Doxygen::indexList->decContentsDepth();
3829 }
3830}
3831
3832//----------------------------------------------------------------------------
3833
3835{
3836 if (Doxygen::exampleLinkedMap->empty()) return;
3837 ol.pushGeneratorState();
3840 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3841 QCString title = lne ? lne->title() : theTranslator->trExamples();
3842 bool addToIndex = lne==nullptr || lne->visible();
3843
3844 startFile(ol,"examples",QCString(),title,HighlightedItem::Examples);
3845
3846 startTitle(ol,QCString());
3847 ol.parseText(title);
3848 endTitle(ol,QCString(),QCString());
3849
3850 ol.startContents();
3851
3852 if (addToIndex)
3853 {
3854 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3855 Doxygen::indexList->incContentsDepth();
3856 }
3857
3858 ol.startTextBlock();
3859 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3860 ol.endTextBlock();
3861
3862 ol.startItemList();
3863 for (const auto &pd : *Doxygen::exampleLinkedMap)
3864 {
3865 ol.startItemListItem();
3866 QCString n=pd->getOutputFileBase();
3867 if (!pd->title().isEmpty())
3868 {
3869 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3870 if (addToIndex)
3871 {
3872 Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,QCString(),FALSE,TRUE);
3873 }
3874 }
3875 else
3876 {
3877 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3878 if (addToIndex)
3879 {
3880 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3881 }
3882 }
3883 ol.endItemListItem();
3884 //ol.writeString("\n");
3885 }
3886 ol.endItemList();
3887
3888 if (addToIndex)
3889 {
3890 Doxygen::indexList->decContentsDepth();
3891 }
3892 endFile(ol);
3893 ol.popGeneratorState();
3894}
3895
3896
3897//----------------------------------------------------------------------------
3898
3899static void countRelatedPages(int &docPages,int &indexPages)
3900{
3901 docPages=indexPages=0;
3902 for (const auto &pd : *Doxygen::pageLinkedMap)
3903 {
3904 if (pd->visibleInIndex() && !pd->hasParentPage())
3905 {
3906 indexPages++;
3907 }
3908 if (pd->documentedPage())
3909 {
3910 docPages++;
3911 }
3912 }
3913}
3914
3915//----------------------------------------------------------------------------
3916
3918{
3919 QCString projectName = Config_getString(PROJECT_NAME);
3920 QCString title;
3922 {
3923 title = filterTitle(Doxygen::mainPage->title());
3924 }
3925 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3926}
3927
3928static void writePages(PageDef *pd,FTVHelp *ftv)
3929{
3930 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3931 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3932 bool addToIndex = lne==nullptr || lne->visible();
3933 if (!addToIndex) return;
3934
3935 bool hasSubPages = pd->hasSubPages();
3936 bool hasSections = pd->hasSections();
3937
3938 if (pd->visibleInIndex())
3939 {
3940 QCString pageTitle, pageTitleAsHtml;
3941
3942 if (pd->title().isEmpty())
3943 pageTitle=pd->name();
3944 else
3945 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
3946 pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
3947
3948 if (ftv)
3949 {
3950 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
3951 ftv->addContentsItem(
3952 hasSubPages,pageTitle,
3953 pd->getReference(),pd->getOutputFileBase(),
3954 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
3955 }
3956 if (addToIndex && pd!=Doxygen::mainPage.get())
3957 {
3958 Doxygen::indexList->addContentsItem(
3959 hasSubPages || hasSections,pageTitle,
3960 pd->getReference(),pd->getOutputFileBase(),
3961 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
3962 }
3963 }
3964 if (hasSubPages && ftv) ftv->incContentsDepth();
3965 bool doIndent = (hasSections || hasSubPages) &&
3966 (pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
3967 if (doIndent)
3968 {
3969 Doxygen::indexList->incContentsDepth();
3970 }
3971 if (hasSections)
3972 {
3973 pd->addSectionsToIndex();
3974 }
3975 for (const auto &subPage : pd->getSubPages())
3976 {
3977 writePages(subPage,ftv);
3978 }
3979 if (hasSubPages && ftv) ftv->decContentsDepth();
3980 if (doIndent)
3981 {
3982 Doxygen::indexList->decContentsDepth();
3983 }
3984 //printf("end writePages()=%s\n",qPrint(pd->title()));
3985}
3986
3987//----------------------------------------------------------------------------
3988
3990{
3991 if (Index::instance().numIndexedPages()==0) return;
3992 ol.pushGeneratorState();
3994 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3995 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
3996 startFile(ol,"pages",QCString(),title,HighlightedItem::Pages);
3997 startTitle(ol,QCString());
3998 ol.parseText(title);
3999 endTitle(ol,QCString(),QCString());
4000 ol.startContents();
4001 ol.startTextBlock();
4002 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
4003 ol.endTextBlock();
4004
4005 {
4006 FTVHelp ftv(false);
4007 for (const auto &pd : *Doxygen::pageLinkedMap)
4008 {
4009 if ((pd->getOuterScope()==nullptr ||
4010 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
4011 pd->visibleInIndex()
4012 )
4013 {
4014 writePages(pd.get(),&ftv);
4015 }
4016 }
4017 TextStream t;
4019 ol.writeString(t.str().c_str());
4020 }
4021
4022// ol.popGeneratorState();
4023 // ------
4024
4025 endFile(ol);
4026 ol.popGeneratorState();
4027}
4028
4029//----------------------------------------------------------------------------
4030
4031static int countGroups()
4032{
4033 int count=0;
4034 for (const auto &gd : *Doxygen::groupLinkedMap)
4035 {
4036 if (!gd->isReference())
4037 {
4038 //gd->visited=FALSE;
4039 count++;
4040 }
4041 }
4042 return count;
4043}
4044
4045//----------------------------------------------------------------------------
4046
4047static int countDirs()
4048{
4049 int count=0;
4050 for (const auto &dd : *Doxygen::dirLinkedMap)
4051 {
4052 if (dd->isLinkableInProject())
4053 {
4054 count++;
4055 }
4056 }
4057 return count;
4058}
4059
4060
4061//----------------------------------------------------------------------------
4062
4064{
4065 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4066 ol.pushGeneratorState();
4068
4069 DotLegendGraph gd;
4070 gd.writeGraph(Config_getString(HTML_OUTPUT));
4071
4072 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4073 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4074 // temporarily disable the stripping of comments for our own code example!
4075 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4076 // temporarily disable create subdirs for linking to our example
4077 Config_updateBool(CREATE_SUBDIRS,FALSE);
4078
4079 startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
4080 startTitle(ol,QCString());
4081 ol.parseText(theTranslator->trLegendTitle());
4082 endTitle(ol,QCString(),QCString());
4083 ol.startContents();
4084 QCString legendDocs = theTranslator->trLegendDocs();
4085 int s = legendDocs.find("<center>");
4086 int e = legendDocs.find("</center>");
4087 QCString imgExt = getDotImageExtension();
4088 if (imgExt=="svg" && s!=-1 && e!=-1)
4089 {
4090 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4091 //printf("legendDocs=%s\n",qPrint(legendDocs));
4092 }
4093
4094 {
4095 auto fd = createFileDef("","graph_legend.dox");
4096 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,FALSE,FALSE,
4098 }
4099
4100 // restore config settings
4101 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4102 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4103
4104 endFile(ol);
4105 ol.popGeneratorState();
4106}
4107
4108
4109
4110//----------------------------------------------------------------------------
4111/*!
4112 * write groups as hierarchical trees
4113 */
4114static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex)
4115{
4116 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4117 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4118 if (level>20)
4119 {
4120 warn(gd->getDefFileName(),gd->getDefLine(),
4121 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->name());
4122 return;
4123 }
4124
4125 /* Some groups should appear twice under different parent-groups.
4126 * That is why we should not check if it was visited
4127 */
4128 if ((!gd->isASubGroup() || level>0) && gd->isVisible() && gd->isVisibleInHierarchy())
4129 {
4130 //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
4131 // write group info
4132 bool hasSubGroups = !gd->getSubGroups().empty();
4133 bool hasSubPages = !gd->getPages().empty();
4134 size_t numSubItems = 0;
4135 for (const auto &ml : gd->getMemberLists())
4136 {
4137 if (ml->listType().isDocumentation())
4138 {
4139 numSubItems += ml->size();
4140 }
4141 }
4142 numSubItems += gd->getNamespaces().size();
4143 numSubItems += gd->getClasses().size();
4144 numSubItems += gd->getFiles().size();
4145 numSubItems += gd->getConcepts().size();
4146 numSubItems += gd->getDirs().size();
4147 numSubItems += gd->getPages().size();
4148
4149 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4150 QCString title = parseCommentAsText(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4151 QCString titleAsHtml = parseCommentAsHtml(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4152
4153 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
4154 if (addToIndex)
4155 {
4156 Doxygen::indexList->addContentsItem(isDir,title,
4158 isDir,TRUE,nullptr,titleAsHtml);
4159 Doxygen::indexList->incContentsDepth();
4160 }
4161 if (ftv)
4162 {
4163 ftv->addContentsItem(hasSubGroups,title,
4165 FALSE,FALSE,gd,titleAsHtml);
4166 ftv->incContentsDepth();
4167 }
4168
4169 //ol.writeListItem();
4170 //ol.startTextLink(gd->getOutputFileBase(),0);
4171 //parseText(ol,gd->groupTitle());
4172 //ol.endTextLink();
4173
4174 ol.startIndexListItem();
4176 ol.parseText(gd->groupTitle());
4178 if (gd->isReference())
4179 {
4180 ol.startTypewriter();
4181 ol.docify(" [external]");
4182 ol.endTypewriter();
4183 }
4184
4185 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
4186 {
4187 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4188 {
4189 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
4190 if (lmd)
4191 {
4192 MemberList *ml = gd->getMemberList(lmd->type);
4193 if (ml)
4194 {
4195 for (const auto &md : *ml)
4196 {
4197 const MemberVector &enumList = md->enumFieldList();
4198 isDir = !enumList.empty() && md->isEnumerate();
4199 if (md->isVisible() && !md->isAnonymous())
4200 {
4201 Doxygen::indexList->addContentsItem(isDir,
4202 md->qualifiedName(),md->getReference(),
4203 md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
4204 }
4205 if (isDir)
4206 {
4207 Doxygen::indexList->incContentsDepth();
4208 for (const auto &emd : enumList)
4209 {
4210 if (emd->isVisible())
4211 {
4212 Doxygen::indexList->addContentsItem(FALSE,
4213 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4214 emd->anchor(),FALSE,addToIndex);
4215 }
4216 }
4217 Doxygen::indexList->decContentsDepth();
4218 }
4219 }
4220 }
4221 }
4222 }
4223 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4224 {
4225 for (const auto &cd : gd->getClasses())
4226 {
4227 //bool nestedClassInSameGroup =
4228 // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
4229 // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
4230 //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
4231 if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
4232 {
4234 LayoutDocManager::Class,
4235 cd->displayName(),
4236 cd->anchor(),
4237 addToIndex,
4238 TRUE);
4239 }
4240 }
4241 }
4242 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex && Config_getBool(SHOW_NAMESPACES))
4243 {
4244 for (const auto &nd : gd->getNamespaces())
4245 {
4246 if (nd->isVisible())
4247 {
4248 Doxygen::indexList->addContentsItem(FALSE,
4249 nd->displayName(),nd->getReference(),
4250 nd->getOutputFileBase(),QCString(),FALSE,Config_getBool(SHOW_NAMESPACES));
4251 }
4252 }
4253 }
4254 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4255 {
4256 for (const auto &cd : gd->getConcepts())
4257 {
4258 if (cd->isVisible())
4259 {
4260 Doxygen::indexList->addContentsItem(FALSE,
4261 cd->displayName(),cd->getReference(),
4262 cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
4263 }
4264 }
4265 }
4266 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4267 {
4268 for (const auto &fd : gd->getFiles())
4269 {
4270 if (fd->isVisible())
4271 {
4272 Doxygen::indexList->addContentsItem(FALSE,
4273 fd->displayName(),fd->getReference(),
4274 fd->getOutputFileBase(),QCString(),FALSE,fd->isLinkableViaGroup());
4275 }
4276 }
4277 }
4278 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4279 {
4280 for (const auto &dd : gd->getDirs())
4281 {
4282 if (dd->isVisible())
4283 {
4284 Doxygen::indexList->addContentsItem(FALSE,
4285 dd->shortName(),dd->getReference(),
4286 dd->getOutputFileBase(),QCString(),FALSE,FALSE);
4287 }
4288 }
4289 }
4290 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4291 {
4292 for (const auto &pd : gd->getPages())
4293 {
4294 const SectionInfo *si=nullptr;
4295 if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
4296 hasSubPages = pd->hasSubPages();
4297 bool hasSections = pd->hasSections();
4298 QCString pageTitle;
4299 if (pd->title().isEmpty())
4300 pageTitle=pd->name();
4301 else
4302 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4303 QCString pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4304 Doxygen::indexList->addContentsItem(
4305 hasSubPages || hasSections,
4306 pageTitle,
4307 gd->getReference(),
4308 gd->getOutputFileBase(),
4309 si ? si->label() : QCString(),
4310 hasSubPages || hasSections,
4311 TRUE,
4312 nullptr,
4313 pageTitleAsHtml); // addToNavIndex
4314 if (hasSections || hasSubPages)
4315 {
4316 Doxygen::indexList->incContentsDepth();
4317 }
4318 if (hasSections)
4319 {
4320 pd->addSectionsToIndex();
4321 }
4322 writePages(pd,nullptr);
4323 if (hasSections || hasSubPages)
4324 {
4325 Doxygen::indexList->decContentsDepth();
4326 }
4327 }
4328 }
4329 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4330 {
4331 if (!gd->getSubGroups().empty())
4332 {
4333 startIndexHierarchy(ol,level+1);
4334 for (const auto &subgd : gd->getSubGroups())
4335 {
4336 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4337 }
4338 endIndexHierarchy(ol,level+1);
4339 }
4340 }
4341 }
4342
4343 ol.endIndexListItem();
4344
4345 if (addToIndex)
4346 {
4347 Doxygen::indexList->decContentsDepth();
4348 }
4349 if (ftv)
4350 {
4351 ftv->decContentsDepth();
4352 }
4353 //gd->visited=TRUE;
4354 }
4355}
4356
4357static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
4358{
4359 if (ftv)
4360 {
4361 ol.pushGeneratorState();
4363 }
4364 startIndexHierarchy(ol,0);
4365 for (const auto &gd : *Doxygen::groupLinkedMap)
4366 {
4367 if (gd->isVisibleInHierarchy())
4368 {
4369 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4370 }
4371 }
4372 endIndexHierarchy(ol,0);
4373 if (ftv)
4374 {
4375 ol.popGeneratorState();
4376 }
4377}
4378
4379//----------------------------------------------------------------------------
4380
4382{
4383 if (Index::instance().numDocumentedGroups()==0) return;
4384 ol.pushGeneratorState();
4385 // 1.{
4388 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4389 QCString title = lne ? lne->title() : theTranslator->trTopics();
4390 bool addToIndex = lne==nullptr || lne->visible();
4391
4392 startFile(ol,"topics",QCString(),title,HighlightedItem::Topics);
4393 startTitle(ol,QCString());
4394 ol.parseText(title);
4395 endTitle(ol,QCString(),QCString());
4396 ol.startContents();
4397 ol.startTextBlock();
4398 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4399 ol.endTextBlock();
4400
4401 // ---------------
4402 // Normal group index for Latex/RTF
4403 // ---------------
4404 // 2.{
4405 ol.pushGeneratorState();
4407 Doxygen::indexList->disable();
4408
4409 writeGroupHierarchy(ol,nullptr,FALSE);
4410
4411 Doxygen::indexList->enable();
4412 ol.popGeneratorState();
4413 // 2.}
4414
4415 // ---------------
4416 // interactive group index for HTML
4417 // ---------------
4418 // 2.{
4419 ol.pushGeneratorState();
4421
4422 {
4423 if (addToIndex)
4424 {
4425 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"topics",QCString(),TRUE,TRUE);
4426 Doxygen::indexList->incContentsDepth();
4427 }
4428 FTVHelp ftv(false);
4429 writeGroupHierarchy(ol,&ftv,addToIndex);
4430 TextStream t;
4433 ol.writeString(t.str().c_str());
4434 if (addToIndex)
4435 {
4436 Doxygen::indexList->decContentsDepth();
4437 }
4438 }
4439 ol.popGeneratorState();
4440 // 2.}
4441
4442 endFile(ol);
4443 ol.popGeneratorState();
4444 // 1.}
4445}
4446
4447
4448//----------------------------------------------------------------------------
4449
4450static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod,
4451 FTVHelp* ftv, bool addToIndex)
4452{
4453 int visibleMembers = mod->countVisibleMembers();
4454 bool isDir=visibleMembers>0;
4455 if (addToIndex)
4456 {
4457 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4458 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4459 }
4460 if (ftv)
4461 {
4462 ftv->addContentsItem(false,mod->name(),
4463 mod->getReference(),mod->getOutputFileBase(),QCString(),
4464 false,false,mod);
4465 }
4466 ol.startIndexListItem();
4468 ol.parseText(mod->qualifiedName());
4470 if (mod->isReference())
4471 {
4472 ol.startTypewriter();
4473 ol.docify(" [external]");
4474 ol.endTypewriter();
4475 }
4476 if (addToIndex && isDir)
4477 {
4478 Doxygen::indexList->incContentsDepth();
4479 }
4480 if (isDir)
4481 {
4482 //ftv->incContentsDepth();
4483 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4484 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4485 writeModuleMembers(mod,addToIndex);
4486 //ftv->decContentsDepth();
4487 }
4488 if (addToIndex && isDir)
4489 {
4490 Doxygen::indexList->decContentsDepth();
4491 }
4492 ol.endIndexListItem();
4493}
4494
4495//----------------------------------------------------------------------------
4496
4497static void writeModuleList(OutputList &ol, FTVHelp *ftv,bool addToIndex)
4498{
4499 if (ftv)
4500 {
4501 ol.pushGeneratorState();
4503 }
4504 startIndexHierarchy(ol,0);
4505 for (const auto &mod : ModuleManager::instance().modules())
4506 {
4507 if (mod->isPrimaryInterface())
4508 {
4509 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4510 }
4511 }
4512 endIndexHierarchy(ol,0);
4513 if (ftv)
4514 {
4515 ol.popGeneratorState();
4516 }
4517}
4518
4519//----------------------------------------------------------------------------
4520
4522{
4523 if (ModuleManager::instance().numDocumentedModules()==0) return;
4524 ol.pushGeneratorState();
4525 // 1.{
4526
4529 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4530 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4531 QCString title = lne ? lne->title() : theTranslator->trModules();
4532 bool addToIndex = lne==nullptr || lne->visible();
4533
4534 startFile(ol,"modules",QCString(),title,HighlightedItem::Modules);
4535 startTitle(ol,QCString());
4536 ol.parseText(title);
4537 endTitle(ol,QCString(),QCString());
4538 ol.startContents();
4539 ol.startTextBlock();
4540 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4541 ol.endTextBlock();
4542
4543 // ---------------
4544 // Normal group index for Latex/RTF
4545 // ---------------
4546 // 2.{
4547 ol.pushGeneratorState();
4549 Doxygen::indexList->disable();
4550
4551 writeModuleList(ol,nullptr,FALSE);
4552
4553 Doxygen::indexList->enable();
4554 ol.popGeneratorState();
4555 // 2.}
4556
4557 // ---------------
4558 // interactive group index for HTML
4559 // ---------------
4560 // 2.{
4561 ol.pushGeneratorState();
4563
4564 {
4565 if (addToIndex)
4566 {
4567 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4568 Doxygen::indexList->incContentsDepth();
4569 }
4570 FTVHelp ftv(false);
4571 writeModuleList(ol,&ftv,addToIndex);
4572 TextStream t;
4574 ol.writeString(t.str().c_str());
4575 if (addToIndex)
4576 {
4577 Doxygen::indexList->decContentsDepth();
4578 }
4579 }
4580 ol.popGeneratorState();
4581 // 2.}
4582 endFile(ol);
4583 ol.popGeneratorState();
4584 // 1.}
4585}
4586
4587//----------------------------------------------------------------------------
4588
4589static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex)
4590{
4591 for (const auto &cd : concepts)
4592 {
4593 if (cd->isLinkableInProject())
4594 {
4595 if (ftv)
4596 {
4597 ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4598 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4599 }
4600 if (addToIndex)
4601 {
4602 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4603 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4604 }
4605 }
4606 }
4607}
4608
4610 bool rootOnly, bool addToIndex);
4611
4613 bool rootOnly, bool addToIndex)
4614{
4615 for (const auto &nd : nsLinkedMap)
4616 {
4617 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4618 }
4619}
4620
4621
4623 bool rootOnly, bool addToIndex)
4624{
4625 if (!nd->isAnonymous() &&
4626 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4627 {
4628 bool isDir = namespaceHasNestedConcept(nd);
4629 bool isLinkable = nd->isLinkableInProject();
4630
4631 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4632
4633 QCString ref;
4634 QCString file;
4635 if (isLinkable)
4636 {
4637 ref = nd->getReference();
4638 file = nd->getOutputFileBase();
4639 }
4640
4641 if (isDir)
4642 {
4643 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4644
4645 if (addToIndex)
4646 {
4647 // the namespace entry is already shown under the namespace list so don't
4648 // add it to the nav index and don't create a separate index file for it otherwise
4649 // it will overwrite the one written for the namespace list.
4650 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4651 false, // separateIndex
4652 false // addToNavIndex
4653 );
4654 }
4655 if (addToIndex)
4656 {
4657 Doxygen::indexList->incContentsDepth();
4658 }
4659
4660 ftv->incContentsDepth();
4662 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4663 ftv->decContentsDepth();
4664
4665 if (addToIndex)
4666 {
4667 Doxygen::indexList->decContentsDepth();
4668 }
4669 }
4670 }
4671}
4672
4673static void writeConceptRootList(FTVHelp *ftv,bool addToIndex)
4674{
4675 for (const auto &cd : *Doxygen::conceptLinkedMap)
4676 {
4677 if ((cd->getOuterScope()==nullptr ||
4678 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4679 )
4680 {
4681 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4682 ftv->addContentsItem(
4683 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4684 QCString(),false,cd->partOfGroups().empty(),cd.get());
4685 if (addToIndex)
4686 {
4687 Doxygen::indexList->addContentsItem(
4688 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4689 QCString(),false,cd->partOfGroups().empty(),cd.get());
4690 }
4691 }
4692 }
4693}
4694
4696{
4697 if (Index::instance().numDocumentedConcepts()==0) return;
4698 ol.pushGeneratorState();
4699 // 1.{
4702 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4703 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4704 bool addToIndex = lne==nullptr || lne->visible();
4705
4706 startFile(ol,"concepts",QCString(),title,HighlightedItem::Concepts);
4707 startTitle(ol,QCString());
4708 ol.parseText(title);
4709 endTitle(ol,QCString(),QCString());
4710 ol.startContents();
4711 ol.startTextBlock();
4712 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4713 ol.endTextBlock();
4714
4715 // ---------------
4716 // Normal group index for Latex/RTF
4717 // ---------------
4718 // 2.{
4719 ol.pushGeneratorState();
4721
4722 bool first=TRUE;
4723 for (const auto &cd : *Doxygen::conceptLinkedMap)
4724 {
4725 if (cd->isLinkableInProject())
4726 {
4727 if (first)
4728 {
4729 ol.startIndexList();
4730 first=FALSE;
4731 }
4732 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4733 ol.startIndexKey();
4734 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4735 ol.endIndexKey();
4736
4737 bool hasBrief = !cd->briefDescription().isEmpty();
4738 ol.startIndexValue(hasBrief);
4739 if (hasBrief)
4740 {
4741 //ol.docify(" (");
4742 ol.generateDoc(
4743 cd->briefFile(),cd->briefLine(),
4744 cd.get(),nullptr,
4745 cd->briefDescription(TRUE),
4746 FALSE, // index words
4747 FALSE, // isExample
4748 QCString(), // example name
4749 TRUE, // single line
4750 TRUE // link from index
4751 );
4752 //ol.docify(")");
4753 }
4754 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4755
4756 }
4757 }
4758 if (!first) ol.endIndexList();
4759
4760 ol.popGeneratorState();
4761 // 2.}
4762
4763 // ---------------
4764 // interactive group index for HTML
4765 // ---------------
4766 // 2.{
4767 ol.pushGeneratorState();
4769
4770 {
4771 if (addToIndex)
4772 {
4773 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
4774 Doxygen::indexList->incContentsDepth();
4775 }
4776 FTVHelp ftv(false);
4777 for (const auto &nd : *Doxygen::namespaceLinkedMap)
4778 {
4779 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4780 }
4781 writeConceptRootList(&ftv,addToIndex);
4782 TextStream t;
4784 ol.writeString(t.str().c_str());
4785 if (addToIndex)
4786 {
4787 Doxygen::indexList->decContentsDepth();
4788 }
4789 }
4790 ol.popGeneratorState();
4791 // 2.}
4792
4793 endFile(ol);
4794 ol.popGeneratorState();
4795 // 1.}
4796}
4797
4798//----------------------------------------------------------------------------
4799
4801{
4802 if (lne->baseFile().startsWith("usergroup"))
4803 {
4804 ol.pushGeneratorState();
4807 startTitle(ol,QCString());
4808 ol.parseText(lne->title());
4809 endTitle(ol,QCString(),QCString());
4810 ol.startContents();
4811 int count=0;
4812 for (const auto &entry: lne->children())
4813 {
4814 if (entry->visible()) count++;
4815 }
4816 if (count>0)
4817 {
4818 ol.writeString("<ul>\n");
4819 for (const auto &entry: lne->children())
4820 {
4821 if (entry->visible())
4822 {
4823 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4824 fixSpaces(entry->title())+"</span></a></li>\n");
4825 }
4826 }
4827 ol.writeString("</ul>\n");
4828 }
4829 endFile(ol);
4830 ol.popGeneratorState();
4831 }
4832}
4833
4834//----------------------------------------------------------------------------
4835
4836
4837static void writeIndex(OutputList &ol)
4838{
4839 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4840 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4841 bool disableIndex = Config_getBool(DISABLE_INDEX);
4842 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4843 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4844 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4845 QCString projectName = Config_getString(PROJECT_NAME);
4846 // save old generator state
4847 ol.pushGeneratorState();
4848
4849 QCString projPrefix;
4850 if (!projectName.isEmpty())
4851 {
4852 projPrefix=projectName+" ";
4853 }
4854
4855 //--------------------------------------------------------------------
4856 // write HTML index
4857 //--------------------------------------------------------------------
4859
4860 QCString defFileName =
4861 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4862 int defLine =
4863 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4864
4865 QCString title, titleAsHtml;
4866 if (!mainPageHasTitle())
4867 {
4868 title = theTranslator->trMainPage();
4869 }
4870 else if (Doxygen::mainPage)
4871 {
4872 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4873 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4874 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4875 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4876 }
4877
4878 QCString indexName="index";
4879 ol.startFile(indexName,QCString(),title);
4880
4882 {
4883 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4884 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4885 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4886 if (hasTitle) // to avoid duplicate entries in the treeview
4887 {
4888 Doxygen::indexList->addContentsItem(hasSubs,
4889 title,
4890 QCString(),
4891 indexName,
4892 QCString(),
4893 hasSubs,
4894 TRUE,
4895 nullptr,
4896 titleAsHtml);
4897 }
4898 if (hasSubs)
4899 {
4900 writePages(Doxygen::mainPage.get(),nullptr);
4901 }
4902 }
4903
4904 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4905 ol.startQuickIndices();
4906 if (!disableIndex && !quickLinksAfterSplitbar)
4907 {
4909 }
4910 ol.endQuickIndices();
4911 ol.writeSplitBar(indexName,QCString());
4912 if (quickLinksAfterSplitbar)
4913 {
4915 }
4916 ol.writeSearchInfo();
4917 bool headerWritten=FALSE;
4919 {
4920 if (!Doxygen::mainPage->title().isEmpty())
4921 {
4922 if (Doxygen::mainPage->title().lower() != "notitle")
4923 ol.startPageDoc(Doxygen::mainPage->title());
4924 else
4925 ol.startPageDoc("");
4926 }
4927 else
4928 ol.startPageDoc(projectName);
4929 }
4930 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4931 {
4932 if (Doxygen::mainPage->title().lower()!="notitle")
4933 {
4934 ol.startHeaderSection();
4936 ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
4937 Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),false,false,
4938 QCString(),true,false,Config_getBool(MARKDOWN_SUPPORT),false);
4939 headerWritten = TRUE;
4940 }
4941 }
4942 else
4943 {
4944 if (!projectName.isEmpty())
4945 {
4946 ol.startHeaderSection();
4948 ol.parseText(theTranslator->trDocumentation(projectName));
4949 headerWritten = TRUE;
4950 }
4951 }
4952 if (headerWritten)
4953 {
4955 ol.endHeaderSection();
4956 }
4957
4958 ol.startContents();
4959 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4960 {
4962 }
4963
4965 {
4966 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
4967 {
4968 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4969 }
4970
4971 ol.startTextBlock();
4972 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,
4973 Doxygen::mainPage->documentation(),true,false,
4974 QCString(),false,false,
4975 Config_getBool(MARKDOWN_SUPPORT),false);
4976 ol.endTextBlock();
4977 ol.endPageDoc();
4978 }
4979
4982 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4983 Doxygen::indexList->addIndexFile(fn);
4984
4985 if (Doxygen::mainPage &&
4986 generateTreeView &&
4987 pageOutlinePanel &&
4988 Doxygen::mainPage->localToc().isHtmlEnabled() &&
4989 Doxygen::mainPage->hasSections()
4990 )
4991 {
4992 ol.writeString("</div><!-- doc-content -->\n");
4993 ol.endContents();
4994 Doxygen::mainPage->writePageNavigation(ol);
4995 ol.writeString("</div><!-- container -->\n");
4996 endFile(ol,true,true);
4997 }
4998 else
4999 {
5000 endFile(ol);
5001 }
5002
5004
5005 //--------------------------------------------------------------------
5006 // write LaTeX/RTF index
5007 //--------------------------------------------------------------------
5011
5013 {
5014 msg("Generating main page...\n");
5015 Doxygen::mainPage->writeDocumentation(ol);
5016 }
5017
5018 ol.startFile("refman",QCString(),QCString());
5022
5023 if (projPrefix.isEmpty())
5024 {
5025 ol.parseText(theTranslator->trReferenceManual());
5026 }
5027 else
5028 {
5029 ol.parseText(projPrefix);
5030 }
5031
5032 if (!Config_getString(PROJECT_NUMBER).isEmpty())
5033 {
5034 ol.startProjectNumber();
5035 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,Config_getString(PROJECT_NUMBER),false,false,
5036 QCString(),false,false);
5037 ol.endProjectNumber();
5038 }
5041 ol.parseText(theTranslator->trGeneratedBy());
5045
5046 ol.lastIndexPage();
5048 {
5051 }
5052 const auto &index = Index::instance();
5053 if (index.numDocumentedPages()>0)
5054 {
5057 }
5058
5060 if (!Config_getBool(LATEX_HIDE_INDICES))
5061 {
5062 //if (indexedPages>0)
5063 //{
5064 // ol.startIndexSection(isPageIndex);
5065 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5066 // ol.endIndexSection(isPageIndex);
5067 //}
5068 if (index.numDocumentedModules()>0)
5069 {
5071 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5073 }
5074 if (index.numDocumentedGroups()>0)
5075 {
5077 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5079 }
5080 if (index.numDocumentedDirs()>0)
5081 {
5083 ol.parseText(theTranslator->trDirIndex());
5085 }
5086 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5087 {
5088 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5089 if (lne)
5090 {
5092 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5094 }
5095 }
5096 if (index.numDocumentedConcepts()>0)
5097 {
5099 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5101 }
5102 if (index.numHierarchyInterfaces()>0)
5103 {
5105 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5107 }
5108 if (index.numHierarchyClasses()>0)
5109 {
5110 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5111 if (lne)
5112 {
5114 ol.parseText(/*projPrefix+*/
5115 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5116 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5117 theTranslator->trHierarchicalIndex()
5118 ));
5120 }
5121 }
5122 if (index.numHierarchyExceptions()>0)
5123 {
5125 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5127 }
5128 if (index.numAnnotatedInterfacesPrinted()>0)
5129 {
5131 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5133 }
5134 if (index.numAnnotatedClassesPrinted()>0)
5135 {
5137 ol.parseText(/*projPrefix+*/
5138 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5139 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5140 theTranslator->trCompoundIndex()
5141 ));
5143 }
5144 if (index.numAnnotatedStructsPrinted()>0)
5145 {
5147 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5149 }
5150 if (index.numAnnotatedExceptionsPrinted()>0)
5151 {
5153 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5155 }
5156 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5157 {
5159 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5161 }
5162 }
5164
5165 if (index.numDocumentedModules()>0)
5166 {
5168 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5170 }
5171 if (index.numDocumentedGroups()>0)
5172 {
5174 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5176 }
5177 if (index.numDocumentedDirs()>0)
5178 {
5180 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5182 }
5183 if (index.numDocumentedNamespaces()>0)
5184 {
5186 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5188 }
5189 if (index.numDocumentedConcepts()>0)
5190 {
5192 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5194 }
5195 if (index.numAnnotatedInterfacesPrinted()>0)
5196 {
5198 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5200 }
5201 if (index.numAnnotatedClassesPrinted()>0)
5202 {
5204 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5206 }
5207 if (index.numAnnotatedStructsPrinted()>0)
5208 {
5210 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5212 }
5213 if (index.numAnnotatedExceptionsPrinted()>0)
5214 {
5216 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5218 }
5219 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5220 {
5222 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5224 }
5225 if (!Doxygen::exampleLinkedMap->empty())
5226 {
5228 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5230 }
5232 endFile(ol);
5233
5234 ol.popGeneratorState();
5235}
5236
5237static std::vector<bool> indexWritten;
5238
5240{
5241 auto isRef = [](const QCString &s)
5242 {
5243 return s.startsWith("@ref") || s.startsWith("\\ref");
5244 };
5245 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5246 const auto &index = Index::instance();
5247 for (const auto &lne : entries)
5248 {
5249 LayoutNavEntry::Kind kind = lne->kind();
5250 size_t idx = static_cast<size_t>(kind);
5251 if (idx>=indexWritten.size())
5252 {
5253 size_t oldSize = indexWritten.size();
5254 size_t newSize = idx+1;
5255 indexWritten.resize(newSize);
5256 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5257 }
5258 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5259 bool addToIndex=lne->visible();
5260 bool needsClosing=FALSE;
5261 if (!indexWritten.at(idx))
5262 {
5263 switch(kind)
5264 {
5265 case LayoutNavEntry::MainPage:
5266 msg("Generating index page...\n");
5267 writeIndex(ol);
5268 break;
5269 case LayoutNavEntry::Pages:
5270 msg("Generating page index...\n");
5271 writePageIndex(ol);
5272 break;
5273 case LayoutNavEntry::Topics:
5274 msg("Generating topic index...\n");
5275 writeTopicIndex(ol);
5276 break;
5277 case LayoutNavEntry::Modules:
5278 {
5279 if (index.numDocumentedModules()>0 && addToIndex)
5280 {
5281 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5282 Doxygen::indexList->incContentsDepth();
5283 needsClosing=TRUE;
5284 }
5285 }
5286 break;
5287 case LayoutNavEntry::ModuleList:
5288 msg("Generating module index...\n");
5289 writeModuleIndex(ol);
5290 break;
5291 case LayoutNavEntry::ModuleMembers:
5292 msg("Generating module member index...\n");
5294 break;
5295 case LayoutNavEntry::Namespaces:
5296 {
5297 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5298 if (showNamespaces)
5299 {
5300 if (index.numDocumentedNamespaces()>0 && addToIndex)
5301 {
5302 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5303 Doxygen::indexList->incContentsDepth();
5304 needsClosing=TRUE;
5305 }
5306 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5307 {
5308 msg("Generating namespace index...\n");
5310 }
5311 }
5312 }
5313 break;
5314 case LayoutNavEntry::NamespaceList:
5315 {
5316 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5317 if (showNamespaces)
5318 {
5319 msg("Generating namespace index...\n");
5321 }
5322 }
5323 break;
5324 case LayoutNavEntry::NamespaceMembers:
5325 msg("Generating namespace member index...\n");
5327 break;
5328 case LayoutNavEntry::Classes:
5329 if (index.numAnnotatedClasses()>0 && addToIndex)
5330 {
5331 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5332 Doxygen::indexList->incContentsDepth();
5333 needsClosing=TRUE;
5334 }
5335 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5336 {
5337 msg("Generating annotated compound index...\n");
5339 }
5340 break;
5341 case LayoutNavEntry::Concepts:
5342 msg("Generating concept index...\n");
5344 break;
5345 case LayoutNavEntry::ClassList:
5346 msg("Generating annotated compound index...\n");
5348 break;
5349 case LayoutNavEntry::ClassIndex:
5350 msg("Generating alphabetical compound index...\n");
5352 break;
5353 case LayoutNavEntry::ClassHierarchy:
5354 msg("Generating hierarchical class index...\n");
5356 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5357 {
5358 msg("Generating graphical class hierarchy...\n");
5360 }
5361 break;
5362 case LayoutNavEntry::ClassMembers:
5363 if (!sliceOpt)
5364 {
5365 msg("Generating member index...\n");
5367 }
5368 break;
5369 case LayoutNavEntry::Interfaces:
5370 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5371 {
5372 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5373 Doxygen::indexList->incContentsDepth();
5374 needsClosing=TRUE;
5375 }
5376 break;
5377 case LayoutNavEntry::InterfaceList:
5378 if (sliceOpt)
5379 {
5380 msg("Generating annotated interface index...\n");
5382 }
5383 break;
5384 case LayoutNavEntry::InterfaceIndex:
5385 if (sliceOpt)
5386 {
5387 msg("Generating alphabetical interface index...\n");
5389 }
5390 break;
5391 case LayoutNavEntry::InterfaceHierarchy:
5392 if (sliceOpt)
5393 {
5394 msg("Generating hierarchical interface index...\n");
5396 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5397 {
5398 msg("Generating graphical interface hierarchy...\n");
5400 }
5401 }
5402 break;
5403 case LayoutNavEntry::Structs:
5404 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5405 {
5406 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5407 Doxygen::indexList->incContentsDepth();
5408 needsClosing=TRUE;
5409 }
5410 break;
5411 case LayoutNavEntry::StructList:
5412 if (sliceOpt)
5413 {
5414 msg("Generating annotated struct index...\n");
5416 }
5417 break;
5418 case LayoutNavEntry::StructIndex:
5419 if (sliceOpt)
5420 {
5421 msg("Generating alphabetical struct index...\n");
5423 }
5424 break;
5425 case LayoutNavEntry::Exceptions:
5426 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5427 {
5428 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5429 Doxygen::indexList->incContentsDepth();
5430 needsClosing=TRUE;
5431 }
5432 break;
5433 case LayoutNavEntry::ExceptionList:
5434 if (sliceOpt)
5435 {
5436 msg("Generating annotated exception index...\n");
5438 }
5439 break;
5440 case LayoutNavEntry::ExceptionIndex:
5441 if (sliceOpt)
5442 {
5443 msg("Generating alphabetical exception index...\n");
5445 }
5446 break;
5447 case LayoutNavEntry::ExceptionHierarchy:
5448 if (sliceOpt)
5449 {
5450 msg("Generating hierarchical exception index...\n");
5452 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5453 {
5454 msg("Generating graphical exception hierarchy...\n");
5456 }
5457 }
5458 break;
5459 case LayoutNavEntry::Files:
5460 {
5461 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5462 {
5463 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5464 Doxygen::indexList->incContentsDepth();
5465 needsClosing=TRUE;
5466 }
5467 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5468 {
5469 msg("Generating file index...\n");
5470 writeFileIndex(ol);
5471 }
5472 }
5473 break;
5474 case LayoutNavEntry::FileList:
5475 msg("Generating file index...\n");
5476 writeFileIndex(ol);
5477 break;
5478 case LayoutNavEntry::FileGlobals:
5479 msg("Generating file member index...\n");
5481 break;
5482 case LayoutNavEntry::Examples:
5483 msg("Generating example index...\n");
5485 break;
5486 case LayoutNavEntry::User:
5487 if (addToIndex)
5488 {
5489 // prepend a ! or ^ marker to the URL to avoid tampering with it
5490 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5491 bool isRelative=url.at(0)=='!';
5492 if (!url.isEmpty() && !isRelative) // absolute URL
5493 {
5494 url.prepend("^"); // prepend ^ to absolute URL
5495 }
5496 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5497 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5498 }
5499 break;
5500 case LayoutNavEntry::UserGroup:
5501 if (addToIndex)
5502 {
5503 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5504 if (!url.isEmpty())
5505 {
5506 if (url=="!") // result of a "[none]" url
5507 {
5508 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5509 }
5510 else
5511 {
5512 bool isRelative=url.at(0)=='!';
5513 if (!isRelative) // absolute URL
5514 {
5515 url.prepend("^"); // prepend ^ to absolute URL
5516 }
5517 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5518 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5519 }
5520 }
5521 else
5522 {
5523 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5524 }
5525 Doxygen::indexList->incContentsDepth();
5526 needsClosing=TRUE;
5527 }
5528 writeUserGroupStubPage(ol,lne.get());
5529 break;
5530 case LayoutNavEntry::None:
5531 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5532 break;
5533 }
5534 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5535 {
5536 indexWritten.at(idx)=TRUE;
5537 }
5538 }
5539 writeIndexHierarchyEntries(ol,lne->children());
5540 if (needsClosing)
5541 {
5542 switch(kind)
5543 {
5544 case LayoutNavEntry::Modules:
5545 case LayoutNavEntry::Namespaces:
5546 case LayoutNavEntry::Classes:
5547 case LayoutNavEntry::Files:
5548 case LayoutNavEntry::UserGroup:
5549 Doxygen::indexList->decContentsDepth();
5550 break;
5551 default:
5552 break;
5553 }
5554 }
5555 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5556 }
5557
5558 // always write the directory index as it is used for non-HTML output only
5559 writeDirIndex(ol);
5560}
5561
5563{
5564 const auto &index = Index::instance();
5565 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5566 bool showFiles = Config_getBool(SHOW_FILES);
5567 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5568 switch (kind)
5569 {
5570 case LayoutNavEntry::MainPage: return TRUE;
5571 case LayoutNavEntry::User: return TRUE;
5572 case LayoutNavEntry::UserGroup: return TRUE;
5573 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5574 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5575 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5576 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5577 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5578 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5579 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5580 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5581 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5582 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5583 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5584 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5585 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5586 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5587 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5588 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5589 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5590 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5591 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5592 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5593 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5594 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5595 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5596 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5597 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5598 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5599 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5600 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5601 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5602 case LayoutNavEntry::None: // should never happen, means not properly initialized
5603 assert(kind != LayoutNavEntry::None);
5604 return FALSE;
5605 }
5606 return FALSE;
5607}
5608
5609template<class T>
5610void renderMemberIndicesAsJs(std::ostream &t,
5611 std::function<std::size_t(std::size_t)> numDocumented,
5612 std::function<Index::MemberIndexMap(std::size_t)> getMemberList,
5613 const T *(*getInfo)(size_t hl),
5614 std::size_t total)
5615{
5616 // index items per category member lists
5617 bool firstMember=TRUE;
5618 for (std::size_t i=0;i<total;i++)
5619 {
5620 if (numDocumented(i)>0)
5621 {
5622 t << ",";
5623 if (firstMember)
5624 {
5625 t << "children:[";
5626 firstMember=FALSE;
5627 }
5628 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5629 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5630
5631 // Check if we have many members, then add sub entries per letter...
5632 // quick alphabetical index
5633 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5634 if (quickIndex)
5635 {
5636 bool multiPageIndex=FALSE;
5637 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5638 {
5639 multiPageIndex=TRUE;
5640 }
5641 t << ",children:[\n";
5642 bool firstLetter=TRUE;
5643 for (const auto &[letter,list] : getMemberList(i))
5644 {
5645 if (!firstLetter) t << ",\n";
5646 QCString ci(letter);
5647 QCString is(letterToLabel(ci));
5648 QCString anchor;
5650 QCString fullName = getInfo(i)->fname;
5651 if (!multiPageIndex || firstLetter)
5652 anchor=fullName+extension+"#index_";
5653 else // other pages of multi page index
5654 anchor=fullName+"_"+is+extension+"#index_";
5655 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5656 << convertToJSString(anchor+convertToId(is)) << "\"}";
5657 firstLetter=FALSE;
5658 }
5659 t << "]";
5660 }
5661 t << "}";
5662 }
5663 }
5664 if (!firstMember)
5665 {
5666 t << "]";
5667 }
5668}
5669
5670static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5671{
5672 int count=0;
5673 for (const auto &entry : root->children())
5674 {
5675 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5676 }
5677 if (count>0) // at least one item is visible
5678 {
5679 bool firstChild = TRUE;
5680 if (!first) t << ",";
5681 t << "children:[\n";
5682 for (const auto &entry : root->children())
5683 {
5684 if (entry->visible() && quickLinkVisible(entry->kind()))
5685 {
5686 if (!firstChild) t << ",\n";
5687 firstChild=FALSE;
5688 QCString url = entry->url();
5689 if (isURL(url)) url = "^" + url;
5690 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5691 << convertToJSString(url) << "\"";
5692 bool hasChildren=FALSE;
5693 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5694 {
5695 auto numDoc = [](std::size_t i) {
5697 };
5698 auto memList = [](std::size_t i) {
5700 };
5701 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5702 }
5703 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5704 {
5705 auto numDoc = [](std::size_t i) {
5707 };
5708 auto memList = [](std::size_t i) {
5710 };
5711 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5712 }
5713 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5714 {
5715 auto numDoc = [](std::size_t i) {
5717 };
5718 auto memList = [](std::size_t i) {
5720 };
5721 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5722 }
5723 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5724 {
5725 auto numDoc = [](std::size_t i) {
5727 };
5728 auto memList = [](std::size_t i) {
5730 };
5731 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5732 }
5733 else // recursive into child list
5734 {
5735 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5736 }
5737 if (hasChildren) t << "]";
5738 t << "}";
5739 }
5740 }
5741 }
5742 return count>0;
5743}
5744
5745static void writeMenuData()
5746{
5747 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5748 QCString outputDir = Config_getBool(HTML_OUTPUT);
5750 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5751 if (t.is_open())
5752 {
5754 t << "var menudata={";
5755 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5756 if (hasChildren) t << "]";
5757 t << "}\n";
5758 }
5759}
5760
5762{
5763 writeMenuData();
5765 if (lne)
5766 {
5768 }
5769}
std::string m_letter
Definition index.cpp:2271
int row() const
Definition index.cpp:2267
const ClassDef * classDef() const
Definition index.cpp:2265
std::string letter() const
Definition index.cpp:2266
int column() const
Definition index.cpp:2268
AlphaIndexTableCell(int row, int col, const std::string &letter, const ClassDef *cd)
Definition index.cpp:2260
const ClassDef * m_class
Definition index.cpp:2272
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 writePageNavigation(OutputList &) 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 decContentsDepth()
Definition ftvhelp.cpp:154
void incContentsDepth()
Definition ftvhelp.cpp:143
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def, const QCString &nameAsHtml=QCString())
Definition ftvhelp.cpp:186
void generateTreeViewInline(TextStream &t)
Definition ftvhelp.cpp:873
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:2870
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:2934
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:2982
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:3034
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:674
void writeString(const QCString &text)
Definition outputlist.h:413
void writeSearchInfo()
Definition outputlist.h:399
void startIndexItem(const QCString &ref, const QCString &file)
Definition outputlist.h:435
void endTitleHead(const QCString &fileName, const QCString &name)
Definition outputlist.h:407
void endSection(const QCString &lab, SectionType t)
Definition outputlist.h:590
void endIndexValue(const QCString &name, bool b)
Definition outputlist.h:429
void startItemList()
Definition outputlist.h:431
void disable(OutputType o)
void startIndexKey()
Definition outputlist.h:423
void startTitleHead(const QCString &fileName)
Definition outputlist.h:405
void enable(OutputType o)
void endContents()
Definition outputlist.h:622
void endHeaderSection()
Definition outputlist.h:469
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:441
void endIndexItem(const QCString &ref, const QCString &file)
Definition outputlist.h:437
void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
Definition outputlist.h:670
void startFile(const QCString &name, const QCString &manName, const QCString &title, int hierarchyLevel=0)
void startHeaderSection()
Definition outputlist.h:467
void endIndexList()
Definition outputlist.h:421
void docify(const QCString &s)
Definition outputlist.h:439
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:409
void endPageDoc()
Definition outputlist.h:626
void endIndexSection(IndexSection is)
Definition outputlist.h:389
void endFile()
Definition outputlist.h:403
void startProjectNumber()
Definition outputlist.h:393
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:672
void endParagraph()
Definition outputlist.h:411
void endIndexKey()
Definition outputlist.h:425
void startQuickIndices()
Definition outputlist.h:604
void endTextLink()
Definition outputlist.h:446
void startItemListItem()
Definition outputlist.h:459
void endItemListItem()
Definition outputlist.h:461
void startTypewriter()
Definition outputlist.h:451
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void lastIndexPage()
Definition outputlist.h:676
void startIndexValue(bool b)
Definition outputlist.h:427
void endIndexListItem()
Definition outputlist.h:417
void endQuickIndices()
Definition outputlist.h:606
void startPageDoc(const QCString &pageTitle)
Definition outputlist.h:624
void writeSplitBar(const QCString &name, const QCString &allMembersFile)
Definition outputlist.h:608
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=Config_getBool(MARKDOWN_SUPPORT), bool autolinkSupport=Config_getBool(AUTOLINK_SUPPORT))
void endItemList()
Definition outputlist.h:433
void startContents()
Definition outputlist.h:620
void writeFooter(const QCString &navPath)
Definition outputlist.h:401
void startIndexList()
Definition outputlist.h:419
void enableAll()
void endProjectNumber()
Definition outputlist.h:395
void endTypewriter()
Definition outputlist.h:453
void startIndexListItem()
Definition outputlist.h:415
void parseText(const QCString &textStr)
void startSection(const QCString &lab, const QCString &title, SectionType t)
Definition outputlist.h:588
void startIndexSection(IndexSection is)
Definition outputlist.h:387
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:444
void writeQuickLinks(HighlightedItem hli, const QCString &file, bool extraTabs=false)
Definition outputlist.h:614
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:178
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
Definition * toDefinition(DefinitionMutable *dm)
static constexpr auto hex
static void addMembersToIndex()
Definition doxygen.cpp:8092
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition filedef.cpp:268
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
Definition filedef.cpp:1925
constexpr auto JAVASCRIPT_LICENSE_TEXT
Definition ftvhelp.h:72
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition htmlgen.cpp:2743
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4612
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1933
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:5239
static void writeClassTreeToOutput(OutputList &ol, const BaseClassList &bcl, int level, FTVHelp *ftv, bool addToIndex, ClassDefSet &visitedClasses)
Definition index.cpp:620
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition index.cpp:427
#define MAX_ITEMS_BEFORE_QUICK_INDEX
Definition index.cpp:56
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
Definition index.cpp:3321
#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:1906
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5670
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1205
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2680
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2523
static void writeDirIndex(OutputList &ol)
Definition index.cpp:1541
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3261
void writeGraphInfo(OutputList &ol)
Definition index.cpp:4063
static std::vector< bool > indexWritten
Definition index.cpp:5237
static int countConcepts()
Definition index.cpp:1709
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:394
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2652
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
Definition index.cpp:3132
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
Definition index.cpp:2153
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1570
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1310
static void endQuickIndexList(OutputList &ol)
Definition index.cpp:358
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2436
static int countClassHierarchy(ClassDef::CompoundType ct)
Definition index.cpp:1114
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:2666
static void writePageIndex(OutputList &ol)
Definition index.cpp:3989
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2023
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2005
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:5610
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2694
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1231
static void writeNamespaceMembers(const NamespaceDef *nd, bool addToIndex)
Definition index.cpp:1789
static void countRelatedPages(int &docPages, int &indexPages)
Definition index.cpp:3899
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4800
static int countGroups()
Definition index.cpp:4031
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3504
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1846
static bool mainPageHasOwnTitle()
Definition index.cpp:3917
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4381
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1726
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3809
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4673
static int countDirs()
Definition index.cpp:4047
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3298
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1415
bool isId1(int c)
Definition index.cpp:2226
static void writeFileLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevFileName)
Definition index.cpp:2720
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3665
static void writePages(PageDef *pd, FTVHelp *ftv)
Definition index.cpp:3928
static void countFiles(int &htmlFiles, int &files)
Definition index.cpp:1441
static void writeClassHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1063
static void writeSingleFileIndex(OutputList &ol, const FileDef *fd)
Definition index.cpp:1463
static void writeNamespaceLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
Definition index.cpp:2733
static void writeExampleIndex(OutputList &ol)
Definition index.cpp:3834
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
Definition index.cpp:401
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1090
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2465
static void endQuickIndexItem(OutputList &ol)
Definition index.cpp:377
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2577
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3480
const ClassDef * get_pointer(const Ptr &p)
static int countAnnotatedClasses(int *cp, ClassDef::CompoundType ct)
Definition index.cpp:2128
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2494
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4357
static void writeModuleMembers(const ModuleDef *mod, bool addToIndex)
Definition index.cpp:1815
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4622
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3110
static void writeDirHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:900
std::set< std::string > UsedIndexLetters
Definition index.cpp:2277
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4589
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
Definition index.cpp:2707
void writeIndexHierarchy(OutputList &ol)
Definition index.cpp:5761
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4497
static bool dirHasVisibleChildren(const DirDef *dd)
Definition index.cpp:728
static int countNamespaces()
Definition index.cpp:1698
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:2231
static void writeQuickMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, const std::string &page, QCString fullName, bool multiPage)
Definition index.cpp:3074
void endFileWithNavPath(OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
Definition index.cpp:448
static void writeConceptIndex(OutputList &ol)
Definition index.cpp:4695
static void writeModuleLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevModuleName)
Definition index.cpp:2746
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4521
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:4837
static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:756
static void startIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:307
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition index.cpp:5562
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4450
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1336
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3629
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1124
static void writeMenuData()
Definition index.cpp:5745
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4114
static void writeMemberToIndex(const Definition *def, const MemberDef *md, bool addToIndex)
Definition index.cpp:468
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2761
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3445
static void writeClassTreeForList(OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
Definition index.cpp:964
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3681
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2280
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
@ isDirDocumentation
Definition index.h:47
@ 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
@ isDirIndex
Definition index.h:38
@ 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:2569
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:2554
const ClassDef::CompoundType compoundType
Definition index.cpp:2572
const HighlightedItem hiItem
Definition index.cpp:2574
const QCString fileBaseName
Definition index.cpp:2573
const LayoutNavEntry::Kind listKind
Definition index.cpp:2568
const QCString listDefaultTitleText
Definition index.cpp:2570
const int numAnnotated
Definition index.cpp:2566
const QCString listDefaultIntroText
Definition index.cpp:2571
Helper class representing a class member in the navigation menu.
Definition index.cpp:3104
CmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3105
QCString title
Definition index.cpp:3107
const char * fname
Definition index.cpp:3106
Helper class representing a file member in the navigation menu.
Definition index.cpp:3292
FmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3293
const char * fname
Definition index.cpp:3294
QCString title
Definition index.cpp:3295
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:3659
MmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3660
QCString title
Definition index.cpp:3662
const char * fname
Definition index.cpp:3661
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3474
const char * fname
Definition index.cpp:3476
QCString title
Definition index.cpp:3477
NmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3475
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:6795
QCString parseCommentAsHtml(const Definition *scope, const MemberDef *member, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5927
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5876
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:6438
QCString filterTitle(const QCString &title)
Definition util.cpp:6127
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:6600
bool isURL(const QCString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:6426
QCString convertToJSString(const QCString &s, bool keepEntities)
Definition util.cpp:4536
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:310
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
Definition util.cpp:4210
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6410
QCString getDotImageExtension()
Definition util.cpp:6800
int getPrefixIndex(const QCString &name)
Definition util.cpp:3749
QCString convertToId(const QCString &s)
Definition util.cpp:4385
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5412
A bunch of utility functions.
QCString fixSpaces(const QCString &s)
Definition util.h:472