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