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
58constexpr auto alphaSepar = "<div class=\"alphasepar\"></div>";
59
60// helpers
62static void countFiles(int &htmlFiles,int &files);
63static int countGroups();
64static int countDirs();
65static int countNamespaces();
66static int countConcepts();
68static void countRelatedPages(int &docPages,int &indexPages);
69
70
72{
88 int indexedPages = 0;
92 std::array<int, ClassMemberHighlight::Total> documentedClassMembers = {};
93 std::array<int, FileMemberHighlight::Total> documentedFileMembers = {};
94 std::array<int,NamespaceMemberHighlight::Total> documentedNamespaceMembers = {};
95 std::array<int, ModuleMemberHighlight::Total> documentedModuleMembers = {};
96 std::array<MemberIndexMap,ClassMemberHighlight::Total> classIndexLetterUsed;
97 std::array<MemberIndexMap,FileMemberHighlight::Total> fileIndexLetterUsed;
98 std::array<MemberIndexMap,NamespaceMemberHighlight::Total> namespaceIndexLetterUsed;
99 std::array<MemberIndexMap,ModuleMemberHighlight::Total> moduleIndexLetterUsed;
100};
101
102Index::Index() : p(std::make_unique<Private>())
103{
104}
105
106Index::~Index() = default;
107
109{
110 static Index index;
111 return index;
112}
113
114int Index::numAnnotatedClasses() const { return p->annotatedClasses; }
115int Index::numAnnotatedClassesPrinted() const { return p->annotatedClassesPrinted; }
116int Index::numHierarchyClasses() const { return p->hierarchyClasses; }
117int Index::numAnnotatedInterfaces() const { return p->annotatedInterfaces; }
118int Index::numAnnotatedInterfacesPrinted() const { return p->annotatedInterfacesPrinted; }
119int Index::numHierarchyInterfaces() const { return p->hierarchyInterfaces; }
120int Index::numAnnotatedStructs() const { return p->annotatedStructs; }
121int Index::numAnnotatedStructsPrinted() const { return p->annotatedStructsPrinted; }
122int Index::numAnnotatedExceptions() const { return p->annotatedExceptions; }
123int Index::numAnnotatedExceptionsPrinted() const { return p->annotatedExceptionsPrinted; }
124int Index::numHierarchyExceptions() const { return p->hierarchyExceptions; }
125int Index::numDocumentedGroups() const { return p->documentedGroups; }
126int Index::numDocumentedNamespaces() const { return p->documentedNamespaces; }
127int Index::numDocumentedConcepts() const { return p->documentedConcepts; }
128int Index::numDocumentedModules() const { return p->documentedModules; }
129int Index::numIndexedPages() const { return p->indexedPages; }
130int Index::numDocumentedFiles() const { return p->documentedFiles; }
131int Index::numDocumentedPages() const { return p->documentedPages; }
132int Index::numDocumentedDirs() const { return p->documentedDirs; }
133int Index::numDocumentedClassMembers(ClassMemberHighlight::Enum e) const { return p->documentedClassMembers[e]; }
134int Index::numDocumentedFileMembers(FileMemberHighlight::Enum e) const { return p->documentedFileMembers[e]; }
135int Index::numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const { return p->documentedNamespaceMembers[e]; }
136int Index::numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const { return p->documentedModuleMembers[e]; }
137
139{
140 return p->classIndexLetterUsed[static_cast<int>(e)];
141}
142
144{
145 return p->fileIndexLetterUsed[static_cast<int>(e)];
146}
147
149{
150 return p->namespaceIndexLetterUsed[static_cast<int>(e)];
151}
152
154{
155 return p->moduleIndexLetterUsed[static_cast<int>(e)];
156}
157
159{
160 p->documentedClassMembers[i]=0;
161 p->classIndexLetterUsed[i].clear();
162}
163
165{
166 p->documentedFileMembers[i]=0;
167 p->fileIndexLetterUsed[i].clear();
168}
169
171{
172 p->documentedNamespaceMembers[i]=0;
173 p->namespaceIndexLetterUsed[i].clear();
174}
175
177{
178 p->documentedModuleMembers[i]=0;
179 p->moduleIndexLetterUsed[i].clear();
180}
181
182static void MemberIndexMap_add(Index::MemberIndexMap &map,const std::string &letter,const MemberDef *md)
183{
184 auto it = map.find(letter);
185 if (it!=map.end())
186 {
187 it->second.push_back(md);
188 }
189 else
190 {
191 map.emplace(letter,std::vector<const MemberDef*>({md}));
192 }
193}
194
195void Index::incrementDocumentedClassMembers(int i,const std::string &letter,const MemberDef *md)
196{
197 p->documentedClassMembers[i]++;
198 MemberIndexMap_add(p->classIndexLetterUsed[i],letter,md);
199}
200
201void Index::incrementDocumentedFileMembers(int i,const std::string &letter,const MemberDef *md)
202{
203 p->documentedFileMembers[i]++;
204 MemberIndexMap_add(p->fileIndexLetterUsed[i],letter,md);
205}
206
207void Index::incrementDocumentedNamespaceMembers(int i,const std::string &letter,const MemberDef *md)
208{
209 p->documentedNamespaceMembers[i]++;
210 MemberIndexMap_add(p->namespaceIndexLetterUsed[i],letter,md);
211}
212
213void Index::incrementDocumentedModuleMembers(int i,const std::string &letter,const MemberDef *md)
214{
215 p->documentedModuleMembers[i]++;
216 MemberIndexMap_add(p->moduleIndexLetterUsed[i],letter,md);
217}
218
219
221{
222 auto sortMemberIndexList = [](MemberIndexMap &map)
223 {
224 for (auto &[name,list] : map)
225 {
226 std::stable_sort(list.begin(),list.end(),
227 [](const MemberDef *md1,const MemberDef *md2)
228 {
229 // consider candidates A::a, B::b, B::a, A::b, A::A, B::B,
230 // want after sorting: A::A, A::a, B::a, B::B, A::b, B::b
231 // so we can later group entries
232 // - A: A
233 // - a: A, B
234 // - B: B
235 // - b: A, B
236 int result = qstricmp_sort(md1->name(),md2->name());
237 if (result==0) // next compare with full scope
238 {
239 result = qstricmp_sort(md1->qualifiedName(),md2->qualifiedName());
240 }
241 return result<0;
242 });
243 }
244 };
245
246 for (auto &idx : p->classIndexLetterUsed)
247 {
248 sortMemberIndexList(idx);
249 }
250 for (auto &idx : p->fileIndexLetterUsed)
251 {
252 sortMemberIndexList(idx);
253 }
254 for (auto &idx : p->namespaceIndexLetterUsed)
255 {
256 sortMemberIndexList(idx);
257 }
258 for (auto &idx : p->moduleIndexLetterUsed)
259 {
260 sortMemberIndexList(idx);
261 }
262}
263
265{
266 for (int j=0;j<ClassMemberHighlight::Total;j++)
267 {
269 }
270 for (int j=0;j<NamespaceMemberHighlight::Total;j++)
271 {
273 }
274 for (int j=0;j<FileMemberHighlight::Total;j++)
275 {
277 }
278 for (int j=0;j<ModuleMemberHighlight::Total;j++)
279 {
281 }
282
283 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
284 p->annotatedClasses = countAnnotatedClasses(&p->annotatedClassesPrinted, ClassDef::Class); // "classes" + "annotated"
285 p->hierarchyClasses = countClassHierarchy(ClassDef::Class); // "hierarchy"
286 // "interfaces" + "annotated"
287 p->annotatedInterfaces = sliceOpt ? countAnnotatedClasses(&p->annotatedInterfacesPrinted, ClassDef::Interface) : 0;
288 // "interfacehierarchy"
289 p->hierarchyInterfaces = sliceOpt ? countClassHierarchy(ClassDef::Interface) : 0;
290 // "structs" + "annotated"
291 p->annotatedStructs = sliceOpt ? countAnnotatedClasses(&p->annotatedStructsPrinted, ClassDef::Struct) : 0;
292 // "exceptions" + "annotated"
293 p->annotatedExceptions = sliceOpt ? countAnnotatedClasses(&p->annotatedExceptionsPrinted, ClassDef::Exception) : 0;
294 // "exceptionhierarchy"
295 p->hierarchyExceptions = sliceOpt ? countClassHierarchy(ClassDef::Exception) : 0;
296 countFiles(p->documentedFiles,p->documentedFiles); // "files"
297 countRelatedPages(p->documentedPages,p->indexedPages); // "pages"
298 p->documentedGroups = countGroups(); // "topics"
299 p->documentedNamespaces = countNamespaces(); // "namespaces"
300 p->documentedConcepts = countConcepts(); // "concepts"
301 p->documentedDirs = countDirs(); // "dirs"
302 p->documentedModules = ModuleManager::instance().numDocumentedModules();
303 // "globals"
304 // "namespacemembers"
305 // "functions"
306}
307
308
309static void startIndexHierarchy(OutputList &ol,int level)
310{
314 if (level<6) ol.startIndexList();
316
321 ol.startItemList();
323}
324
325static void endIndexHierarchy(OutputList &ol,int level)
326{
330 if (level<6) ol.endIndexList();
332
337 ol.endItemList();
339}
340
341//----------------------------------------------------------------------------
342
344
345//----------------------------------------------------------------------------
346
347static void startQuickIndexList(OutputList &ol,bool letterTabs=false)
348{
349 if (letterTabs)
350 {
351 ol.writeString(" <div id=\"navrow4\" class=\"tabs3\">\n");
352 }
353 else
354 {
355 ol.writeString(" <div id=\"navrow3\" class=\"tabs2\">\n");
356 }
357 ol.writeString(" <ul class=\"tablist\">\n");
358}
359
361{
362 ol.writeString(" </ul>\n");
363 ol.writeString(" </div>\n");
364}
365
366static void startQuickIndexItem(OutputList &ol,const QCString &l,
367 bool hl,bool /* compact */,bool &first)
368{
369 first=false;
370 ol.writeString(" <li");
371 if (hl) ol.writeString(" class=\"current\"");
372 ol.writeString("><a ");
373 ol.writeString("href=\"");
374 ol.writeString(l);
375 ol.writeString("\">");
376 ol.writeString("<span>");
377}
378
380{
381 ol.writeString("</span>");
382 ol.writeString("</a>");
383 ol.writeString("</li>\n");
384}
385
386void startTitle(OutputList &ol,const QCString &fileName,const DefinitionMutable *def)
387{
388 bool generateOutlinePanel = Config_getBool(GENERATE_TREEVIEW) && Config_getBool(PAGE_OUTLINE_PANEL);
390 if (!generateOutlinePanel && def) def->writeSummaryLinks(ol);
391 ol.startTitleHead(fileName);
394}
395
396void endTitle(OutputList &ol,const QCString &fileName,const QCString &name)
397{
399 ol.endTitleHead(fileName,name);
400 ol.endHeaderSection();
401}
402
403void startFile(OutputList &ol,const QCString &name,bool isSource,const QCString &manName,
404 const QCString &title,HighlightedItem hli,bool additionalIndices,
405 const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
406{
407 bool disableIndex = Config_getBool(DISABLE_INDEX);
408 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
409 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
410 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
411 ol.startFile(name,isSource,manName,title,hierarchyLevel);
413 if (!disableIndex && !quickLinksAfterSplitbar)
414 {
415 ol.writeQuickLinks(hli,name);
416 }
417 if (!additionalIndices)
418 {
419 ol.endQuickIndices();
420 }
421 ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name, allMembersFile);
422 if (quickLinksAfterSplitbar)
423 {
424 ol.writeQuickLinks(hli,name);
425 }
426 ol.writeSearchInfo();
427}
428
429void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents,
430 const QCString &navPath)
431{
432 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
435 if (!skipNavIndex)
436 {
437 if (!skipEndContents) ol.endContents();
438 if (generateTreeView)
439 {
440 ol.writeString("</div><!-- doc-content -->\n");
441 ol.writeString("</div><!-- container -->\n");
442 }
443 }
444
445 ol.writeFooter(navPath); // write the footer
447 ol.endFile();
448}
449
450void endFileWithNavPath(OutputList &ol,const DefinitionMutable *d,bool showPageNavigation)
451{
452 bool generateTreeview = Config_getBool(GENERATE_TREEVIEW);
453 bool generateOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
454 QCString navPath;
455 if (generateTreeview)
456 {
459 ol.writeString("</div><!-- doc-content -->\n");
460 if (generateOutlinePanel && showPageNavigation) d->writePageNavigation(ol);
461 ol.writeString("</div><!-- container -->\n");
463 navPath = toDefinition(const_cast<DefinitionMutable*>(d))->navigationPathAsString();
464 }
465 endFile(ol,generateTreeview,true,navPath);
466}
467
468//----------------------------------------------------------------------
469
470static void writeMemberToIndex(const Definition *def,const MemberDef *md,bool addToIndex)
471{
472 bool isAnonymous = md->isAnonymous();
473 const MemberVector &enumList = md->enumFieldList();
474 bool isDir = md->isEnumerate() && std::any_of(enumList.begin(),enumList.end(),[](const auto &emd) { return emd->hasDocumentation(); });
475 auto defType = def->definitionType();
476 bool namespaceMemberInFileDocs = md->getNamespaceDef() && defType==Definition::TypeFile;
477 bool lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
478 QCString name = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
479 md->qualifiedName() : md->name();
480 if (md->toAnonymousMember())
481 {
483 }
484 if (md->getOuterScope()==def ||
485 (md->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
487 {
489 name,md->getReference(),md->getOutputFileBase(),md->anchor(),false,lAddToIndex && md->getGroupDef()==nullptr);
490 }
491 else // inherited member
492 {
494 name,def->getReference(),def->getOutputFileBase(),md->anchor(),false,lAddToIndex && md->getGroupDef()==nullptr);
495 }
496 if (isDir)
497 {
498 if (!isAnonymous)
499 {
501 }
502 for (const auto &emd : enumList)
503 {
504 if (emd->hasDocumentation())
505 {
506 namespaceMemberInFileDocs = emd->getNamespaceDef() && defType==Definition::TypeFile;
507 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
508 QCString ename = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
509 emd->qualifiedName() : emd->name();
510 if (emd->getOuterScope()==def ||
511 (emd->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
513 {
515 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),false,lAddToIndex && emd->getGroupDef()==nullptr);
516 }
517 else // inherited member
518 {
520 ename,def->getReference(),def->getOutputFileBase(),emd->anchor(),false,lAddToIndex && emd->getGroupDef()==nullptr);
521 }
522 }
523 }
524 if (!isAnonymous)
525 {
527 }
528 }
529}
530
531//----------------------------------------------------------------------
532template<class T>
534 const QCString &name,const QCString &anchor,
535 bool addToIndex=true,bool preventSeparateIndex=false,
536 const ConceptLinkedRefMap *concepts = nullptr)
537
538{
539 int numClasses=0;
540 for (const auto &cd : def->getClasses())
541 {
542 if (cd->isLinkable()) numClasses++;
543 }
544 int numConcepts=0;
545 if (concepts)
546 {
547 for (const auto &cd : *concepts)
548 {
549 if (cd->isLinkable()) numConcepts++;
550 }
551 }
552 bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
553 Doxygen::indexList->addContentsItem(hasMembers,name,
554 def->getReference(),def->getOutputFileBase(),anchor,
555 hasMembers && !preventSeparateIndex,
556 addToIndex,
557 def,
558 convertToHtml(name));
559 //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
560 if (hasMembers || numClasses>0 || numConcepts>0)
561 {
563 for (const auto &lde : LayoutDocManager::instance().docEntries(part))
564 {
565 auto kind = lde->kind();
566 if (kind==LayoutDocEntry::MemberDef)
567 {
568 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
569 if (lmd)
570 {
571 MemberList *ml = def->getMemberList(lmd->type);
572 if (ml)
573 {
574 for (const auto &md : *ml)
575 {
576 if (md->visibleInIndex())
577 {
578 writeMemberToIndex(def,md,addToIndex);
579 }
580 }
581 }
582 }
583 }
584 else if (kind==LayoutDocEntry::NamespaceClasses ||
585 kind==LayoutDocEntry::FileClasses ||
586 kind==LayoutDocEntry::ClassNestedClasses ||
587 kind==LayoutDocEntry::ModuleClasses
588 )
589 {
590 for (const auto &cd : def->getClasses())
591 {
592 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
593 {
594 bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
595 bool isNestedClass = def->definitionType()==Definition::TypeClass;
596 addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
597 addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
598 preventSeparateIndex || cd->isEmbeddedInOuterScope());
599 }
600 }
601 }
602 else if ((kind==LayoutDocEntry::FileConcepts || kind==LayoutDocEntry::ModuleConcepts) && concepts)
603 {
604 for (const auto &cd : *concepts)
605 {
606 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
607 {
608 Doxygen::indexList->addContentsItem(false,cd->displayName(),
609 cd->getReference(),cd->getOutputFileBase(),QCString(),
610 addToIndex,
611 false,
612 cd);
613 }
614 }
615 }
616 }
617
619 }
620}
621
622
623//----------------------------------------------------------------------------
624/*! Generates HTML Help tree of classes */
625
626static void writeClassTreeToOutput(OutputList &ol,const BaseClassList &bcl,int level,FTVHelp* ftv,bool addToIndex,ClassDefSet &visitedClasses)
627{
628 if (bcl.empty()) return;
629 bool started=false;
630 for (const auto &bcd : bcl)
631 {
632 ClassDef *cd=bcd.classDef;
633 if (cd->getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
634 {
635 continue;
636 }
637
638 bool b = cd->getLanguage()==SrcLangExt::VHDL ? classHasVisibleRoot(cd->subClasses()) : classHasVisibleRoot(cd->baseClasses());
639
640 if (cd->isVisibleInHierarchy() && b) // classHasVisibleRoot(cd->baseClasses()))
641 {
642 if (!started)
643 {
644 startIndexHierarchy(ol,level);
645 if (addToIndex)
646 {
648 }
649 if (ftv)
650 {
651 ftv->incContentsDepth();
652 }
653 started=true;
654 }
656 //printf("Passed...\n");
657 bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
659 QCString escapedName = convertToHtml(cd->displayName()); // avoid objective-C '<Protocol>' to be interpreted as XML/HTML tag
660 //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
661 if (cd->isLinkable())
662 {
663 //printf("Writing class %s\n",qPrint(cd->displayName()));
666 cd->getDefLine(),
667 cd,
668 nullptr,
669 escapedName,
670 DocOptions()
671 .setSingleLine(true)
672 .setAutolinkSupport(false));
674 if (cd->isReference())
675 {
676 ol.startTypewriter();
677 ol.docify(" [external]");
678 ol.endTypewriter();
679 }
680 if (addToIndex)
681 {
683 }
684 if (ftv)
685 {
686 if (cd->getLanguage()==SrcLangExt::VHDL)
687 {
688 ftv->addContentsItem(hasChildren,bcd.usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),false,false,cd);
689 }
690 else
691 {
692 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),false,false,cd,escapedName);
693 }
694 }
695 }
696 else
697 {
699 ol.parseText(cd->name());
701 if (addToIndex)
702 {
704 }
705 if (ftv)
706 {
707 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),false,false,cd,escapedName);
708 }
709 }
710 if (hasChildren)
711 {
712 //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
713 visitedClasses.insert(cd);
714 if (cd->getLanguage()==SrcLangExt::VHDL)
715 {
716 writeClassTreeToOutput(ol,cd->baseClasses(),level+1,ftv,addToIndex,visitedClasses);
717 }
718 else
719 {
720 writeClassTreeToOutput(ol,cd->subClasses(),level+1,ftv,addToIndex,visitedClasses);
721 }
722 }
723 ol.endIndexListItem();
724 }
725 }
726 if (started)
727 {
728 endIndexHierarchy(ol,level);
729 if (addToIndex)
730 {
732 }
733 if (ftv)
734 {
735 ftv->decContentsDepth();
736 }
737 }
738}
739
740//----------------------------------------------------------------------------
741
742static bool dirHasVisibleChildren(const DirDef *dd)
743{
744 if (dd->hasDocumentation()) return true;
745
746 for (const auto &fd : dd->getFiles())
747 {
748 bool genSourceFile = false;
749 if (fileVisibleInIndex(fd,genSourceFile))
750 {
751 return true;
752 }
753 if (genSourceFile)
754 {
755 return true;
756 }
757 }
758
759 for(const auto &subdd : dd->subDirs())
760 {
761 if (dirHasVisibleChildren(subdd))
762 {
763 return true;
764 }
765 }
766 return false;
767}
768
769//----------------------------------------------------------------------------
770static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp* ftv,bool addToIndex)
771{
772 if (level>20)
773 {
774 warn(dd->getDefFileName(),dd->getDefLine(),
775 "maximum nesting level exceeded for directory {}: "
776 "check for possible recursive directory relation!",dd->name());
777 return;
778 }
779
780 if (!dirHasVisibleChildren(dd))
781 {
782 return;
783 }
784
785 bool tocExpand = true; //Config_getBool(TOC_EXPAND);
786 bool isDir = !dd->subDirs().empty() || // there are subdirs
787 (tocExpand && // or toc expand and
788 !dd->getFiles().empty() // there are files
789 );
790 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
791 if (addToIndex)
792 {
795 }
796 if (ftv)
797 {
798 ftv->addContentsItem(isDir,dd->shortName(),dd->getReference(),
799 dd->getOutputFileBase(),QCString(),false,true,dd);
800 ftv->incContentsDepth();
801 }
802
806 dd->getDefLine(),
807 dd,
808 nullptr,
809 dd->shortName(),
810 DocOptions()
811 .setSingleLine(true)
812 .setAutolinkSupport(false));
814 if (dd->isReference())
815 {
816 ol.startTypewriter();
817 ol.docify(" [external]");
818 ol.endTypewriter();
819 }
820
821 // write sub directories
822 if (dd->subDirs().size()>0)
823 {
824 startIndexHierarchy(ol,level+1);
825 for(const auto &subdd : dd->subDirs())
826 {
827 writeDirTreeNode(ol,subdd,level+1,ftv,addToIndex);
828 }
829 endIndexHierarchy(ol,level+1);
830 }
831
832 int fileCount=0;
833 if (!dd->getFiles().empty())
834 {
835 for (const auto &fd : dd->getFiles())
836 {
837 //bool allExternals = Config_getBool(ALLEXTERNALS);
838 //if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
839 //{
840 // fileCount++;
841 //}
842 bool genSourceFile = false;
843 if (fileVisibleInIndex(fd,genSourceFile))
844 {
845 fileCount++;
846 }
847 else if (genSourceFile)
848 {
849 fileCount++;
850 }
851 }
852 if (fileCount>0)
853 {
854 startIndexHierarchy(ol,level+1);
855 for (const auto &fd : dd->getFiles())
856 {
857 bool src = false;
858 bool doc = fileVisibleInIndex(fd,src);
859 QCString reference;
860 QCString outputBase;
861 if (doc)
862 {
863 reference = fd->getReference();
864 outputBase = fd->getOutputFileBase();
865 }
866 if (doc || src)
867 {
869 ol.startIndexItem(reference,outputBase);
870 ol.generateDoc(fd->getDefFileName(),
871 fd->getDefLine(),
872 fd,
873 nullptr,
874 fd->displayName(),
875 DocOptions()
876 .setSingleLine(true)
877 .setAutolinkSupport(false));
878 ol.endIndexItem(reference,outputBase);
879 ol.endIndexListItem();
880 if (ftv && (src || doc))
881 {
882 ftv->addContentsItem(false,
883 fd->displayName(),
884 reference,outputBase,
885 QCString(),false,false,fd);
886 }
887 }
888 }
889 endIndexHierarchy(ol,level+1);
890 }
891 }
892
893 if (tocExpand && addToIndex)
894 {
895 // write files of this directory
896 if (fileCount>0)
897 {
898 for (const auto &fd : dd->getFiles())
899 {
900 bool src = false;
901 bool doc = fileVisibleInIndex(fd,src);
902 if (doc)
903 {
904 addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),
905 !fd->isLinkableViaGroup(),false,&fd->getConcepts());
906 }
907 else if (src)
908 {
910 false, fd->name(), QCString(),
911 fd->getSourceFileBase(), QCString(), false, true, fd);
912 }
913 }
914 }
915 }
916 ol.endIndexListItem();
917
918 if (addToIndex)
919 {
921 }
922 if (ftv)
923 {
924 ftv->decContentsDepth();
925 }
926}
927
928static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
929{
930 if (ftv)
931 {
934 }
936 for (const auto &dd : *Doxygen::dirLinkedMap)
937 {
938 if (dd->getOuterScope()==Doxygen::globalScope)
939 {
940 writeDirTreeNode(ol,dd.get(),0,ftv,addToIndex);
941 }
942 }
943 if (ftv)
944 {
945 for (const auto &fn : *Doxygen::inputNameLinkedMap)
946 {
947 for (const auto &fd : *fn)
948 {
949 if (fd->getDirDef()==nullptr) // top level file
950 {
951 bool src = false;
952 bool doc = fileVisibleInIndex(fd.get(),src);
953 QCString reference, outputBase;
954 if (doc)
955 {
956 reference = fd->getReference();
957 outputBase = fd->getOutputFileBase();
958 }
959 if (doc || src)
960 {
961 ftv->addContentsItem(false,fd->displayName(),
962 reference, outputBase, QCString(),
963 false,false,fd.get());
964 }
965 if (addToIndex)
966 {
967 if (doc)
968 {
969 addMembersToIndex(fd.get(),LayoutDocManager::File,fd->displayName(),QCString(),true,false,&fd->getConcepts());
970 }
971 else if (src)
972 {
974 false, fd->displayName(), QCString(),
975 fd->getSourceFileBase(), QCString(), false, true, fd.get());
976 }
977 }
978 }
979 }
980 }
981 }
982 endIndexHierarchy(ol,0);
983 if (ftv)
984 {
986 }
987}
988
989
990//----------------------------------------------------------------------------
991
992static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &started,FTVHelp* ftv,bool addToIndex,
993 ClassDef::CompoundType ct,ClassDefSet &visitedClasses)
994{
995 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
996 for (const auto &cd : cl)
997 {
998 bool b = false;
999 if (cd->getLanguage()==SrcLangExt::VHDL)
1000 {
1001 if (VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
1002 {
1003 continue;
1004 }
1005 b=!classHasVisibleRoot(cd->subClasses());
1006 }
1007 else if (sliceOpt && cd->compoundType() != ct)
1008 {
1009 continue;
1010 }
1011 else
1012 {
1013 b=!classHasVisibleRoot(cd->baseClasses());
1014 }
1015
1016 if (b) //filter on root classes
1017 {
1018 if (cd->isVisibleInHierarchy()) // should it be visible
1019 {
1020 if (!started)
1021 {
1022 startIndexHierarchy(ol,0);
1023 if (addToIndex)
1024 {
1026 }
1027 started=true;
1028 }
1029 ol.startIndexListItem();
1030 bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
1031 classHasVisibleChildren(cd.get());
1032 //printf("list: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
1033 QCString escapedName = convertToHtml(cd->displayName()); // avoid objective-C '<Protocol>' to be interpreted as XML/HTML tag
1034 if (cd->isLinkable())
1035 {
1036 //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->isImplicitTemplateinstance()=%d\n",
1037 // qPrint(cd->displayName()),cd->isLinkable(),cd->isLinkableInProject(),cd->isImplicitTemplateInstance());
1038 ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
1039 ol.generateDoc(cd->getDefFileName(),
1040 cd->getDefLine(),
1041 cd.get(),
1042 nullptr,
1043 escapedName,
1044 DocOptions()
1045 .setSingleLine(true)
1046 .setAutolinkSupport(false));
1047 ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
1048 if (cd->isReference())
1049 {
1050 ol.startTypewriter();
1051 ol.docify(" [external]");
1052 ol.endTypewriter();
1053 }
1054 if (addToIndex)
1055 {
1056 if (cd->getLanguage()!=SrcLangExt::VHDL) // prevents double insertion in Design Unit List
1057 {
1058 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),false,false,cd.get(),escapedName);
1059 }
1060 }
1061 if (ftv)
1062 {
1063 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),false,false,cd.get(),escapedName);
1064 }
1065 }
1066 else
1067 {
1069 ol.parseText(cd->displayName());
1071 if (addToIndex)
1072 {
1073 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),false,false,cd.get(),escapedName);
1074 }
1075 if (ftv)
1076 {
1077 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),false,false,cd.get(),escapedName);
1078 }
1079 }
1080 if (cd->getLanguage()==SrcLangExt::VHDL && hasChildren)
1081 {
1082 writeClassTreeToOutput(ol,cd->baseClasses(),1,ftv,addToIndex,visitedClasses);
1083 visitedClasses.insert(cd.get());
1084 }
1085 else if (hasChildren)
1086 {
1087 writeClassTreeToOutput(ol,cd->subClasses(),1,ftv,addToIndex,visitedClasses);
1088 visitedClasses.insert(cd.get());
1089 }
1090 ol.endIndexListItem();
1091 }
1092 }
1093 }
1094}
1095
1096static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex,ClassDef::CompoundType ct)
1097{
1098 ClassDefSet visitedClasses;
1099 if (ftv)
1100 {
1101 ol.pushGeneratorState();
1103 }
1104 bool started=false;
1105 writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1106 writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1107 if (started)
1108 {
1109 endIndexHierarchy(ol,0);
1110 if (addToIndex)
1111 {
1113 }
1114 }
1115 if (ftv)
1116 {
1117 ol.popGeneratorState();
1118 }
1119}
1120
1121//----------------------------------------------------------------------------
1122
1124{
1125 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1126 int count=0;
1127 for (const auto &cd : cl)
1128 {
1129 if (sliceOpt && cd->compoundType() != ct)
1130 {
1131 continue;
1132 }
1133 if (!classHasVisibleRoot(cd->baseClasses())) // filter on root classes
1134 {
1135 if (cd->isVisibleInHierarchy()) // should it be visible
1136 {
1137 if (!cd->subClasses().empty()) // should have sub classes
1138 {
1139 count++;
1140 }
1141 }
1142 }
1143 }
1144 return count;
1145}
1146
1148{
1149 int count=0;
1152 return count;
1153}
1154
1155//----------------------------------------------------------------------------
1156
1158{
1159 if (Index::instance().numHierarchyClasses()==0) return;
1160 ol.pushGeneratorState();
1161 //1.{
1164
1165 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1166 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1167 bool addToIndex = lne==nullptr || lne->visible();
1168
1169 startFile(ol,"hierarchy",false,QCString(), title, HighlightedItem::ClassHierarchy);
1170 startTitle(ol,QCString());
1171 ol.parseText(title);
1172 endTitle(ol,QCString(),QCString());
1173 ol.startContents();
1174 ol.startTextBlock();
1175
1176 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1177 {
1178 ol.pushGeneratorState();
1182 ol.startParagraph();
1183 ol.startTextLink("inherits",QCString());
1185 ol.endTextLink();
1186 ol.endParagraph();
1187 ol.popGeneratorState();
1188 }
1190 ol.endTextBlock();
1191
1192 // ---------------
1193 // Static class hierarchy for Latex/RTF
1194 // ---------------
1195 ol.pushGeneratorState();
1196 //2.{
1199
1200 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Class);
1201
1203 ol.popGeneratorState();
1204 //2.}
1205
1206 // ---------------
1207 // Dynamic class hierarchical index for HTML
1208 // ---------------
1209 ol.pushGeneratorState();
1210 //2.{
1212
1213 {
1214 if (addToIndex)
1215 {
1216 Doxygen::indexList->addContentsItem(true,title,QCString(),"hierarchy",QCString(),true,true);
1217 }
1218 FTVHelp ftv(false);
1219 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Class);
1220 TextStream t;
1222 ol.pushGeneratorState();
1224 ol.writeString(t.str());
1225 ol.popGeneratorState();
1226 }
1227 ol.popGeneratorState();
1228 //2.}
1229 // ------
1230
1231 endFile(ol);
1232 ol.popGeneratorState();
1233 //1.}
1234}
1235
1236//----------------------------------------------------------------------------
1237
1239{
1240 if (Index::instance().numHierarchyClasses()==0) return;
1242 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1243 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1244 startFile(ol,"inherits",false,QCString(),title,HighlightedItem::ClassHierarchy,false,"hierarchy");
1245 startTitle(ol,QCString());
1246 ol.parseText(title);
1247 endTitle(ol,QCString(),QCString());
1248 ol.startContents();
1249 ol.startTextBlock();
1250 ol.startParagraph();
1251 ol.startTextLink("hierarchy",QCString());
1253 ol.endTextLink();
1254 ol.endParagraph();
1255 ol.endTextBlock();
1258 endFile(ol);
1259 ol.enableAll();
1260}
1261
1262//----------------------------------------------------------------------------
1263
1265{
1266 if (Index::instance().numHierarchyInterfaces()==0) return;
1267 ol.pushGeneratorState();
1268 //1.{
1270
1271 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1272 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1273 bool addToIndex = lne==nullptr || lne->visible();
1274
1275 startFile(ol,"interfacehierarchy",false,QCString(), title, HighlightedItem::InterfaceHierarchy);
1276 startTitle(ol,QCString());
1277 ol.parseText(title);
1278 endTitle(ol,QCString(),QCString());
1279 ol.startContents();
1280 ol.startTextBlock();
1281
1282 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1283 {
1286 ol.startParagraph();
1287 ol.startTextLink("interfaceinherits",QCString());
1289 ol.endTextLink();
1290 ol.endParagraph();
1293 }
1295 ol.endTextBlock();
1296
1297 // ---------------
1298 // Static interface hierarchy for Latex/RTF
1299 // ---------------
1300 ol.pushGeneratorState();
1301 //2.{
1304
1305 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Interface);
1306
1308 ol.popGeneratorState();
1309 //2.}
1310
1311 // ---------------
1312 // Dynamic interface hierarchical index for HTML
1313 // ---------------
1314 ol.pushGeneratorState();
1315 //2.{
1317
1318 {
1319 if (addToIndex)
1320 {
1321 Doxygen::indexList->addContentsItem(true,title,QCString(),"interfacehierarchy",QCString(),true,true);
1322 }
1323 FTVHelp ftv(false);
1324 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Interface);
1325 TextStream t;
1327 ol.pushGeneratorState();
1329 ol.writeString(t.str());
1330 ol.popGeneratorState();
1331 }
1332 ol.popGeneratorState();
1333 //2.}
1334 // ------
1335
1336 endFile(ol);
1337 ol.popGeneratorState();
1338 //1.}
1339}
1340
1341//----------------------------------------------------------------------------
1342
1344{
1345 if (Index::instance().numHierarchyInterfaces()==0) return;
1347 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1348 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1349 startFile(ol,"interfaceinherits",false,QCString(),title,HighlightedItem::InterfaceHierarchy,false,"interfacehierarchy");
1350 startTitle(ol,QCString());
1351 ol.parseText(title);
1352 endTitle(ol,QCString(),QCString());
1353 ol.startContents();
1354 ol.startTextBlock();
1355 ol.startParagraph();
1356 ol.startTextLink("interfacehierarchy",QCString());
1358 ol.endTextLink();
1359 ol.endParagraph();
1360 ol.endTextBlock();
1363 endFile(ol);
1364 ol.enableAll();
1365}
1366
1367//----------------------------------------------------------------------------
1368
1370{
1371 if (Index::instance().numHierarchyExceptions()==0) return;
1372 ol.pushGeneratorState();
1373 //1.{
1375
1376 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1377 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1378 bool addToIndex = lne==nullptr || lne->visible();
1379
1380 startFile(ol,"exceptionhierarchy",false,QCString(), title, HighlightedItem::ExceptionHierarchy);
1381 startTitle(ol,QCString());
1382 ol.parseText(title);
1383 endTitle(ol,QCString(),QCString());
1384 ol.startContents();
1385 ol.startTextBlock();
1386
1387 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1388 {
1391 ol.startParagraph();
1392 ol.startTextLink("exceptioninherits",QCString());
1394 ol.endTextLink();
1395 ol.endParagraph();
1398 }
1400 ol.endTextBlock();
1401
1402 // ---------------
1403 // Static exception hierarchy for Latex/RTF
1404 // ---------------
1405 ol.pushGeneratorState();
1406 //2.{
1409
1410 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Exception);
1411
1413 ol.popGeneratorState();
1414 //2.}
1415
1416 // ---------------
1417 // Dynamic exception hierarchical index for HTML
1418 // ---------------
1419 ol.pushGeneratorState();
1420 //2.{
1422
1423 {
1424 if (addToIndex)
1425 {
1426 Doxygen::indexList->addContentsItem(true,title,QCString(),"exceptionhierarchy",QCString(),true,true);
1427 }
1428 FTVHelp ftv(false);
1429 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Exception);
1430 TextStream t;
1432 ol.pushGeneratorState();
1434 ol.writeString(t.str());
1435 ol.popGeneratorState();
1436 }
1437 ol.popGeneratorState();
1438 //2.}
1439 // ------
1440
1441 endFile(ol);
1442 ol.popGeneratorState();
1443 //1.}
1444}
1445
1446//----------------------------------------------------------------------------
1447
1449{
1450 if (Index::instance().numHierarchyExceptions()==0) return;
1452 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1453 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1454 startFile(ol,"exceptioninherits",false,QCString(),title,HighlightedItem::ExceptionHierarchy,false,"exceptionhierarchy");
1455 startTitle(ol,QCString());
1456 ol.parseText(title);
1457 endTitle(ol,QCString(),QCString());
1458 ol.startContents();
1459 ol.startTextBlock();
1460 ol.startParagraph();
1461 ol.startTextLink("exceptionhierarchy",QCString());
1463 ol.endTextLink();
1464 ol.endParagraph();
1465 ol.endTextBlock();
1468 endFile(ol);
1469 ol.enableAll();
1470}
1471
1472//----------------------------------------------------------------------------
1473
1474static void countFiles(int &allFiles,int &docFiles)
1475{
1476 allFiles=0;
1477 docFiles=0;
1478 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1479 {
1480 for (const auto &fd: *fn)
1481 {
1482 bool src = false;
1483 bool doc = fileVisibleInIndex(fd.get(),src);
1484 if (doc || src)
1485 {
1486 allFiles++;
1487 }
1488 if (doc)
1489 {
1490 docFiles++;
1491 }
1492 }
1493 }
1494}
1495
1496static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
1497{
1498 //printf("Found filedef %s\n",qPrint(fd->name()));
1499 bool doc = fd->isLinkableInProject();
1500 bool src = fd->generateSourceFile();
1501 bool nameOk = !fd->isDocumentationFile();
1502 if (nameOk && (doc || src) && !fd->isReference())
1503 {
1504 QCString path;
1505 if (Config_getBool(FULL_PATH_NAMES))
1506 {
1507 path=stripFromPath(fd->getPath());
1508 }
1509 QCString fullName=fd->name();
1510 if (!path.isEmpty())
1511 {
1512 if (path.at(path.length()-1)!='/') fullName.prepend("/");
1513 fullName.prepend(path);
1514 }
1515
1516 ol.startIndexKey();
1517 ol.docify(path);
1518 if (doc)
1519 {
1521 //if (addToIndex)
1522 //{
1523 // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1524 //}
1525 }
1526 else if (src)
1527 {
1529 }
1530 if (doc && src)
1531 {
1532 ol.pushGeneratorState();
1534 ol.docify(" ");
1536 ol.docify("[");
1538 ol.docify("]");
1539 ol.endTextLink();
1540 ol.popGeneratorState();
1541 }
1542 ol.endIndexKey();
1543 bool hasBrief = !fd->briefDescription().isEmpty();
1544 ol.startIndexValue(hasBrief);
1545 if (hasBrief)
1546 {
1547 ol.generateDoc(fd->briefFile(),
1548 fd->briefLine(),
1549 fd,
1550 nullptr,
1551 fd->briefDescription(true),
1552 DocOptions()
1553 .setSingleLine(true)
1554 .setLinkFromIndex(true));
1555 }
1556 if (doc)
1557 {
1558 ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1559 }
1560 else // src
1561 {
1562 ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1563 }
1564 //ol.popGeneratorState();
1565 // --------------------------------------------------------
1566 }
1567}
1568//----------------------------------------------------------------------------
1569
1571{
1572 if (Index::instance().numDocumentedDirs()==0) return;
1573 ol.pushGeneratorState();
1575
1577 startFile(ol,"dirs",false,QCString(),title,HighlightedItem::Files);
1578 startTitle(ol,title);
1579 ol.parseText(title);
1580 endTitle(ol,QCString(),QCString());
1581
1582 ol.startIndexList();
1583 for (const auto &dir : *Doxygen::dirLinkedMap)
1584 {
1585 if (dir->hasDocumentation())
1586 {
1587 writeDirTreeNode(ol, dir.get(), 1, nullptr, false);
1588 }
1589 }
1590
1591 ol.endIndexList();
1592
1593 endFile(ol);
1594 ol.popGeneratorState();
1595}
1596
1597//----------------------------------------------------------------------------
1598
1600{
1601 if (Index::instance().numDocumentedFiles()==0 || !Config_getBool(SHOW_FILES)) return;
1602
1603 ol.pushGeneratorState();
1606
1607 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileList);
1608 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files); // fall back
1609 QCString title = lne ? lne->title() : theTranslator->trFileList();
1610 bool addToIndex = lne==nullptr || lne->visible();
1611
1612 startFile(ol,"files",false,QCString(),title,HighlightedItem::Files);
1613 startTitle(ol,QCString());
1614 //if (!Config_getString(PROJECT_NAME).isEmpty())
1615 //{
1616 // title.prepend(Config_getString(PROJECT_NAME)+" ");
1617 //}
1618 ol.parseText(title);
1619 endTitle(ol,QCString(),QCString());
1620 ol.startContents();
1621 ol.startTextBlock();
1622
1623 if (addToIndex)
1624 {
1625 Doxygen::indexList->addContentsItem(true,title,QCString(),"files",QCString(),true,true);
1627 }
1628
1629 ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool(EXTRACT_ALL)));
1630 ol.endTextBlock();
1631
1632 // ---------------
1633 // Flat file index
1634 // ---------------
1635
1636 // 1. {
1637 ol.pushGeneratorState();
1639
1640 ol.startIndexList();
1641 if (Config_getBool(FULL_PATH_NAMES))
1642 {
1643 std::unordered_map<std::string,size_t> pathMap;
1644 std::vector<FilesInDir> outputFiles;
1645
1646 // re-sort input files in (dir,file) output order instead of (file,dir) input order
1647 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1648 {
1649 for (const auto &fd : *fn)
1650 {
1651 QCString path=fd->getPath();
1652 if (path.isEmpty()) path="[external]";
1653 auto it = pathMap.find(path.str());
1654 if (it!=pathMap.end()) // existing path -> append
1655 {
1656 outputFiles.at(it->second).files.push_back(fd.get());
1657 }
1658 else // new path -> create path entry + append
1659 {
1660 pathMap.emplace(path.str(),outputFiles.size());
1661 outputFiles.emplace_back(path);
1662 outputFiles.back().files.push_back(fd.get());
1663 }
1664 }
1665 }
1666
1667 // sort the files by path
1668 std::stable_sort(outputFiles.begin(),
1669 outputFiles.end(),
1670 [](const auto &fp1,const auto &fp2) { return qstricmp_sort(fp1.path,fp2.path)<0; });
1671 // sort the files inside the directory by name
1672 for (auto &fp : outputFiles)
1673 {
1674 std::stable_sort(fp.files.begin(), fp.files.end(), compareFileDefs);
1675 }
1676 // write the results
1677 for (const auto &fp : outputFiles)
1678 {
1679 for (const auto &fd : fp.files)
1680 {
1681 writeSingleFileIndex(ol,fd);
1682 }
1683 }
1684 }
1685 else
1686 {
1687 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1688 {
1689 for (const auto &fd : *fn)
1690 {
1691 writeSingleFileIndex(ol,fd.get());
1692 }
1693 }
1694 }
1695 ol.endIndexList();
1696
1697 // 1. }
1698 ol.popGeneratorState();
1699
1700 // ---------------
1701 // Hierarchical file index for HTML
1702 // ---------------
1703 ol.pushGeneratorState();
1705
1706 {
1707 FTVHelp ftv(false);
1708 writeDirHierarchy(ol,&ftv,addToIndex);
1709 TextStream t;
1711 ol.writeString(t.str());
1712 }
1713
1714 ol.popGeneratorState();
1715 // ------
1716
1717 if (addToIndex)
1718 {
1720 }
1721
1722 endFile(ol);
1723 ol.popGeneratorState();
1724}
1725
1726//----------------------------------------------------------------------------
1728{
1729 int count=0;
1730 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1731 {
1732 if (nd->isLinkableInProject()) count++;
1733 }
1734 return count;
1735}
1736
1737//----------------------------------------------------------------------------
1738static int countConcepts()
1739{
1740 int count=0;
1741 for (const auto &cd : *Doxygen::conceptLinkedMap)
1742 {
1743 if (cd->isLinkableInProject()) count++;
1744 }
1745 return count;
1746}
1747
1748
1749//----------------------------------------------------------------------------
1750template<typename Ptr> const ClassDef *get_pointer(const Ptr &p);
1751template<> const ClassDef *get_pointer(const ClassLinkedMap::Ptr &p) { return p.get(); }
1752template<> const ClassDef *get_pointer(const ClassLinkedRefMap::Ptr &p) { return p; }
1753
1754template<class ListType>
1755static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool globalOnly,ClassDef::CompoundType ct)
1756{
1757 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1758 for (const auto &cdi : cl)
1759 {
1760 const ClassDef *cd = get_pointer(cdi);
1761 if (cd->getLanguage()==SrcLangExt::VHDL)
1762 {
1765 )// no architecture
1766 {
1767 continue;
1768 }
1769 }
1770
1771 if (sliceOpt && cd->compoundType() != ct)
1772 {
1773 continue;
1774 }
1775
1776 if (!globalOnly ||
1777 cd->getOuterScope()==nullptr ||
1779 )
1780 {
1781 int count=0;
1782 for (const auto &ccd : cd->getClasses())
1783 {
1784 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1785 {
1786 count++;
1787 }
1788 }
1790 {
1791 QCString displayName = cd->displayName(false);
1792 if (ftv)
1793 {
1794 ftv->addContentsItem(count>0,displayName,cd->getReference(),
1795 cd->getOutputFileBase(),cd->anchor(),false,true,cd,convertToHtml(displayName));
1796 }
1797 if (addToIndex &&
1798 (cd->getOuterScope()==nullptr ||
1800 )
1801 )
1802 {
1803 addMembersToIndex(cd,LayoutDocManager::Class,
1804 displayName,
1805 cd->anchor(),
1806 cd->partOfGroups().empty() && !cd->isSimple());
1807 }
1808 if (count>0)
1809 {
1810 if (ftv) ftv->incContentsDepth();
1811 writeClassTree(cd->getClasses(),ftv,addToIndex,false,ct);
1812 if (ftv) ftv->decContentsDepth();
1813 }
1814 }
1815 }
1816 }
1817}
1818
1819static void writeNamespaceMembers(const NamespaceDef *nd,bool addToIndex)
1820{
1821 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1822 {
1823 if (lde->kind()==LayoutDocEntry::MemberDef)
1824 {
1825 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1826 if (lmd)
1827 {
1828 MemberList *ml = nd->getMemberList(lmd->type);
1829 if (ml)
1830 {
1831 for (const auto &md : *ml)
1832 {
1833 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1834 if (md->visibleInIndex())
1835 {
1836 writeMemberToIndex(nd,md,addToIndex);
1837 }
1838 }
1839 }
1840 }
1841 }
1842 }
1843}
1844
1845static void writeModuleMembers(const ModuleDef *mod,bool addToIndex)
1846{
1847 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Module))
1848 {
1849 if (lde->kind()==LayoutDocEntry::MemberDecl)
1850 {
1851 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1852 if (lmd)
1853 {
1854 MemberList *ml = mod->getMemberList(lmd->type);
1855 if (ml)
1856 {
1857 for (const auto &md : *ml)
1858 {
1859 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1860 if (md->visibleInIndex())
1861 {
1862 writeMemberToIndex(mod,md,addToIndex);
1863 }
1864 }
1865 }
1866 }
1867 }
1868 }
1869}
1870
1871
1872static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex);
1873static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1874 bool rootOnly,bool addToIndex);
1875
1877 bool rootOnly,bool addToIndex)
1878{
1879 if (!nd->isAnonymous() &&
1880 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1881 {
1882
1883 bool hasNestedNamespace = namespaceHasNestedNamespace(nd);
1884 bool hasChildren = hasNestedNamespace ||
1887 bool isLinkable = nd->isLinkable();
1888 int visibleMembers = nd->countVisibleMembers();
1889
1890 //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
1891
1892 QCString ref;
1893 QCString file;
1894 if (isLinkable)
1895 {
1896 ref = nd->getReference();
1897 file = nd->getOutputFileBase();
1898 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1899 {
1900 file=file.replace(0,qstrlen("namespace"),"class");
1901 }
1902 }
1903
1904 bool isDir = hasChildren || visibleMembers>0;
1905 if (isLinkable || isDir)
1906 {
1907 ftv->addContentsItem(hasNestedNamespace,nd->localName(),ref,file,QCString(),false,nd->partOfGroups().empty(),nd);
1908
1909 if (addToIndex)
1910 {
1911 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1912 hasChildren && !file.isEmpty(),nd->partOfGroups().empty());
1913 }
1914 if (addToIndex && isDir)
1915 {
1917 }
1918
1919 if (isDir)
1920 {
1921 ftv->incContentsDepth();
1922 writeNamespaceTree(nd->getNamespaces(),ftv,false,addToIndex);
1923 writeClassTree(nd->getClasses(),nullptr,addToIndex,false,ClassDef::Class);
1924 writeConceptList(nd->getConcepts(),nullptr,addToIndex);
1925 writeNamespaceMembers(nd,addToIndex);
1926 ftv->decContentsDepth();
1927 }
1928 if (addToIndex && isDir)
1929 {
1931 }
1932 }
1933 }
1934}
1935
1936static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1937 bool rootOnly,bool addToIndex)
1938{
1939 for (const auto &nd : nsLinkedMap)
1940 {
1941 if (nd->isVisibleInHierarchy())
1942 {
1943 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1944 }
1945 }
1946}
1947
1948static void writeNamespaceTree(const NamespaceLinkedMap &nsLinkedMap,FTVHelp *ftv,
1949 bool rootOnly,bool addToIndex)
1950{
1951 for (const auto &nd : nsLinkedMap)
1952 {
1953 if (nd->isVisibleInHierarchy())
1954 {
1955 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1956 }
1957 }
1958}
1959
1960static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1961 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct);
1962
1964 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1965{
1966 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1967 if (!nd->isAnonymous() &&
1968 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1969 {
1970 bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
1971 bool isLinkable = nd->isLinkableInProject();
1972
1973 //printf("writeClassTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
1974
1975 QCString ref;
1976 QCString file;
1977 if (isLinkable)
1978 {
1979 ref = nd->getReference();
1980 file = nd->getOutputFileBase();
1981 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1982 {
1983 file=file.replace(0,qstrlen("namespace"),"class");
1984 }
1985 }
1986
1987 if (isDir)
1988 {
1989 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),false,true,nd);
1990
1991 if (addToIndex)
1992 {
1993 // the namespace entry is already shown under the namespace list so don't
1994 // add it to the nav index and don't create a separate index file for it otherwise
1995 // it will overwrite the one written for the namespace list.
1996 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1997 false, // separateIndex
1998 false // addToNavIndex
1999 );
2000 }
2001 if (addToIndex)
2002 {
2004 }
2005
2006 ftv->incContentsDepth();
2007 writeClassTreeInsideNamespace(nd->getNamespaces(),ftv,false,addToIndex,ct);
2008 ClassLinkedRefMap d = nd->getClasses();
2009 if (sliceOpt)
2010 {
2011 if (ct == ClassDef::Interface)
2012 {
2013 d = nd->getInterfaces();
2014 }
2015 else if (ct == ClassDef::Struct)
2016 {
2017 d = nd->getStructs();
2018 }
2019 else if (ct == ClassDef::Exception)
2020 {
2021 d = nd->getExceptions();
2022 }
2023 }
2024 writeClassTree(d,ftv,addToIndex,false,ct);
2025 ftv->decContentsDepth();
2026
2027 if (addToIndex)
2028 {
2030 }
2031 }
2032 }
2033}
2034
2036 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
2037{
2038 for (const auto &nd : nsLinkedMap)
2039 {
2040 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
2041 }
2042}
2043
2045 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
2046{
2047 for (const auto &nd : nsLinkedMap)
2048 {
2049 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
2050 }
2051}
2052
2054{
2055 if (Index::instance().numDocumentedNamespaces()==0) return;
2056 ol.pushGeneratorState();
2059 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceList);
2060 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
2061 QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
2062 bool addToIndex = lne==nullptr || lne->visible();
2063 startFile(ol,"namespaces",false,QCString(),title,HighlightedItem::Namespaces);
2064 startTitle(ol,QCString());
2065 ol.parseText(title);
2066 endTitle(ol,QCString(),QCString());
2067 ol.startContents();
2068 ol.startTextBlock();
2069 ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
2070 ol.endTextBlock();
2071
2072 bool first=true;
2073
2074 // ---------------
2075 // Linear namespace index for Latex/RTF
2076 // ---------------
2077 ol.pushGeneratorState();
2079
2080 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2081 {
2082 if (nd->isLinkableInProject())
2083 {
2084 if (first)
2085 {
2086 ol.startIndexList();
2087 first=false;
2088 }
2089 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
2090 ol.startIndexKey();
2091 if (nd->getLanguage()==SrcLangExt::VHDL)
2092 {
2093 ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
2094 }
2095 else
2096 {
2097 ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
2098 }
2099 ol.endIndexKey();
2100
2101 bool hasBrief = !nd->briefDescription().isEmpty();
2102 ol.startIndexValue(hasBrief);
2103 if (hasBrief)
2104 {
2105 ol.generateDoc(nd->briefFile(),
2106 nd->briefLine(),
2107 nd.get(),
2108 nullptr,
2109 nd->briefDescription(true),
2110 DocOptions()
2111 .setSingleLine(true)
2112 .setLinkFromIndex(true));
2113 }
2114 ol.endIndexValue(nd->getOutputFileBase(),hasBrief);
2115
2116 }
2117 }
2118 if (!first) ol.endIndexList();
2119
2120 ol.popGeneratorState();
2121
2122 // ---------------
2123 // Hierarchical namespace index for HTML
2124 // ---------------
2125 ol.pushGeneratorState();
2127
2128 {
2129 if (addToIndex)
2130 {
2131 Doxygen::indexList->addContentsItem(true,title,QCString(),"namespaces",QCString(),true,true);
2133 }
2134 FTVHelp ftv(false);
2135 writeNamespaceTree(*Doxygen::namespaceLinkedMap,&ftv,true,addToIndex);
2136 TextStream t;
2138 ol.writeString(t.str());
2139 if (addToIndex)
2140 {
2142 }
2143 }
2144
2145 ol.popGeneratorState();
2146 // ------
2147
2148 endFile(ol);
2149 ol.popGeneratorState();
2150}
2151
2152//----------------------------------------------------------------------------
2153
2155{
2156 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2157 int count=0;
2158 int countPrinted=0;
2159 for (const auto &cd : *Doxygen::classLinkedMap)
2160 {
2161 if (sliceOpt && cd->compoundType() != ct)
2162 {
2163 continue;
2164 }
2165 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2166 {
2167 if (!cd->isEmbeddedInOuterScope())
2168 {
2169 countPrinted++;
2170 }
2171 count++;
2172 }
2173 }
2174 *cp = countPrinted;
2175 return count;
2176}
2177
2178
2180{
2181 //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
2182 //bool addToIndex = lne==nullptr || lne->visible();
2183 bool first=true;
2184
2185 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2186
2187 for (const auto &cd : *Doxygen::classLinkedMap)
2188 {
2189 if (cd->getLanguage()==SrcLangExt::VHDL &&
2190 (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
2192 ) // no architecture
2193 {
2194 continue;
2195 }
2196 if (first)
2197 {
2198 ol.startIndexList();
2199 first=false;
2200 }
2201
2202 if (sliceOpt && cd->compoundType() != ct)
2203 {
2204 continue;
2205 }
2206
2207 ol.pushGeneratorState();
2208 if (cd->isEmbeddedInOuterScope())
2209 {
2213 }
2214 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2215 {
2216 ol.startIndexKey();
2217 if (cd->getLanguage()==SrcLangExt::VHDL)
2218 {
2220 ol.docify(prot);
2221 ol.writeString(" ");
2222 }
2223 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
2224 ol.endIndexKey();
2225 bool hasBrief = !cd->briefDescription().isEmpty();
2226 ol.startIndexValue(hasBrief);
2227 if (hasBrief)
2228 {
2229 ol.generateDoc(cd->briefFile(),
2230 cd->briefLine(),
2231 cd.get(),
2232 nullptr,
2233 cd->briefDescription(true),
2234 DocOptions()
2235 .setSingleLine(true)
2236 .setLinkFromIndex(true));
2237 }
2238 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2239
2240 //if (addToIndex)
2241 //{
2242 // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2243 //}
2244 }
2245 ol.popGeneratorState();
2246 }
2247 if (!first) ol.endIndexList();
2248}
2249
2250inline bool isId1(int c)
2251{
2252 return (c<127 && c>31); // printable ASCII character
2253}
2254
2255static QCString letterToLabel(const QCString &startLetter)
2256{
2257 if (startLetter.isEmpty()) return startLetter;
2258 const char *p = startLetter.data();
2259 char c = *p;
2260 QCString result;
2261 if (isId1(c))
2262 {
2263 result+=c;
2264 }
2265 else
2266 {
2267 result="0x";
2268 const char hex[]="0123456789abcdef";
2269 while ((c=*p++))
2270 {
2271 result+=hex[static_cast<unsigned char>(c)>>4];
2272 result+=hex[static_cast<unsigned char>(c)&0xf];
2273 }
2274 }
2275 return result;
2276}
2277
2278//----------------------------------------------------------------------------
2279
2280
2281using UsedIndexLetters = std::set<std::string>;
2282
2283// write an alphabetical index of all class with a header for each letter
2284static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int /* annotatedCount */)
2285{
2286 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2287
2288 // What starting letters are used
2289 UsedIndexLetters indexLettersUsed;
2290
2291 // first count the number of headers
2292 for (const auto &cd : *Doxygen::classLinkedMap)
2293 {
2294 if (sliceOpt && cd->compoundType() != ct)
2295 continue;
2296 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2297 continue;
2298
2299 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2300 {
2301 // get the first UTF8 character (after the part that should be ignored)
2302 int index = getPrefixIndex(cd->className());
2303 std::string letter = getUTF8CharAt(cd->className().str(),index);
2304 if (!letter.empty())
2305 {
2306 indexLettersUsed.insert(convertUTF8ToUpper(letter));
2307 }
2308 }
2309 }
2310
2311 // write quick link index (row of letters)
2312 QCString alphaLinks = "<div class=\"qindex\">";
2313 bool first=true;
2314 for (const auto &letter : indexLettersUsed)
2315 {
2316 if (!first) alphaLinks += alphaSepar;
2317 first=false;
2318 QCString li = letterToLabel(letter);
2319 alphaLinks += "<a class=\"qindex\" href=\"#letter_" +
2320 li + "\">" +
2321 letter + "</a>";
2322 }
2323 alphaLinks += "</div>\n";
2324 ol.writeString(alphaLinks);
2325
2326 std::map<std::string, std::vector<const ClassDef*> > classesByLetter;
2327
2328 // fill the columns with the class list (row elements in each column,
2329 // expect for the columns with number >= itemsInLastRow, which get one
2330 // item less.
2331 for (const auto &cd : *Doxygen::classLinkedMap)
2332 {
2333 if (sliceOpt && cd->compoundType() != ct)
2334 continue;
2335 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2336 continue;
2337
2338 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2339 {
2340 QCString className = cd->className();
2341 int index = getPrefixIndex(className);
2342 std::string letter = getUTF8CharAt(className.str(),index);
2343 if (!letter.empty())
2344 {
2345 letter = convertUTF8ToUpper(letter);
2346 auto it = classesByLetter.find(letter);
2347 if (it!=classesByLetter.end()) // add class to the existing list
2348 {
2349 it->second.push_back(cd.get());
2350 }
2351 else // new entry
2352 {
2353 classesByLetter.emplace(letter, std::vector<const ClassDef*>({ cd.get() }));
2354 }
2355 }
2356 }
2357 }
2358
2359 // sort the class lists per letter while ignoring the prefix
2360 for (auto &[letter,list] : classesByLetter)
2361 {
2362 std::stable_sort(list.begin(), list.end(),
2363 [](const auto &c1,const auto &c2)
2364 {
2365 QCString n1 = c1->className();
2366 QCString n2 = c2->className();
2367 return qstricmp_sort(n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2))<0;
2368 });
2369 }
2370
2371 // generate table
2372 if (!classesByLetter.empty())
2373 {
2374 ol.writeString("<div class=\"classindex\">\n");
2375 int counter=0;
2376 for (const auto &cl : classesByLetter)
2377 {
2378 QCString parity = (counter++%2)==0 ? "even" : "odd";
2379 ol.writeString("<dl class=\"classindex " + parity + "\">\n");
2380
2381 // write character heading
2382 ol.writeString("<dt class=\"alphachar\">");
2383 QCString s = letterToLabel(cl.first);
2384 ol.writeString("<a id=\"letter_");
2385 ol.writeString(s);
2386 ol.writeString("\" name=\"letter_");
2387 ol.writeString(s);
2388 ol.writeString("\">");
2389 ol.writeString(cl.first);
2390 ol.writeString("</a>");
2391 ol.writeString("</dt>\n");
2392
2393 // write class links
2394 for (const auto &cd : cl.second)
2395 {
2396 ol.writeString("<dd>");
2397 QCString namesp,cname;
2398 extractNamespaceName(cd->name(),cname,namesp);
2399 QCString nsDispName;
2400 SrcLangExt lang = cd->getLanguage();
2402 if (sep!="::")
2403 {
2404 nsDispName=substitute(namesp,"::",sep);
2405 cname=substitute(cname,"::",sep);
2406 }
2407 else
2408 {
2409 nsDispName=namesp;
2410 }
2411
2412 ol.writeObjectLink(cd->getReference(),
2413 cd->getOutputFileBase(),cd->anchor(),cname);
2414 if (!namesp.isEmpty())
2415 {
2416 ol.writeString(" (");
2417 NamespaceDef *nd = getResolvedNamespace(namesp);
2418 if (nd && nd->isLinkable())
2419 {
2421 nd->getOutputFileBase(),QCString(),nsDispName);
2422 }
2423 else
2424 {
2425 ol.docify(nsDispName);
2426 }
2427 ol.writeString(")");
2428 }
2429 ol.writeString("</dd>");
2430 }
2431
2432 ol.writeString("</dl>\n");
2433 }
2434 ol.writeString("</div>\n");
2435 }
2436}
2437
2438//----------------------------------------------------------------------------
2439
2441{
2442 if (Index::instance().numAnnotatedClasses()==0) return;
2443 ol.pushGeneratorState();
2445 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassIndex);
2446 QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
2447 bool addToIndex = lne==nullptr || lne->visible();
2448
2449 startFile(ol,"classes",false,QCString(),title,HighlightedItem::Classes);
2450
2451 startTitle(ol,QCString());
2452 ol.parseText(title);
2453 endTitle(ol,QCString(),QCString());
2454
2455 if (addToIndex)
2456 {
2457 Doxygen::indexList->addContentsItem(false,title,QCString(),"classes",QCString(),false,true);
2458 }
2459
2460 ol.startContents();
2461 writeAlphabeticalClassList(ol, ClassDef::Class, Index::instance().numAnnotatedClasses());
2462 endFile(ol); // contains ol.endContents()
2463
2464 ol.popGeneratorState();
2465}
2466
2467//----------------------------------------------------------------------------
2468
2470{
2471 if (Index::instance().numAnnotatedInterfaces()==0) return;
2472 ol.pushGeneratorState();
2474 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex);
2475 QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2476 bool addToIndex = lne==nullptr || lne->visible();
2477
2478 startFile(ol,"interfaces",false,QCString(),title,HighlightedItem::Interfaces);
2479
2480 startTitle(ol,QCString());
2481 ol.parseText(title);
2482 endTitle(ol,QCString(),QCString());
2483
2484 if (addToIndex)
2485 {
2486 Doxygen::indexList->addContentsItem(false,title,QCString(),"interfaces",QCString(),false,true);
2487 }
2488
2489 ol.startContents();
2490 writeAlphabeticalClassList(ol, ClassDef::Interface, Index::instance().numAnnotatedInterfaces());
2491 endFile(ol); // contains ol.endContents()
2492
2493 ol.popGeneratorState();
2494}
2495
2496//----------------------------------------------------------------------------
2497
2499{
2500 if (Index::instance().numAnnotatedStructs()==0) return;
2501 ol.pushGeneratorState();
2503 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex);
2504 QCString title = lne ? lne->title() : theTranslator->trStructIndex();
2505 bool addToIndex = lne==nullptr || lne->visible();
2506
2507 startFile(ol,"structs",false,QCString(),title,HighlightedItem::Structs);
2508
2509 startTitle(ol,QCString());
2510 ol.parseText(title);
2511 endTitle(ol,QCString(),QCString());
2512
2513 if (addToIndex)
2514 {
2515 Doxygen::indexList->addContentsItem(false,title,QCString(),"structs",QCString(),false,true);
2516 }
2517
2518 ol.startContents();
2519 writeAlphabeticalClassList(ol, ClassDef::Struct, Index::instance().numAnnotatedStructs());
2520 endFile(ol); // contains ol.endContents()
2521
2522 ol.popGeneratorState();
2523}
2524
2525//----------------------------------------------------------------------------
2526
2528{
2529 if (Index::instance().numAnnotatedExceptions()==0) return;
2530 ol.pushGeneratorState();
2532 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2533 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2534 bool addToIndex = lne==nullptr || lne->visible();
2535
2536 startFile(ol,"exceptions",false,QCString(),title,HighlightedItem::Exceptions);
2537
2538 startTitle(ol,QCString());
2539 ol.parseText(title);
2540 endTitle(ol,QCString(),QCString());
2541
2542 if (addToIndex)
2543 {
2544 Doxygen::indexList->addContentsItem(false,title,QCString(),"exceptions",QCString(),false,true);
2545 }
2546
2547 ol.startContents();
2548 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2549 endFile(ol); // contains ol.endContents()
2550
2551 ol.popGeneratorState();
2552}
2553
2554//----------------------------------------------------------------------------
2555
2580
2582{
2583 //printf("writeAnnotatedIndex: count=%d printed=%d\n", ctx.numAnnotated, ctx.numPrinted);
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();
2616
2618
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);
2633 }
2634 FTVHelp ftv(false);
2636 writeClassTree(*Doxygen::classLinkedMap,&ftv,addToIndex,true,ctx.compoundType);
2637 TextStream t;
2639 ol.writeString(t.str());
2640 if (addToIndex)
2641 {
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,
2663 "annotated",
2665}
2666
2667//----------------------------------------------------------------------------
2668
2670{
2671 const auto &index = Index::instance();
2673 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2674 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2677 "annotatedinterfaces",
2679}
2680
2681//----------------------------------------------------------------------------
2682
2684{
2685 const auto &index = Index::instance();
2687 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2688 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2691 "annotatedstructs",
2693}
2694
2695//----------------------------------------------------------------------------
2696
2698{
2699 const auto &index = Index::instance();
2701 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2702 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
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;
3082 startQuickIndexList(ol,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 ol.writeString(R"js(
3102<script type="text/javascript">
3103function updateNavHighlight() {
3104 var currentHash = window.location.hash;
3105 var navItems = document.querySelectorAll('#navrow4 .tablist li');
3106
3107 for (var i = 0; i < navItems.length; i++) {
3108 var item = navItems[i];
3109 var link = item.querySelector('a');
3110 item.classList.remove('current');
3111 if (link && link.getAttribute('href') === currentHash) {
3112 item.classList.add('current');
3113 }
3114 }
3115
3116 if (currentHash) {
3117 var target = document.querySelector(currentHash);
3118 if (target) {
3119 target.scrollIntoView();
3120 }
3121 }
3122}
3123updateNavHighlight();
3124window.addEventListener('hashchange', updateNavHighlight);
3125</script>
3126 )js");
3127}
3128
3129static void writeMemberIndex(OutputList &ol,
3130 const Index::MemberIndexMap &map, QCString fullName,bool multiPage)
3131{
3132 bool first=true;
3133 ol.writeString("<br/>\n");
3134 QCString alphaLinks = "<div class=\"qindex\">";
3135 StringMap usedLetters;
3136 for (const auto &[letter,list] : map)
3137 {
3138 usedLetters.emplace(convertUTF8ToUpper(letter),letter);
3139 }
3140 for (const auto &[letterUC,letter] : usedLetters)
3141 {
3142 QCString ci(letter);
3143 QCString is = letterToLabel(ci);
3144 QCString anchor;
3146 if (!multiPage)
3147 anchor="#index_";
3148 else if (first)
3149 anchor=fullName+extension+"#index_";
3150 else
3151 anchor=fullName+"_"+is+extension+"#index_";
3152
3153 if (!first) alphaLinks += alphaSepar;
3154 first=false;
3155 QCString li = letterToLabel(letter);
3156 alphaLinks += "<a class=\"qindex\" href=\"" + anchor +
3157 li + "\">" +
3158 letterUC + "</a>";
3159 }
3160 alphaLinks += "</div>\n";
3161 ol.writeString(alphaLinks);
3162}
3163
3164//----------------------------------------------------------------------------
3165
3166/** Helper class representing a class member in the navigation menu. */
3167struct CmhlInfo
3168{
3169 CmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3170 const char *fname;
3172};
3173
3174static const CmhlInfo *getCmhlInfo(size_t hl)
3175{
3176 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3177 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3178 static CmhlInfo cmhlInfo[] =
3179 {
3180 CmhlInfo("functions", theTranslator->trAll()),
3181 CmhlInfo("functions_func",
3182 fortranOpt ? theTranslator->trSubprograms() :
3183 vhdlOpt ? theTranslator->trFunctionAndProc() :
3185 CmhlInfo("functions_vars",theTranslator->trVariables()),
3186 CmhlInfo("functions_type",theTranslator->trTypedefs()),
3187 CmhlInfo("functions_enum",theTranslator->trEnumerations()),
3188 CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
3189 CmhlInfo("functions_prop",theTranslator->trProperties()),
3190 CmhlInfo("functions_evnt",theTranslator->trEvents()),
3191 CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
3192 };
3193 return &cmhlInfo[hl];
3194}
3195
3197{
3198 const auto &index = Index::instance();
3199 if (index.numDocumentedClassMembers(hl)==0) return;
3200
3201 bool disableIndex = Config_getBool(DISABLE_INDEX);
3202 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3203 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3204 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3205 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3206
3207 bool multiPageIndex=false;
3208 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3209 {
3210 multiPageIndex=true;
3211 }
3212
3213 ol.pushGeneratorState();
3215
3217 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3218 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3219 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3220 bool addToIndex = lne==nullptr || lne->visible();
3221
3222 if (addToIndex)
3223 {
3224 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3225 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,true);
3226 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3227 }
3228
3229 bool first=true;
3230 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3231 {
3232 QCString fileName = getCmhlInfo(hl)->fname;
3233 if (multiPageIndex)
3234 {
3235 QCString cs(letter);
3236 if (!first)
3237 {
3238 fileName+="_"+letterToLabel(cs);
3239 }
3240 if (addToIndex)
3241 {
3242 Doxygen::indexList->addContentsItem(false,cs,QCString(),fileName,QCString(),false,true);
3243 }
3244 }
3245
3246 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3247
3248 auto writeQuickLinks = [&,cap_letter=letter]()
3249 {
3251 if (!dynamicMenus)
3252 {
3254
3255 // index item for global member list
3258 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3260
3261 // index items per category member lists
3262 for (int i=1;i<ClassMemberHighlight::Total;i++)
3263 {
3264 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3265 {
3266 startQuickIndexItem(ol,getCmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,true,first);
3267 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3268 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3269 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3271 }
3272 }
3273
3275
3276 // quick alphabetical index
3277 if (quickIndex)
3278 {
3279 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3280 getCmhlInfo(hl)->fname,multiPageIndex);
3281 }
3282
3283 ol.writeString("</div><!-- main-nav -->\n");
3284 }
3285 };
3286
3287 ol.startFile(fileName+extension,false,QCString(),title);
3288 ol.startQuickIndices();
3289 if (!disableIndex && !quickLinksAfterSplitbar)
3290 {
3291 writeQuickLinks();
3292 }
3293 ol.endQuickIndices();
3294 ol.writeSplitBar(fileName,QCString());
3295 if (quickLinksAfterSplitbar)
3296 {
3297 writeQuickLinks();
3298 if (!dynamicMenus)
3299 {
3300 ol.writeString("<div id=\"container\">\n");
3301 ol.writeString("<div id=\"doc-content\">\n");
3302 }
3303 }
3305
3306 ol.startContents();
3307
3308 ol.startTextBlock();
3310 ol.endTextBlock();
3311 if (dynamicMenus || disableIndex)
3312 {
3313 writeMemberIndex(ol,index.isClassIndexLetterUsed(hl),getCmhlInfo(hl)->fname,multiPageIndex);
3314 }
3315
3316 writeMemberList(ol,quickIndex,
3317 multiPageIndex ? letter : std::string(),
3318 index.isClassIndexLetterUsed(hl),
3320 endFile(ol);
3321 first=false;
3322 }
3323
3324 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3325
3326 ol.popGeneratorState();
3327}
3328
3329static void writeClassMemberIndex(OutputList &ol)
3330{
3331 const auto &index = Index::instance();
3332 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3333 bool addToIndex = lne==nullptr || lne->visible();
3335 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3339 }
3349 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3350 {
3352 }
3353
3354}
3355
3356//----------------------------------------------------------------------------
3357
3358/** Helper class representing a file member in the navigation menu. */
3359struct FmhlInfo
3360{
3361 FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3362 const char *fname;
3363 QCString title;
3365
3366static const FmhlInfo *getFmhlInfo(size_t hl)
3367{
3368 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3369 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3370 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3371 static FmhlInfo fmhlInfo[] =
3372 {
3373 FmhlInfo("globals", theTranslator->trAll()),
3374 FmhlInfo("globals_func",
3375 fortranOpt ? theTranslator->trSubprograms() :
3376 vhdlOpt ? theTranslator->trFunctionAndProc() :
3378 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3379 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3380 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3381 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3382 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3383 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3384 FmhlInfo("globals_defs",theTranslator->trDefines())
3385 };
3386 return &fmhlInfo[hl];
3387}
3388
3390{
3391 const auto &index = Index::instance();
3392 if (index.numDocumentedFileMembers(hl)==0) return;
3393
3394 bool disableIndex = Config_getBool(DISABLE_INDEX);
3395 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3396 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3397 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3398 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3399
3400 bool multiPageIndex=false;
3401 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3402 {
3403 multiPageIndex=true;
3404 }
3405
3406 ol.pushGeneratorState();
3408
3410 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3411 QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3412 bool addToIndex = lne==nullptr || lne->visible();
3413
3414 if (addToIndex)
3415 {
3416 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3417 getFmhlInfo(hl)->fname,QCString(),multiPageIndex,true);
3418 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3419 }
3420
3421 bool first=true;
3422 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3423 {
3424 QCString fileName = getFmhlInfo(hl)->fname;
3425 if (multiPageIndex)
3426 {
3427 QCString cs(letter);
3428 if (!first)
3429 {
3430 fileName+="_"+letterToLabel(cs);
3431 }
3432 if (addToIndex)
3433 {
3434 Doxygen::indexList->addContentsItem(false,cs,QCString(),fileName,QCString(),false,true);
3435 }
3436 }
3437
3438 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3439
3440 auto writeQuickLinks = [&,cap_letter=letter]()
3441 {
3443 if (!dynamicMenus)
3444 {
3446
3447 // index item for all file member lists
3450 ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3452
3453 // index items for per category member lists
3454 for (int i=1;i<FileMemberHighlight::Total;i++)
3455 {
3456 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3457 {
3459 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,true,first);
3460 ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3462 }
3463 }
3464
3466
3467 if (quickIndex)
3468 {
3469 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3470 getFmhlInfo(hl)->fname,multiPageIndex);
3471 }
3472
3473 ol.writeString("</div><!-- main-nav -->\n");
3474 }
3475 };
3476
3477 ol.startFile(fileName+extension,false,QCString(),title);
3478 ol.startQuickIndices();
3479 if (!disableIndex && !quickLinksAfterSplitbar)
3480 {
3481 writeQuickLinks();
3482 }
3483 ol.endQuickIndices();
3484 ol.writeSplitBar(fileName,QCString());
3485 if (quickLinksAfterSplitbar)
3486 {
3487 writeQuickLinks();
3488 if (!dynamicMenus)
3489 {
3490 ol.writeString("<div id=\"container\">\n");
3491 ol.writeString("<div id=\"doc-content\">\n");
3493 }
3494 ol.writeSearchInfo();
3495
3496 ol.startContents();
3497
3498 ol.startTextBlock();
3500 ol.endTextBlock();
3501 if (dynamicMenus || disableIndex)
3502 {
3503 writeMemberIndex(ol,index.isFileIndexLetterUsed(hl),getFmhlInfo(hl)->fname,multiPageIndex);
3504 }
3505
3506 writeMemberList(ol,quickIndex,
3507 multiPageIndex ? letter : std::string(),
3508 index.isFileIndexLetterUsed(hl),
3510 endFile(ol);
3511 first=false;
3512 }
3513 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3514 ol.popGeneratorState();
3515}
3516
3517static void writeFileMemberIndex(OutputList &ol)
3518{
3519 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3520 bool addToIndex = lne==nullptr || lne->visible();
3521 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3525 }
3535 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3536 {
3538 }
3539
3540}
3541
3542//----------------------------------------------------------------------------
3543
3544/** Helper class representing a namespace member in the navigation menu. */
3545struct NmhlInfo
3546{
3547 NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3548 const char *fname;
3549 QCString title;
3550};
3552static const NmhlInfo *getNmhlInfo(size_t hl)
3553{
3554 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3555 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3556 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3557 static NmhlInfo nmhlInfo[] =
3558 {
3559 NmhlInfo("namespacemembers", theTranslator->trAll()),
3560 NmhlInfo("namespacemembers_func",
3561 fortranOpt ? theTranslator->trSubprograms() :
3562 vhdlOpt ? theTranslator->trFunctionAndProc() :
3564 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3565 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3566 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3567 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3568 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3569 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3570 };
3571 return &nmhlInfo[hl];
3572}
3573
3574//----------------------------------------------------------------------------
3575
3578{
3579 const auto &index = Index::instance();
3580 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3581
3582 bool disableIndex = Config_getBool(DISABLE_INDEX);
3583 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3584 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3585 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3586 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3587
3588 bool multiPageIndex=false;
3589 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3590 {
3591 multiPageIndex=true;
3592 }
3593
3594 ol.pushGeneratorState();
3596
3598 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3599 QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3600 bool addToIndex = lne==nullptr || lne->visible();
3601
3602 if (addToIndex)
3603 {
3604 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3605 getNmhlInfo(hl)->fname,QCString(),multiPageIndex,true);
3606 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3607 }
3608
3609 bool first=true;
3610 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3611 {
3612 QCString fileName = getNmhlInfo(hl)->fname;
3613 if (multiPageIndex)
3614 {
3615 QCString cs(letter);
3616 if (!first)
3617 {
3618 fileName+="_"+letterToLabel(cs);
3619 }
3620 if (addToIndex)
3621 {
3622 Doxygen::indexList->addContentsItem(false,cs,QCString(),fileName,QCString(),false,true);
3623 }
3624 }
3625
3626 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3627
3628 auto writeQuickLinks = [&,cap_letter=letter]()
3629 {
3631 if (!dynamicMenus)
3632 {
3634
3635 // index item for all namespace member lists
3638 ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3640
3641 // index items per category member lists
3642 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3643 {
3644 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3645 {
3647 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,true,first);
3648 ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3650 }
3651 }
3652
3654
3655 if (quickIndex)
3656 {
3657 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3658 getNmhlInfo(hl)->fname,multiPageIndex);
3659 }
3660
3661 ol.writeString("</div><!-- main-nav -->\n");
3662 }
3663 };
3664
3665 ol.startFile(fileName+extension,false,QCString(),title);
3666 ol.startQuickIndices();
3667 if (!disableIndex && !quickLinksAfterSplitbar)
3668 {
3669 writeQuickLinks();
3670 }
3671 ol.endQuickIndices();
3672 ol.writeSplitBar(fileName,QCString());
3673 if (quickLinksAfterSplitbar)
3674 {
3675 writeQuickLinks();
3676 if (!dynamicMenus)
3677 {
3678 ol.writeString("<div id=\"container\">\n");
3679 ol.writeString("<div id=\"doc-content\">\n");
3680 }
3681 }
3682 ol.writeSearchInfo();
3683
3684 ol.startContents();
3685
3686 ol.startTextBlock();
3688 ol.endTextBlock();
3689
3690 writeMemberList(ol,quickIndex,
3691 multiPageIndex ? letter : std::string(),
3692 index.isNamespaceIndexLetterUsed(hl),
3694 endFile(ol);
3695 first=false;
3696 }
3697 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3698 ol.popGeneratorState();
3699}
3700
3702{
3703 const auto &index = Index::instance();
3704 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3705 bool addToIndex = lne==nullptr || lne->visible();
3706 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3710 }
3711 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3725}
3726
3727//----------------------------------------------------------------------------
3729/** Helper class representing a module member in the navigation menu. */
3730struct MmhlInfo
3731{
3732 MmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3733 const char *fname;
3735};
3736
3737static const MmhlInfo *getMmhlInfo(size_t hl)
3738{
3739 static MmhlInfo nmhlInfo[] =
3740 {
3741 MmhlInfo("modulemembers", theTranslator->trAll()),
3742 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3743 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3744 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3745 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3746 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3747 };
3748 return &nmhlInfo[hl];
3749}
3750
3751//----------------------------------------------------------------------------
3752
3755{
3756 const auto &index = Index::instance();
3757 if (index.numDocumentedModuleMembers(hl)==0) return;
3758
3759 bool disableIndex = Config_getBool(DISABLE_INDEX);
3760 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3761 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3762 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3763 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3764
3765 bool multiPageIndex=false;
3766 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3767 {
3768 multiPageIndex=true;
3769 }
3770
3771 ol.pushGeneratorState();
3773
3775 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3776 QCString title = lne ? lne->title() : theTranslator->trModulesMembers();
3777 bool addToIndex = lne==nullptr || lne->visible();
3778
3779 if (addToIndex)
3780 {
3781 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,QCString(),
3782 getMmhlInfo(hl)->fname,QCString(),multiPageIndex,true);
3783 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3784 }
3785
3786 bool first=true;
3787 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3788 {
3789 QCString fileName = getMmhlInfo(hl)->fname;
3790 if (multiPageIndex)
3791 {
3792 QCString cs(letter);
3793 if (!first)
3794 {
3795 fileName+="_"+letterToLabel(cs);
3796 }
3797 if (addToIndex)
3798 {
3799 Doxygen::indexList->addContentsItem(false,cs,QCString(),fileName,QCString(),false,true);
3800 }
3801 }
3802
3803 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3804
3805 auto writeQuickLinks = [&,cap_letter=letter]()
3806 {
3808 if (!dynamicMenus)
3809 {
3811
3812 // index item for all namespace member lists
3815 ol.writeString(fixSpaces(getMmhlInfo(0)->title));
3817
3818 // index items per category member lists
3819 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3820 {
3821 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3822 {
3824 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,true,first);
3825 ol.writeString(fixSpaces(getMmhlInfo(i)->title));
3827 }
3828 }
3829
3831
3832 if (quickIndex)
3833 {
3834 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3835 getMmhlInfo(hl)->fname,multiPageIndex);
3836 }
3837
3838 ol.writeString("</div><!-- main-nav -->\n");
3839 }
3840 };
3841
3842 ol.startFile(fileName+extension,false,QCString(),title);
3843 ol.startQuickIndices();
3844 if (!disableIndex && !quickLinksAfterSplitbar)
3845 {
3846 writeQuickLinks();
3847 }
3848 ol.endQuickIndices();
3849 ol.writeSplitBar(fileName,QCString());
3850 if (quickLinksAfterSplitbar)
3851 {
3852 writeQuickLinks();
3853 if (!dynamicMenus)
3854 {
3855 ol.writeString("<div id=\"container\">\n");
3856 ol.writeString("<div id=\"doc-content\">\n");
3857 }
3858 }
3859 ol.writeSearchInfo();
3861 ol.startContents();
3862
3863 ol.startTextBlock();
3865 ol.endTextBlock();
3866 if (dynamicMenus || disableIndex)
3867 {
3868 writeMemberIndex(ol,index.isModuleIndexLetterUsed(hl),getMmhlInfo(hl)->fname,multiPageIndex);
3869 }
3870
3871 writeMemberList(ol,quickIndex,
3872 multiPageIndex ? letter : std::string(),
3873 index.isModuleIndexLetterUsed(hl),
3875 endFile(ol);
3876 first=false;
3877 }
3878 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3879 ol.popGeneratorState();
3880}
3881
3882
3883//----------------------------------------------------------------------------
3884
3886{
3887 const auto &index = Index::instance();
3888 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3889 bool addToIndex = lne==nullptr || lne->visible();
3890 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3891 {
3892 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3894 }
3895 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3902 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3903 {
3905 }
3906}
3907
3908//----------------------------------------------------------------------------
3909
3910static void writeExampleIndex(OutputList &ol)
3911{
3912 if (Doxygen::exampleLinkedMap->empty()) return;
3913 ol.pushGeneratorState();
3916 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3917 QCString title = lne ? lne->title() : theTranslator->trExamples();
3918 bool addToIndex = lne==nullptr || lne->visible();
3919
3920 startFile(ol,"examples",false,QCString(),title,HighlightedItem::Examples);
3921
3922 startTitle(ol,QCString());
3923 ol.parseText(title);
3924 endTitle(ol,QCString(),QCString());
3925
3926 ol.startContents();
3927
3928 if (addToIndex)
3929 {
3930 Doxygen::indexList->addContentsItem(true,title,QCString(),"examples",QCString(),true,true);
3932 }
3933
3934 ol.startTextBlock();
3935 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3936 ol.endTextBlock();
3937
3938 ol.startItemList();
3939 for (const auto &pd : *Doxygen::exampleLinkedMap)
3940 {
3941 ol.startItemListItem();
3942 QCString n=pd->getOutputFileBase();
3943 if (!pd->title().isEmpty())
3944 {
3945 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3946 if (addToIndex)
3947 {
3948 Doxygen::indexList->addContentsItem(false,filterTitle(pd->title()),pd->getReference(),n,QCString(),false,true);
3949 }
3951 else
3952 {
3953 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3954 if (addToIndex)
3955 {
3956 Doxygen::indexList->addContentsItem(false,pd->name(),pd->getReference(),n,QCString(),false,true);
3957 }
3958 }
3959 ol.endItemListItem();
3960 //ol.writeString("\n");
3961 }
3962 ol.endItemList();
3963
3964 if (addToIndex)
3965 {
3967 }
3969 ol.popGeneratorState();
3970}
3971
3972
3973//----------------------------------------------------------------------------
3974
3975static void countRelatedPages(int &docPages,int &indexPages)
3976{
3977 docPages=indexPages=0;
3978 for (const auto &pd : *Doxygen::pageLinkedMap)
3979 {
3980 if (pd->visibleInIndex() && !pd->hasParentPage())
3981 {
3982 indexPages++;
3983 }
3984 if (pd->documentedPage())
3985 {
3986 docPages++;
3987 }
3988 }
3989}
3990
3991//----------------------------------------------------------------------------
3992
3993static void writePages(PageDef *pd,FTVHelp *ftv,bool reuseRoot = false)
3994{
3995 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3996 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3997 bool addToIndex = lne==nullptr || lne->visible();
3998 if (!addToIndex) return;
3999
4000 bool hasSubPages = pd->hasSubPages();
4001 bool hasSections = pd->hasSections();
4002
4003 if (pd->visibleInIndex())
4004 {
4005 QCString pageTitle, pageTitleAsHtml;
4006
4007 if (pd->title().isEmpty())
4008 pageTitle=pd->name();
4009 else
4010 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4011 pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4012
4013 if (ftv)
4014 {
4015 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4016 ftv->addContentsItem(
4017 hasSubPages,pageTitle,
4018 pd->getReference(),pd->getOutputFileBase(),
4019 QCString(),hasSubPages,true,pd,pageTitleAsHtml);
4020 }
4021 if (addToIndex && pd!=Doxygen::mainPage.get())
4022 {
4024 hasSubPages || hasSections,pageTitle,
4025 pd->getReference(),pd->getOutputFileBase(),
4026 QCString(),hasSubPages,true,pd,pageTitleAsHtml);
4027 }
4029 if (hasSubPages && ftv) ftv->incContentsDepth();
4030 bool doIndent = (hasSections || hasSubPages) && !reuseRoot;
4031 if (doIndent)
4032 {
4034 }
4035 if (hasSections)
4036 {
4037 pd->addSectionsToIndex();
4038 }
4039 for (const auto &subPage : pd->getSubPages())
4040 {
4041 writePages(subPage,ftv);
4042 }
4043 if (hasSubPages && ftv) ftv->decContentsDepth();
4044 if (doIndent)
4045 {
4047 }
4048 //printf("end writePages()=%s\n",qPrint(pd->title()));
4049}
4050
4051//----------------------------------------------------------------------------
4052
4053static void writePageIndex(OutputList &ol)
4054{
4055 if (Index::instance().numIndexedPages()==0) return;
4056 ol.pushGeneratorState();
4058 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
4059 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
4060 startFile(ol,"pages",false,QCString(),title,HighlightedItem::Pages);
4061 startTitle(ol,QCString());
4062 ol.parseText(title);
4063 endTitle(ol,QCString(),QCString());
4064 ol.startContents();
4065 ol.startTextBlock();
4067 ol.endTextBlock();
4068
4069 {
4070 FTVHelp ftv(false);
4071 for (const auto &pd : *Doxygen::pageLinkedMap)
4072 {
4073 if ((pd->getOuterScope()==nullptr ||
4074 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
4075 pd->visibleInIndex()
4076 )
4077 {
4078 writePages(pd.get(),&ftv);
4079 }
4080 }
4081 TextStream t;
4083 ol.writeString(t.str());
4084 }
4085
4086// ol.popGeneratorState();
4087 // ------
4088
4089 endFile(ol);
4090 ol.popGeneratorState();
4091}
4092
4093//----------------------------------------------------------------------------
4094
4095static int countGroups()
4096{
4097 int count=0;
4098 for (const auto &gd : *Doxygen::groupLinkedMap)
4099 {
4100 if (!gd->isReference())
4101 {
4102 //gd->visited=false;
4103 count++;
4104 }
4105 }
4106 return count;
4107}
4108
4109//----------------------------------------------------------------------------
4110
4111static int countDirs()
4112{
4113 int count=0;
4114 for (const auto &dd : *Doxygen::dirLinkedMap)
4115 {
4116 if (dd->isLinkableInProject())
4117 {
4118 count++;
4119 }
4120 }
4121 return count;
4122}
4123
4124
4125//----------------------------------------------------------------------------
4126
4127void writeGraphInfo(OutputList &ol)
4128{
4129 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4130 ol.pushGeneratorState();
4132
4133 DotLegendGraph gd;
4134 gd.writeGraph(Config_getString(HTML_OUTPUT));
4135
4136 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4137 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4138 // temporarily disable the stripping of comments for our own code example!
4139 Config_updateBool(STRIP_CODE_COMMENTS,false);
4140 // temporarily disable create subdirs for linking to our example
4141 Config_updateBool(CREATE_SUBDIRS,false);
4142
4143 startFile(ol,"graph_legend",false,QCString(),theTranslator->trLegendTitle());
4144 startTitle(ol,QCString());
4146 endTitle(ol,QCString(),QCString());
4147 ol.startContents();
4148 QCString legendDocs = theTranslator->trLegendDocs();
4149 int s = legendDocs.find("<center>");
4150 int e = legendDocs.find("</center>");
4151 QCString imgExt = getDotImageExtension();
4152 if (imgExt=="svg" && s!=-1 && e!=-1)
4153 {
4154 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4155 //printf("legendDocs=%s\n",qPrint(legendDocs));
4156 }
4157
4158 {
4159 auto fd = createFileDef("","graph_legend.dox");
4160 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,DocOptions());
4161 }
4162
4163 // restore config settings
4164 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4165 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4166
4167 endFile(ol);
4168 ol.popGeneratorState();
4169}
4170
4171
4172
4173//----------------------------------------------------------------------------
4174/*!
4175 * write groups as hierarchical trees
4176 */
4177static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex)
4178{
4179 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4180 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4181 if (level>20)
4182 {
4183 warn(gd->getDefFileName(),gd->getDefLine(),
4184 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->name());
4185 return;
4186 }
4187
4188 /* Some groups should appear twice under different parent-groups.
4189 * That is why we should not check if it was visited
4190 */
4191 if ((!gd->isASubGroup() || level>0) && gd->isVisible() && gd->isVisibleInHierarchy())
4192 {
4193 //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
4194 // write group info
4195 bool hasSubGroups = !gd->getSubGroups().empty();
4196 bool hasSubPages = !gd->getPages().empty();
4197 size_t numSubItems = 0;
4198 for (const auto &ml : gd->getMemberLists())
4199 {
4200 if (ml->listType().isDocumentation())
4201 {
4202 numSubItems += ml->size();
4203 }
4204 }
4205 numSubItems += gd->getNamespaces().size();
4206 numSubItems += gd->getClasses().size();
4207 numSubItems += gd->getFiles().size();
4208 numSubItems += gd->getConcepts().size();
4209 numSubItems += gd->getDirs().size();
4210 numSubItems += gd->getPages().size();
4211
4212 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4213 QCString title = parseCommentAsText(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4214 QCString titleAsHtml = parseCommentAsHtml(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4215
4216 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
4217 if (addToIndex)
4218 {
4221 isDir,true,nullptr,titleAsHtml);
4223 }
4224 if (ftv)
4225 {
4226 ftv->addContentsItem(hasSubGroups,title,
4228 false,false,gd,titleAsHtml);
4229 ftv->incContentsDepth();
4230 }
4231
4232 ol.startIndexListItem();
4234 ol.generateDoc(gd->getDefFileName(),
4235 gd->getDefLine(),
4236 gd,
4237 nullptr,
4238 gd->groupTitle(),
4239 DocOptions()
4240 .setSingleLine(true)
4241 .setAutolinkSupport(false));
4243
4244 if (gd->isReference())
4245 {
4246 ol.startTypewriter();
4247 ol.docify(" [external]");
4248 ol.endTypewriter();
4249 }
4250
4251 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
4252 {
4253 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4254 {
4255 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
4256 if (lmd)
4257 {
4258 MemberList *ml = gd->getMemberList(lmd->type);
4259 if (ml)
4260 {
4261 for (const auto &md : *ml)
4262 {
4263 const MemberVector &enumList = md->enumFieldList();
4264 isDir = !enumList.empty() && md->isEnumerate();
4265 if (md->isVisible() && !md->isAnonymous())
4266 {
4268 md->qualifiedName(),md->getReference(),
4269 md->getOutputFileBase(),md->anchor(),false,addToIndex);
4270 }
4271 if (isDir)
4272 {
4274 for (const auto &emd : enumList)
4275 {
4276 if (emd->isVisible())
4277 {
4279 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4280 emd->anchor(),false,addToIndex);
4281 }
4282 }
4284 }
4285 }
4286 }
4287 }
4288 }
4289 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4290 {
4291 for (const auto &cd : gd->getClasses())
4292 {
4293 //bool nestedClassInSameGroup =
4294 // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
4295 // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
4296 //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
4297 if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
4298 {
4300 LayoutDocManager::Class,
4301 cd->displayName(),
4302 cd->anchor(),
4303 addToIndex,
4304 true);
4305 }
4306 }
4307 }
4308 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex && Config_getBool(SHOW_NAMESPACES))
4309 {
4310 for (const auto &nd : gd->getNamespaces())
4311 {
4312 if (nd->isVisible())
4313 {
4315 nd->displayName(),nd->getReference(),
4316 nd->getOutputFileBase(),QCString(),false,Config_getBool(SHOW_NAMESPACES));
4317 }
4318 }
4319 }
4320 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4321 {
4322 for (const auto &cd : gd->getConcepts())
4323 {
4324 if (cd->isVisible())
4325 {
4327 cd->displayName(),cd->getReference(),
4328 cd->getOutputFileBase(),QCString(),false,addToIndex);
4329 }
4330 }
4331 }
4332 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4333 {
4334 for (const auto &fd : gd->getFiles())
4335 {
4336 if (fd->isVisible())
4337 {
4339 fd->displayName(),fd->getReference(),
4340 fd->getOutputFileBase(),QCString(),false,fd->isLinkableViaGroup());
4341 }
4342 }
4343 }
4344 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4345 {
4346 for (const auto &dd : gd->getDirs())
4347 {
4348 if (dd->isVisible())
4349 {
4351 dd->shortName(),dd->getReference(),
4352 dd->getOutputFileBase(),QCString(),false,false);
4353 }
4354 }
4355 }
4356 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4357 {
4358 for (const auto &pd : gd->getPages())
4359 {
4360 const SectionInfo *si=nullptr;
4361 if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
4362 hasSubPages = pd->hasSubPages();
4363 bool hasSections = pd->hasSections();
4364 QCString pageTitle;
4365 if (pd->title().isEmpty())
4366 pageTitle=pd->name();
4367 else
4368 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4369 QCString pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4371 hasSubPages || hasSections,
4372 pageTitle,
4373 gd->getReference(),
4374 gd->getOutputFileBase(),
4375 si ? si->label() : QCString(),
4376 hasSubPages || hasSections,
4377 true,
4378 nullptr,
4379 pageTitleAsHtml); // addToNavIndex
4380 if (hasSections || hasSubPages)
4381 {
4383 }
4384 if (hasSections)
4385 {
4386 pd->addSectionsToIndex();
4387 }
4388 writePages(pd,nullptr);
4389 if (hasSections || hasSubPages)
4390 {
4392 }
4393 }
4394 }
4395 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4396 {
4397 if (!gd->getSubGroups().empty())
4399 startIndexHierarchy(ol,level+1);
4400 for (const auto &subgd : gd->getSubGroups())
4401 {
4402 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4403 }
4404 endIndexHierarchy(ol,level+1);
4405 }
4406 }
4407 }
4408
4409 ol.endIndexListItem();
4410
4411 if (addToIndex)
4412 {
4414 }
4415 if (ftv)
4416 {
4417 ftv->decContentsDepth();
4418 }
4419 //gd->visited=true;
4420 }
4421}
4423static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
4424{
4425 if (ftv)
4426 {
4427 ol.pushGeneratorState();
4429 }
4430 startIndexHierarchy(ol,0);
4431 for (const auto &gd : *Doxygen::groupLinkedMap)
4432 {
4433 if (gd->isVisibleInHierarchy())
4434 {
4435 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4436 }
4437 }
4438 endIndexHierarchy(ol,0);
4439 if (ftv)
4440 {
4441 ol.popGeneratorState();
4442 }
4443}
4444
4445//----------------------------------------------------------------------------
4446
4447static void writeTopicIndex(OutputList &ol)
4448{
4449 if (Index::instance().numDocumentedGroups()==0) return;
4450 ol.pushGeneratorState();
4451 // 1.{
4454 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4455 QCString title = lne ? lne->title() : theTranslator->trTopics();
4456 bool addToIndex = lne==nullptr || lne->visible();
4457
4458 startFile(ol,"topics",false,QCString(),title,HighlightedItem::Topics);
4459 startTitle(ol,QCString());
4460 ol.parseText(title);
4461 endTitle(ol,QCString(),QCString());
4462 ol.startContents();
4463 ol.startTextBlock();
4465 ol.endTextBlock();
4466
4467 // ---------------
4468 // Normal group index for Latex/RTF
4469 // ---------------
4470 // 2.{
4471 ol.pushGeneratorState();
4474
4475 writeGroupHierarchy(ol,nullptr,false);
4476
4478 ol.popGeneratorState();
4479 // 2.}
4480
4481 // ---------------
4482 // interactive group index for HTML
4483 // ---------------
4484 // 2.{
4485 ol.pushGeneratorState();
4487
4488 {
4489 if (addToIndex)
4490 {
4491 Doxygen::indexList->addContentsItem(true,title,QCString(),"topics",QCString(),true,true);
4493 }
4494 FTVHelp ftv(false);
4495 writeGroupHierarchy(ol,&ftv,addToIndex);
4496 TextStream t;
4499 ol.writeString(t.str());
4500 if (addToIndex)
4501 {
4503 }
4504 }
4505 ol.popGeneratorState();
4506 // 2.}
4507
4508 endFile(ol);
4509 ol.popGeneratorState();
4510 // 1.}
4511}
4512
4513
4514//----------------------------------------------------------------------------
4515
4516static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod,
4517 FTVHelp* ftv, bool addToIndex)
4518{
4519 int visibleMembers = mod->countVisibleMembers();
4520 bool isDir=visibleMembers>0;
4521 if (addToIndex)
4522 {
4524 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,true);
4525 }
4526 if (ftv)
4527 {
4528 ftv->addContentsItem(false,mod->name(),
4529 mod->getReference(),mod->getOutputFileBase(),QCString(),
4530 false,false,mod);
4531 }
4532 ol.startIndexListItem();
4534 ol.generateDoc(mod->getDefFileName(),
4535 mod->getDefLine(),
4536 mod,
4537 nullptr,
4538 mod->qualifiedName(),
4539 DocOptions()
4540 .setSingleLine(true)
4541 .setAutolinkSupport(false));
4543 if (mod->isReference())
4544 {
4546 ol.docify(" [external]");
4547 ol.endTypewriter();
4548 }
4549 if (addToIndex && isDir)
4550 {
4552 }
4553 if (isDir)
4554 {
4555 //ftv->incContentsDepth();
4556 writeClassTree(mod->getClasses(),nullptr,addToIndex,false,ClassDef::Class);
4557 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4558 writeModuleMembers(mod,addToIndex);
4559 //ftv->decContentsDepth();
4560 }
4561 if (addToIndex && isDir)
4562 {
4564 }
4565 ol.endIndexListItem();
4566}
4567
4568//----------------------------------------------------------------------------
4570static void writeModuleList(OutputList &ol, FTVHelp *ftv,bool addToIndex)
4571{
4572 if (ftv)
4573 {
4574 ol.pushGeneratorState();
4576 }
4577 startIndexHierarchy(ol,0);
4578 for (const auto &mod : ModuleManager::instance().modules())
4579 {
4580 if (mod->isPrimaryInterface())
4581 {
4582 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4583 }
4584 }
4585 endIndexHierarchy(ol,0);
4586 if (ftv)
4587 {
4588 ol.popGeneratorState();
4589 }
4590}
4591
4592//----------------------------------------------------------------------------
4593
4594static void writeModuleIndex(OutputList &ol)
4595{
4596 if (ModuleManager::instance().numDocumentedModules()==0) return;
4597 ol.pushGeneratorState();
4598 // 1.{
4599
4602 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4603 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4604 QCString title = lne ? lne->title() : theTranslator->trModules();
4605 bool addToIndex = lne==nullptr || lne->visible();
4606
4607 startFile(ol,"modules",false,QCString(),title,HighlightedItem::Modules);
4608 startTitle(ol,QCString());
4609 ol.parseText(title);
4610 endTitle(ol,QCString(),QCString());
4611 ol.startContents();
4612 ol.startTextBlock();
4613 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4614 ol.endTextBlock();
4615
4616 // ---------------
4617 // Normal group index for Latex/RTF
4618 // ---------------
4619 // 2.{
4620 ol.pushGeneratorState();
4623
4624 writeModuleList(ol,nullptr,false);
4625
4627 ol.popGeneratorState();
4628 // 2.}
4629
4630 // ---------------
4631 // interactive group index for HTML
4632 // ---------------
4633 // 2.{
4634 ol.pushGeneratorState();
4636
4638 if (addToIndex)
4639 {
4640 Doxygen::indexList->addContentsItem(true,title,QCString(),"modules",QCString(),true,true);
4642 }
4643 FTVHelp ftv(false);
4644 writeModuleList(ol,&ftv,addToIndex);
4645 TextStream t;
4647 ol.writeString(t.str());
4648 if (addToIndex)
4649 {
4651 }
4652 }
4653 ol.popGeneratorState();
4654 // 2.}
4655 endFile(ol);
4656 ol.popGeneratorState();
4657 // 1.}
4658}
4659
4660//----------------------------------------------------------------------------
4661
4662static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex)
4663{
4664 for (const auto &cd : concepts)
4665 {
4666 if (cd->isLinkableInProject())
4667 {
4668 if (ftv)
4669 {
4670 ftv->addContentsItem(false,cd->displayName(false),cd->getReference(),
4671 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4672 }
4673 if (addToIndex)
4674 {
4675 Doxygen::indexList->addContentsItem(false,cd->displayName(false),cd->getReference(),
4676 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4677 }
4678 }
4679 }
4680}
4681
4683 bool rootOnly, bool addToIndex);
4684
4685static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
4686 bool rootOnly, bool addToIndex)
4687{
4688 for (const auto &nd : nsLinkedMap)
4689 {
4690 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4691 }
4692}
4693
4694
4696 bool rootOnly, bool addToIndex)
4697{
4698 if (!nd->isAnonymous() &&
4699 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4700 {
4701 bool isDir = namespaceHasNestedConcept(nd);
4702 bool isLinkable = nd->isLinkableInProject();
4703
4704 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4705
4706 QCString ref;
4707 QCString file;
4708 if (isLinkable)
4709 {
4710 ref = nd->getReference();
4711 file = nd->getOutputFileBase();
4712 }
4713
4714 if (isDir)
4715 {
4716 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),false,true,nd);
4717
4718 if (addToIndex)
4719 {
4720 // the namespace entry is already shown under the namespace list so don't
4721 // add it to the nav index and don't create a separate index file for it otherwise
4722 // it will overwrite the one written for the namespace list.
4723 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4724 false, // separateIndex
4725 false // addToNavIndex
4726 );
4727 }
4728 if (addToIndex)
4729 {
4731 }
4732
4733 ftv->incContentsDepth();
4734 writeConceptTreeInsideNamespace(nd->getNamespaces(),ftv,false,addToIndex);
4735 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4736 ftv->decContentsDepth();
4737
4738 if (addToIndex)
4739 {
4741 }
4742 }
4744}
4745
4746static void writeConceptRootList(FTVHelp *ftv,bool addToIndex)
4747{
4748 for (const auto &cd : *Doxygen::conceptLinkedMap)
4749 {
4750 if ((cd->getOuterScope()==nullptr ||
4751 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4752 )
4753 {
4754 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4755 ftv->addContentsItem(
4756 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4757 QCString(),false,cd->partOfGroups().empty(),cd.get());
4758 if (addToIndex)
4759 {
4761 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4762 QCString(),false,cd->partOfGroups().empty(),cd.get());
4763 }
4764 }
4765 }
4766}
4767
4768static void writeConceptIndex(OutputList &ol)
4769{
4770 if (Index::instance().numDocumentedConcepts()==0) return;
4771 ol.pushGeneratorState();
4772 // 1.{
4775 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4776 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4777 bool addToIndex = lne==nullptr || lne->visible();
4778
4779 startFile(ol,"concepts",false,QCString(),title,HighlightedItem::Concepts);
4780 startTitle(ol,QCString());
4781 ol.parseText(title);
4782 endTitle(ol,QCString(),QCString());
4783 ol.startContents();
4784 ol.startTextBlock();
4785 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4786 ol.endTextBlock();
4787
4788 // ---------------
4789 // Normal group index for Latex/RTF
4790 // ---------------
4791 // 2.{
4792 ol.pushGeneratorState();
4794
4795 bool first=true;
4796 for (const auto &cd : *Doxygen::conceptLinkedMap)
4797 {
4798 if (cd->isLinkableInProject())
4799 {
4800 if (first)
4801 {
4802 ol.startIndexList();
4803 first=false;
4804 }
4805 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4806 ol.startIndexKey();
4807 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4808 ol.endIndexKey();
4809
4810 bool hasBrief = !cd->briefDescription().isEmpty();
4811 ol.startIndexValue(hasBrief);
4812 if (hasBrief)
4813 {
4814 ol.generateDoc(cd->briefFile(),
4815 cd->briefLine(),
4816 cd.get(),
4817 nullptr,
4818 cd->briefDescription(true),
4819 DocOptions()
4820 .setSingleLine(true)
4821 .setLinkFromIndex(true));
4822 }
4823 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4824
4825 }
4826 }
4827 if (!first) ol.endIndexList();
4828
4829 ol.popGeneratorState();
4830 // 2.}
4831
4832 // ---------------
4833 // interactive group index for HTML
4834 // ---------------
4835 // 2.{
4836 ol.pushGeneratorState();
4838
4839 {
4840 if (addToIndex)
4841 {
4842 Doxygen::indexList->addContentsItem(true,title,QCString(),"concepts",QCString(),true,true);
4845 FTVHelp ftv(false);
4846 for (const auto &nd : *Doxygen::namespaceLinkedMap)
4847 {
4848 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4849 }
4850 writeConceptRootList(&ftv,addToIndex);
4851 TextStream t;
4853 ol.writeString(t.str());
4854 if (addToIndex)
4855 {
4857 }
4858 }
4859 ol.popGeneratorState();
4860 // 2.}
4861
4862 endFile(ol);
4863 ol.popGeneratorState();
4864 // 1.}
4865}
4866
4867//----------------------------------------------------------------------------
4868
4870{
4871 if (lne->baseFile().startsWith("usergroup"))
4872 {
4873 ol.pushGeneratorState();
4876 startTitle(ol,QCString());
4877 ol.parseText(lne->title());
4878 endTitle(ol,QCString(),QCString());
4879 ol.startContents();
4880 int count=0;
4881 for (const auto &entry: lne->children())
4882 {
4883 if (entry->visible()) count++;
4884 }
4885 if (count>0)
4886 {
4887 ol.writeString("<ul>\n");
4888 for (const auto &entry: lne->children())
4889 {
4890 if (entry->visible())
4891 {
4892 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4893 fixSpaces(entry->title())+"</span></a></li>\n");
4894 }
4895 }
4896 ol.writeString("</ul>\n");
4897 }
4898 endFile(ol);
4899 ol.popGeneratorState();
4900 }
4901}
4902
4903//----------------------------------------------------------------------------
4904
4905
4906static void writeIndex(OutputList &ol)
4907{
4908 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4909 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4910 bool disableIndex = Config_getBool(DISABLE_INDEX);
4911 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4912 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4913 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4914 QCString projectName = Config_getString(PROJECT_NAME);
4915 // save old generator state
4916 ol.pushGeneratorState();
4917
4918 QCString projPrefix;
4919 if (!projectName.isEmpty())
4920 {
4921 projPrefix=projectName+" ";
4922 }
4923
4924 //--------------------------------------------------------------------
4925 // write HTML index
4926 //--------------------------------------------------------------------
4928
4929 QCString defFileName =
4930 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4931 int defLine =
4932 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4933
4934 QCString title, titleAsHtml;
4935 if (!mainPageHasTitle())
4936 {
4937 title = theTranslator->trMainPage();
4938 }
4939 else if (Doxygen::mainPage)
4940 {
4941 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4942 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4943 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4944 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4945 }
4946
4947 QCString indexName="index";
4948 ol.startFile(indexName,false,QCString(),title);
4949
4951 {
4952 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4953 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4954 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4955 if (hasTitle) // to avoid duplicate entries in the treeview
4956 {
4958 title,
4959 QCString(),
4960 indexName,
4961 QCString(),
4962 hasSubs,
4963 true,
4964 nullptr,
4965 titleAsHtml);
4966 }
4967 if (hasSubs)
4968 {
4969 writePages(Doxygen::mainPage.get(),nullptr,!hasTitle);
4970 }
4971 }
4972
4973 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4974 ol.startQuickIndices();
4975 if (!disableIndex && !quickLinksAfterSplitbar)
4976 {
4978 }
4979 ol.endQuickIndices();
4980 ol.writeSplitBar(indexName,QCString());
4981 if (quickLinksAfterSplitbar)
4982 {
4984 }
4985 ol.writeSearchInfo();
4986 bool headerWritten=false;
4988 {
4989 if (!Doxygen::mainPage->title().isEmpty())
4990 {
4991 if (Doxygen::mainPage->title().lower() != "notitle")
4992 ol.startPageDoc(Doxygen::mainPage->title());
4993 else
4994 ol.startPageDoc("");
4995 }
4996 else
4997 ol.startPageDoc(projectName);
4998 }
4999 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
5000 {
5001 if (Doxygen::mainPage->title().lower()!="notitle")
5002 {
5003 ol.startHeaderSection();
5005 ol.generateDoc(Doxygen::mainPage->docFile(),
5006 Doxygen::mainPage->getStartBodyLine(),
5007 Doxygen::mainPage.get(),
5008 nullptr,
5009 Doxygen::mainPage->title(),
5010 DocOptions()
5011 .setSingleLine(true));
5012 headerWritten = true;
5013 }
5014 }
5015 else
5016 {
5017 if (!projectName.isEmpty())
5018 {
5019 ol.startHeaderSection();
5021 ol.parseText(theTranslator->trDocumentation(projectName));
5022 headerWritten = true;
5023 }
5024 }
5025 if (headerWritten)
5026 {
5028 ol.endHeaderSection();
5029 }
5030
5031 ol.startContents();
5032 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
5033 {
5035 }
5036
5038 {
5039 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
5040 {
5041 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
5042 }
5043
5044 ol.startTextBlock();
5045 ol.generateDoc(defFileName,
5046 defLine,
5047 Doxygen::mainPage.get(),
5048 nullptr,
5049 Doxygen::mainPage->documentation(),
5050 DocOptions()
5051 .setIndexWords(true));
5052 ol.endTextBlock();
5053 ol.endPageDoc();
5054 }
5055
5058 ol.writeString("<a href=\"" + fn + "\"></a>\n");
5060
5061 if (Doxygen::mainPage &&
5062 generateTreeView &&
5063 pageOutlinePanel &&
5064 Doxygen::mainPage->localToc().isHtmlEnabled() &&
5065 Doxygen::mainPage->hasSections()
5066 )
5067 {
5068 ol.writeString("</div><!-- doc-content -->\n");
5069 ol.endContents();
5070 Doxygen::mainPage->writePageNavigation(ol);
5071 ol.writeString("</div><!-- container -->\n");
5072 endFile(ol,true,true);
5073 }
5074 else
5075 {
5076 endFile(ol);
5077 }
5078
5080
5081 //--------------------------------------------------------------------
5082 // write LaTeX/RTF index
5083 //--------------------------------------------------------------------
5087
5089 {
5090 msg("Generating main page...\n");
5091 Doxygen::mainPage->writeDocumentation(ol);
5092 }
5093
5094 ol.startFile("refman",false,QCString(),QCString());
5098
5099 if (projPrefix.isEmpty())
5100 {
5102 }
5103 else
5104 {
5105 ol.parseText(projPrefix);
5106 }
5107
5108 if (!Config_getString(PROJECT_NUMBER).isEmpty())
5109 {
5110 ol.startProjectNumber();
5111 ol.generateDoc(defFileName,
5112 defLine,
5113 Doxygen::mainPage.get(),
5114 nullptr,
5115 Config_getString(PROJECT_NUMBER),
5116 DocOptions());
5117 ol.endProjectNumber();
5118 }
5125
5126 ol.lastIndexPage();
5128 {
5131 }
5132 const auto &index = Index::instance();
5133 if (index.numDocumentedPages()>0)
5134 {
5137 }
5138
5140 if (!Config_getBool(LATEX_HIDE_INDICES))
5141 {
5142 //if (indexedPages>0)
5143 //{
5144 // ol.startIndexSection(isPageIndex);
5145 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5146 // ol.endIndexSection(isPageIndex);
5147 //}
5148 if (index.numDocumentedModules()>0)
5149 {
5151 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5153 }
5154 if (index.numDocumentedGroups()>0)
5155 {
5157 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5159 }
5160 if (index.numDocumentedDirs()>0)
5161 {
5165 }
5166 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5167 {
5168 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5169 if (lne)
5170 {
5172 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5174 }
5175 }
5176 if (index.numDocumentedConcepts()>0)
5177 {
5179 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5181 }
5182 if (index.numHierarchyInterfaces()>0)
5183 {
5185 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5187 }
5188 if (index.numHierarchyClasses()>0)
5189 {
5190 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5191 if (lne)
5192 {
5194 ol.parseText(/*projPrefix+*/
5195 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5196 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5198 ));
5200 }
5201 }
5202 if (index.numHierarchyExceptions()>0)
5203 {
5205 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5207 }
5208 if (index.numAnnotatedInterfacesPrinted()>0)
5209 {
5211 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5213 }
5214 if (index.numAnnotatedClassesPrinted()>0)
5215 {
5217 ol.parseText(/*projPrefix+*/
5218 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5219 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5221 ));
5223 }
5224 if (index.numAnnotatedStructsPrinted()>0)
5225 {
5227 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5229 }
5230 if (index.numAnnotatedExceptionsPrinted()>0)
5231 {
5233 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5235 }
5236 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5237 {
5239 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5241 }
5242 }
5244
5245 if (index.numDocumentedModules()>0)
5246 {
5248 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5250 }
5251 if (index.numDocumentedGroups()>0)
5252 {
5254 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5256 }
5257 if (index.numDocumentedDirs()>0)
5258 {
5260 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5262 }
5263 if (index.numDocumentedNamespaces()>0)
5264 {
5268 }
5269 if (index.numDocumentedConcepts()>0)
5270 {
5272 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5274 }
5275 if (index.numAnnotatedInterfacesPrinted()>0)
5276 {
5278 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5280 }
5281 if (index.numAnnotatedClassesPrinted()>0)
5282 {
5286 }
5287 if (index.numAnnotatedStructsPrinted()>0)
5288 {
5290 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5293 if (index.numAnnotatedExceptionsPrinted()>0)
5296 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5298 }
5299 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5300 {
5302 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5304 }
5305 if (!Doxygen::exampleLinkedMap->empty())
5306 {
5308 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5310 }
5312 endFile(ol);
5313
5314 ol.popGeneratorState();
5315}
5316
5317static std::vector<bool> indexWritten;
5318
5319static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
5320{
5321 auto isRef = [](const QCString &s)
5322 {
5323 return s.startsWith("@ref") || s.startsWith("\\ref");
5324 };
5325 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5326 const auto &index = Index::instance();
5327 for (const auto &lne : entries)
5328 {
5329 LayoutNavEntry::Kind kind = lne->kind();
5330 size_t idx = static_cast<size_t>(kind);
5331 if (idx>=indexWritten.size())
5332 {
5333 size_t oldSize = indexWritten.size();
5334 size_t newSize = idx+1;
5335 indexWritten.resize(newSize);
5336 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=false;
5337 }
5338 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5339 bool addToIndex=lne->visible();
5340 bool needsClosing=false;
5341 if (!indexWritten.at(idx))
5342 {
5343 switch(kind)
5344 {
5345 case LayoutNavEntry::MainPage:
5346 msg("Generating index page...\n");
5347 writeIndex(ol);
5348 break;
5349 case LayoutNavEntry::Pages:
5350 msg("Generating page index...\n");
5351 writePageIndex(ol);
5352 break;
5353 case LayoutNavEntry::Topics:
5354 msg("Generating topic index...\n");
5355 writeTopicIndex(ol);
5356 break;
5357 case LayoutNavEntry::Modules:
5358 {
5359 if (index.numDocumentedModules()>0 && addToIndex)
5360 {
5363 needsClosing=true;
5364 }
5365 }
5366 break;
5367 case LayoutNavEntry::ModuleList:
5368 msg("Generating module index...\n");
5369 writeModuleIndex(ol);
5370 break;
5371 case LayoutNavEntry::ModuleMembers:
5372 msg("Generating module member index...\n");
5374 break;
5375 case LayoutNavEntry::Namespaces:
5376 {
5377 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5378 if (showNamespaces)
5379 {
5380 if (index.numDocumentedNamespaces()>0 && addToIndex)
5381 {
5384 needsClosing=true;
5385 }
5386 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5387 {
5388 msg("Generating namespace index...\n");
5390 }
5391 }
5392 }
5393 break;
5394 case LayoutNavEntry::NamespaceList:
5395 {
5396 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5397 if (showNamespaces)
5398 {
5399 msg("Generating namespace index...\n");
5401 }
5402 }
5403 break;
5404 case LayoutNavEntry::NamespaceMembers:
5405 msg("Generating namespace member index...\n");
5407 break;
5408 case LayoutNavEntry::Classes:
5409 if (index.numAnnotatedClasses()>0 && addToIndex)
5410 {
5413 needsClosing=true;
5414 }
5415 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5416 {
5417 msg("Generating annotated compound index...\n");
5419 }
5420 break;
5421 case LayoutNavEntry::Concepts:
5422 msg("Generating concept index...\n");
5424 break;
5425 case LayoutNavEntry::ClassList:
5426 msg("Generating annotated compound index...\n");
5428 break;
5429 case LayoutNavEntry::ClassIndex:
5430 msg("Generating alphabetical compound index...\n");
5432 break;
5433 case LayoutNavEntry::ClassHierarchy:
5434 msg("Generating hierarchical class index...\n");
5436 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5437 {
5438 msg("Generating graphical class hierarchy...\n");
5440 }
5441 break;
5442 case LayoutNavEntry::ClassMembers:
5443 if (!sliceOpt)
5444 {
5445 msg("Generating member index...\n");
5447 }
5448 break;
5449 case LayoutNavEntry::Interfaces:
5450 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5451 {
5454 needsClosing=true;
5455 }
5456 break;
5457 case LayoutNavEntry::InterfaceList:
5458 if (sliceOpt)
5459 {
5460 msg("Generating annotated interface index...\n");
5462 }
5463 break;
5464 case LayoutNavEntry::InterfaceIndex:
5465 if (sliceOpt)
5466 {
5467 msg("Generating alphabetical interface index...\n");
5469 }
5470 break;
5471 case LayoutNavEntry::InterfaceHierarchy:
5472 if (sliceOpt)
5473 {
5474 msg("Generating hierarchical interface index...\n");
5476 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5477 {
5478 msg("Generating graphical interface hierarchy...\n");
5480 }
5481 }
5482 break;
5483 case LayoutNavEntry::Structs:
5484 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5485 {
5488 needsClosing=true;
5489 }
5490 break;
5491 case LayoutNavEntry::StructList:
5492 if (sliceOpt)
5493 {
5494 msg("Generating annotated struct index...\n");
5496 }
5497 break;
5498 case LayoutNavEntry::StructIndex:
5499 if (sliceOpt)
5500 {
5501 msg("Generating alphabetical struct index...\n");
5503 }
5504 break;
5505 case LayoutNavEntry::Exceptions:
5506 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5507 {
5510 needsClosing=true;
5511 }
5512 break;
5513 case LayoutNavEntry::ExceptionList:
5514 if (sliceOpt)
5515 {
5516 msg("Generating annotated exception index...\n");
5518 }
5519 break;
5520 case LayoutNavEntry::ExceptionIndex:
5521 if (sliceOpt)
5522 {
5523 msg("Generating alphabetical exception index...\n");
5525 }
5526 break;
5527 case LayoutNavEntry::ExceptionHierarchy:
5528 if (sliceOpt)
5529 {
5530 msg("Generating hierarchical exception index...\n");
5532 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5533 {
5534 msg("Generating graphical exception hierarchy...\n");
5536 }
5537 }
5538 break;
5539 case LayoutNavEntry::Files:
5540 {
5541 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5542 {
5545 needsClosing=true;
5546 }
5547 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5548 {
5549 msg("Generating file index...\n");
5550 writeFileIndex(ol);
5551 }
5552 }
5553 break;
5554 case LayoutNavEntry::FileList:
5555 msg("Generating file index...\n");
5556 writeFileIndex(ol);
5557 break;
5558 case LayoutNavEntry::FileGlobals:
5559 msg("Generating file member index...\n");
5561 break;
5562 case LayoutNavEntry::Examples:
5563 msg("Generating example index...\n");
5565 break;
5566 case LayoutNavEntry::User:
5567 if (addToIndex)
5568 {
5569 // prepend a ! or ^ marker to the URL to avoid tampering with it
5570 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5571 bool isRelative=url.at(0)=='!';
5572 if (!url.isEmpty() && !isRelative) // absolute URL
5573 {
5574 url.prepend("^"); // prepend ^ to absolute URL
5575 }
5577 url,QCString(),false,isRef(lne->baseFile()) || isRelative);
5578 }
5579 break;
5580 case LayoutNavEntry::UserGroup:
5581 if (addToIndex)
5582 {
5583 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5584 if (!url.isEmpty())
5585 {
5586 if (url=="!") // result of a "[none]" url
5587 {
5588 Doxygen::indexList->addContentsItem(true,lne->title(),QCString(),QCString(),QCString(),false,false);
5589 }
5590 else
5591 {
5592 bool isRelative=url.at(0)=='!';
5593 if (!isRelative) // absolute URL
5594 {
5595 url.prepend("^"); // prepend ^ to absolute URL
5596 }
5598 url,QCString(),false,isRef(lne->baseFile()) || isRelative);
5599 }
5600 }
5601 else
5602 {
5603 Doxygen::indexList->addContentsItem(true,lne->title(),QCString(),lne->baseFile(),QCString(),true,true);
5604 }
5606 needsClosing=true;
5607 }
5608 writeUserGroupStubPage(ol,lne.get());
5609 break;
5610 case LayoutNavEntry::None:
5611 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5612 break;
5613 }
5614 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5615 {
5616 indexWritten.at(idx)=true;
5618 }
5620 if (needsClosing)
5621 {
5622 switch(kind)
5623 {
5624 case LayoutNavEntry::Modules:
5625 case LayoutNavEntry::Namespaces:
5626 case LayoutNavEntry::Classes:
5627 case LayoutNavEntry::Files:
5628 case LayoutNavEntry::UserGroup:
5630 break;
5631 default:
5632 break;
5633 }
5634 }
5635 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5636 }
5637
5638 // always write the directory index as it is used for non-HTML output only
5639 writeDirIndex(ol);
5640}
5641
5642static bool quickLinkVisible(LayoutNavEntry::Kind kind)
5643{
5644 const auto &index = Index::instance();
5645 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5646 bool showFiles = Config_getBool(SHOW_FILES);
5647 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5648 switch (kind)
5649 {
5650 case LayoutNavEntry::MainPage: return true;
5651 case LayoutNavEntry::User: return true;
5652 case LayoutNavEntry::UserGroup: return true;
5653 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5654 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5655 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5656 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5657 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5658 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5659 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5660 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5661 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5662 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5663 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5664 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5665 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5666 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5667 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5668 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5669 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5670 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5671 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5672 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5673 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5674 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5675 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5676 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5677 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5678 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5679 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5680 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5681 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5682 case LayoutNavEntry::None: // should never happen, means not properly initialized
5683 assert(kind != LayoutNavEntry::None);
5684 return false;
5685 }
5686 return false;
5687}
5688
5689template<class T>
5690void renderMemberIndicesAsJs(std::ostream &t,
5691 std::function<std::size_t(std::size_t)> numDocumented,
5692 std::function<Index::MemberIndexMap(std::size_t)> getMemberList,
5693 const T *(*getInfo)(size_t hl),
5694 std::size_t total)
5695{
5696 // index items per category member lists
5697 bool firstMember=true;
5698 for (std::size_t i=0;i<total;i++)
5699 {
5700 if (numDocumented(i)>0)
5701 {
5702 t << ",";
5703 if (firstMember)
5704 {
5705 t << "children:[";
5706 firstMember=false;
5707 }
5708 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5709 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5710
5711 // Check if we have many members, then add sub entries per letter...
5712 // quick alphabetical index
5713 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5714 if (quickIndex)
5715 {
5716 bool multiPageIndex=false;
5717 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5718 {
5719 multiPageIndex=true;
5720 }
5721 t << ",children:[\n";
5722 bool firstLetter=true;
5723 for (const auto &[letter,list] : getMemberList(i))
5724 {
5725 if (!firstLetter) t << ",\n";
5726 QCString ci(letter);
5727 QCString is(letterToLabel(ci));
5728 QCString anchor;
5730 QCString fullName = getInfo(i)->fname;
5731 if (!multiPageIndex || firstLetter)
5732 anchor=fullName+extension+"#index_";
5733 else // other pages of multi page index
5734 anchor=fullName+"_"+is+extension+"#index_";
5735 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5736 << convertToJSString(anchor+convertToId(is)) << "\"}";
5737 firstLetter=false;
5738 }
5739 t << "]";
5740 }
5741 t << "}";
5742 }
5743 }
5744 if (!firstMember)
5745 {
5746 t << "]";
5747 }
5748}
5749
5750static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5751{
5752 int count=0;
5753 for (const auto &entry : root->children())
5754 {
5755 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5756 }
5757 if (count>0) // at least one item is visible
5758 {
5759 bool firstChild = true;
5760 if (!first) t << ",";
5761 t << "children:[\n";
5762 for (const auto &entry : root->children())
5763 {
5764 if (entry->visible() && quickLinkVisible(entry->kind()))
5765 {
5766 if (!firstChild) t << ",\n";
5767 firstChild=false;
5768 QCString url = entry->url();
5769 if (isURL(url)) url = "^" + url;
5770 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5771 << convertToJSString(url) << "\"";
5772 bool hasChildren=false;
5773 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5774 {
5775 auto numDoc = [](std::size_t i) {
5777 };
5778 auto memList = [](std::size_t i) {
5780 };
5781 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5782 }
5783 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5784 {
5785 auto numDoc = [](std::size_t i) {
5787 };
5788 auto memList = [](std::size_t i) {
5790 };
5791 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5792 }
5793 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5794 {
5795 auto numDoc = [](std::size_t i) {
5797 };
5798 auto memList = [](std::size_t i) {
5801 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5802 }
5803 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5804 {
5805 auto numDoc = [](std::size_t i) {
5807 };
5808 auto memList = [](std::size_t i) {
5810 };
5811 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5812 }
5813 else // recursive into child list
5814 {
5815 hasChildren = renderQuickLinksAsJs(t,entry.get(),false);
5817 if (hasChildren) t << "]";
5818 t << "}";
5819 }
5820 }
5821 }
5822 return count>0;
5823}
5824
5825static void writeMenuData()
5826{
5827 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5828 QCString outputDir = Config_getBool(HTML_OUTPUT);
5830 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5831 if (t.is_open())
5832 {
5834 t << "var menudata={";
5835 bool hasChildren = renderQuickLinksAsJs(t,root,true);
5836 if (hasChildren) t << "]";
5837 t << "}\n";
5838 }
5839}
5840
5842{
5843 writeMenuData();
5845 if (lne)
5846 {
5848 }
5849}
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. class/struct/union/...
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:77
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 briefFile() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual bool isReference() const =0
virtual QCString displayName(bool includeScope=true) 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:97
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:100
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:104
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:95
static PageLinkedMap * exampleLinkedMap
Definition doxygen.h:98
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
static IndexList * indexList
Definition doxygen.h:132
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:96
static QCString htmlFileExtension
Definition doxygen.h:122
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:99
static DirLinkedMap * dirLinkedMap
Definition doxygen.h:127
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:881
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:207
int numAnnotatedInterfacesPrinted() const
Definition index.cpp:118
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:170
int numDocumentedFiles() const
Definition index.cpp:130
int numDocumentedNamespaces() const
Definition index.cpp:126
int numIndexedPages() const
Definition index.cpp:129
int numAnnotatedClassesPrinted() const
Definition index.cpp:115
int numDocumentedGroups() const
Definition index.cpp:125
void resetDocumentedModuleMembers(int i)
Definition index.cpp:176
int numDocumentedModules() const
Definition index.cpp:128
void incrementDocumentedFileMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:201
int numAnnotatedStructs() const
Definition index.cpp:120
int numDocumentedConcepts() const
Definition index.cpp:127
void addNamespaceMemberNameToIndex(const MemberDef *md)
Definition index.cpp:2937
void resetDocumentedClassMembers(int i)
Definition index.cpp:158
int numAnnotatedStructsPrinted() const
Definition index.cpp:121
void incrementDocumentedClassMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:195
MemberIndexMap isClassIndexLetterUsed(ClassMemberHighlight::Enum e) const
Definition index.cpp:138
void addFileMemberNameToIndex(const MemberDef *md)
Definition index.cpp:2985
void incrementDocumentedModuleMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:213
int numHierarchyInterfaces() const
Definition index.cpp:119
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:133
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:136
void addModuleMemberNameToIndex(const MemberDef *md)
Definition index.cpp:3037
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:135
int numDocumentedPages() const
Definition index.cpp:131
int numHierarchyExceptions() const
Definition index.cpp:124
int numAnnotatedExceptionsPrinted() const
Definition index.cpp:123
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:134
int numAnnotatedExceptions() const
Definition index.cpp:122
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:143
void sortMemberIndexLists()
Definition index.cpp:220
std::map< std::string, MemberIndexList > MemberIndexMap
Definition index.h:168
static Index & instance()
Definition index.cpp:108
void countDataStructures()
Definition index.cpp:264
int numHierarchyClasses() const
Definition index.cpp:116
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:153
void resetDocumentedFileMembers(int i)
Definition index.cpp:164
int numDocumentedDirs() const
Definition index.cpp:132
int numAnnotatedInterfaces() const
Definition index.cpp:117
Index()
Definition index.cpp:102
std::unique_ptr< Private > p
Definition index.h:221
int numAnnotatedClasses() const
Definition index.cpp:114
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:148
void decContentsDepth()
Definition indexlist.h:109
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex=false, bool addToNavIndex=false, const Definition *def=nullptr, const QCString &nameAsHtml=QCString())
Definition indexlist.h:112
void addIndexFile(const QCString &name)
Definition indexlist.h:120
void enable()
enable the indices
Definition indexlist.h:92
void incContentsDepth()
Definition indexlist.h:106
void disable()
disable the indices
Definition indexlist.h:88
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
bool empty() const
Definition linkedmap.h:209
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 QCString anonymousMemberPrefix() 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 MemberDef * toAnonymousMember() 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 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 endTextBlock(bool paraBreak=false)
Definition outputlist.h:672
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 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 startTextBlock(bool dense=false)
Definition outputlist.h:670
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:97
QCString & prepend(const char *s)
Definition qcstring.h:420
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:164
bool startsWith(const char *s) const
Definition qcstring.h:505
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:239
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:591
int find(char c, int index=0, bool cs=true) const
Definition qcstring.cpp:43
bool isEmpty() const
Returns true iff the string is empty.
Definition qcstring.h:161
const std::string & str() const
Definition qcstring.h:550
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:170
QCString left(size_t len) const
Definition qcstring.h:227
class that provide information about a section.
Definition section.h:58
QCString label() const
Definition section.h:69
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:179
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:216
virtual QCString trAll()=0
virtual QCString trCompoundListDescription()=0
virtual QCString trTopicIndex()=0
virtual QCString trClassHierarchyDescription()=0
virtual QCString trNamespaceDocumentation()=0
virtual QCString trTopics()=0
virtual QCString trDocumentation(const QCString &projName)=0
virtual QCString trDirIndex()=0
virtual QCString trExceptionHierarchy()=0
virtual QCString trConceptIndex()=0
virtual QCString trModuleIndex()=0
virtual QCString trDirectories()=0
virtual QCString trExceptionDocumentation()=0
virtual QCString trFileIndex()=0
virtual QCString trNamespaceIndex()=0
virtual QCString trGotoGraphicalHierarchy()=0
virtual QCString trSequences()=0
virtual QCString trHierarchicalIndex()=0
virtual QCString trExceptionListDescription()=0
virtual QCString trInterfaceIndex()=0
virtual QCString trFunctionAndProc()=0
virtual QCString trModules()=0
virtual QCString trFileListDescription(bool extractAll)=0
virtual QCString trConceptList()=0
virtual QCString trInterfaceList()=0
virtual QCString trVariables()=0
virtual QCString trFunctions()=0
virtual QCString trFileMembersDescriptionTotal(FileMemberHighlight::Enum hl)=0
virtual QCString trExceptionHierarchyDescription()=0
virtual QCString trModulesListDescription(bool extractAll)=0
virtual QCString trFileDocumentation()=0
virtual QCString trEnumerationValues()=0
virtual QCString trConstants()=0
virtual QCString trRelatedPagesDescription()=0
virtual QCString trCompoundMembers()=0
virtual QCString trStructDocumentation()=0
virtual QCString trInterfaceHierarchyDescription()=0
virtual QCString trExamplesDescription()=0
virtual QCString trCompoundIndex()=0
virtual QCString trModulesMembers()=0
virtual QCString trInterfaceHierarchy()=0
virtual QCString trClassDocumentation()=0
virtual QCString trLegendDocs()=0
virtual QCString trExceptionList()=0
virtual QCString trModuleDocumentation()=0
virtual QCString trGeneratedBy()=0
virtual QCString trRelatedPages()=0
virtual QCString trTopicDocumentation()=0
virtual QCString trTypeDocumentation()=0
virtual QCString trClassHierarchy()=0
virtual QCString trNamespaceList()=0
virtual QCString trEnumerations()=0
virtual QCString trNamespaceMembersDescriptionTotal(NamespaceMemberHighlight::Enum hl)=0
virtual QCString trModulesIndex()=0
virtual QCString trFileMembers()=0
virtual QCString trDirDocumentation()=0
virtual QCString trNamespaceListDescription(bool extractAll)=0
virtual QCString trCompoundIndexFortran()=0
virtual QCString trStructIndex()=0
virtual QCString trGotoTextualHierarchy()=0
virtual QCString trTopicListDescription()=0
virtual QCString trFileList()=0
virtual QCString trEvents()=0
virtual QCString trExamples()=0
virtual QCString trNamespaceMembers()=0
virtual QCString trCompoundMembersDescriptionTotal(ClassMemberHighlight::Enum hl)=0
virtual QCString trStructList()=0
virtual QCString trSubprograms()=0
virtual QCString trStructListDescription()=0
virtual QCString trModuleMembersDescriptionTotal(ModuleMemberHighlight::Enum hl)=0
virtual QCString trLegendTitle()=0
virtual QCString trDictionaries()=0
virtual QCString trMainPage()=0
virtual QCString trInterfaceListDescription()=0
virtual QCString trRelatedSymbols()=0
virtual QCString trConceptDocumentation()=0
virtual QCString trExceptionIndex()=0
virtual QCString trReferenceManual()=0
virtual QCString trInterfaceDocumentation()=0
virtual QCString trCompoundList()=0
virtual QCString trDesignUnitIndex()=0
virtual QCString trProperties()=0
virtual QCString trConceptListDescription(bool extractAll)=0
virtual QCString trCode()=0
virtual QCString trTypedefs()=0
virtual QCString trDefines()=0
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
std::map< std::string, std::string > StringMap
Definition containers.h:30
Definition * toDefinition(DefinitionMutable *dm)
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:1959
constexpr auto JAVASCRIPT_LICENSE_TEXT
Definition ftvhelp.h:72
static const char * hex
static void writePages(PageDef *pd, FTVHelp *ftv, bool reuseRoot=false)
Definition index.cpp:3968
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4660
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1963
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:386
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5294
static void writeClassTreeToOutput(OutputList &ol, const BaseClassList &bcl, int level, FTVHelp *ftv, bool addToIndex, ClassDefSet &visitedClasses)
Definition index.cpp:626
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition index.cpp:429
#define MAX_ITEMS_BEFORE_QUICK_INDEX
Definition index.cpp:56
static void startQuickIndexList(OutputList &ol, bool letterTabs=false)
Definition index.cpp:347
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
Definition index.cpp:3364
#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:1936
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5725
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1238
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2683
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2527
static void writeDirIndex(OutputList &ol)
Definition index.cpp:1570
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3304
void writeGraphInfo(OutputList &ol)
Definition index.cpp:4102
static std::vector< bool > indexWritten
Definition index.cpp:5292
static int countConcepts()
Definition index.cpp:1738
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:396
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2655
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
Definition index.cpp:3171
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
Definition index.cpp:2179
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1599
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1343
static void endQuickIndexList(OutputList &ol)
Definition index.cpp:360
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2440
static int countClassHierarchy(ClassDef::CompoundType ct)
Definition index.cpp:1147
static void startQuickIndexItem(OutputList &ol, const QCString &l, bool hl, bool, bool &first)
Definition index.cpp:366
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2669
static void writePageIndex(OutputList &ol)
Definition index.cpp:4028
void addMembersToIndex(T *def, LayoutDocManager::LayoutPart part, const QCString &name, const QCString &anchor, bool addToIndex=true, bool preventSeparateIndex=false, const ConceptLinkedRefMap *concepts=nullptr)
Definition index.cpp:533
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2053
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2035
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:5665
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2697
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1264
static void writeNamespaceMembers(const NamespaceDef *nd, bool addToIndex)
Definition index.cpp:1819
static void countRelatedPages(int &docPages, int &indexPages)
Definition index.cpp:3950
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4844
static int countGroups()
Definition index.cpp:4070
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3551
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1876
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4422
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1755
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3860
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4721
static int countDirs()
Definition index.cpp:4086
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3341
constexpr auto alphaSepar
Definition index.cpp:58
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1448
bool isId1(int c)
Definition index.cpp:2250
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:3712
static void countFiles(int &htmlFiles, int &files)
Definition index.cpp:1474
static void writeClassHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1096
static void writeSingleFileIndex(OutputList &ol, const FileDef *fd)
Definition index.cpp:1496
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:3885
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1123
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2469
static void endQuickIndexItem(OutputList &ol)
Definition index.cpp:379
static void writeMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, QCString fullName, bool multiPage)
Definition index.cpp:3104
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2581
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3527
const ClassDef * get_pointer(const Ptr &p)
static int countAnnotatedClasses(int *cp, ClassDef::CompoundType ct)
Definition index.cpp:2154
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2498
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4398
static void writeModuleMembers(const ModuleDef *mod, bool addToIndex)
Definition index.cpp:1845
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4670
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:403
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3149
static void writeDirHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:928
std::set< std::string > UsedIndexLetters
Definition index.cpp:2281
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4637
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
Definition index.cpp:2710
void writeIndexHierarchy(OutputList &ol)
Definition index.cpp:5816
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4545
static bool dirHasVisibleChildren(const DirDef *dd)
Definition index.cpp:742
static int countNamespaces()
Definition index.cpp:1727
static void endIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:325
const int maxItemsBeforeQuickIndex
Definition index.cpp:343
static QCString letterToLabel(const QCString &startLetter)
Definition index.cpp:2255
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:450
static void writeConceptIndex(OutputList &ol)
Definition index.cpp:4743
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:4569
static void MemberIndexMap_add(Index::MemberIndexMap &map, const std::string &letter, const MemberDef *md)
Definition index.cpp:182
static void writeIndex(OutputList &ol)
Definition index.cpp:4881
static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:770
static void startIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:309
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition index.cpp:5617
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4491
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1369
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3676
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1157
static void writeMenuData()
Definition index.cpp:5800
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4152
static void writeMemberToIndex(const Definition *def, const MemberDef *md, bool addToIndex)
Definition index.cpp:470
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:3492
static void writeClassTreeForList(OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
Definition index.cpp:992
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3728
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2284
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:648
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:530
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:571
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Definition qcstring.h:52
#define ASSERT(x)
Definition qcstring.h:33
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2573
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:2558
const ClassDef::CompoundType compoundType
Definition index.cpp:2576
const HighlightedItem hiItem
Definition index.cpp:2578
const QCString fileBaseName
Definition index.cpp:2577
const LayoutNavEntry::Kind listKind
Definition index.cpp:2572
const QCString listDefaultTitleText
Definition index.cpp:2574
const int numAnnotated
Definition index.cpp:2570
const QCString listDefaultIntroText
Definition index.cpp:2575
Helper class representing a class member in the navigation menu.
Definition index.cpp:3143
CmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3144
QCString title
Definition index.cpp:3146
const char * fname
Definition index.cpp:3145
Helper class representing a file member in the navigation menu.
Definition index.cpp:3335
FmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3336
const char * fname
Definition index.cpp:3337
QCString title
Definition index.cpp:3338
std::array< MemberIndexMap, ModuleMemberHighlight::Total > moduleIndexLetterUsed
Definition index.cpp:99
int annotatedExceptions
Definition index.cpp:81
std::array< MemberIndexMap, ClassMemberHighlight::Total > classIndexLetterUsed
Definition index.cpp:96
int documentedModules
Definition index.cpp:87
int annotatedExceptionsPrinted
Definition index.cpp:82
int documentedPages
Definition index.cpp:90
int documentedConcepts
Definition index.cpp:86
int annotatedStructs
Definition index.cpp:79
int annotatedInterfaces
Definition index.cpp:76
int hierarchyInterfaces
Definition index.cpp:78
int annotatedStructsPrinted
Definition index.cpp:80
std::array< int, FileMemberHighlight::Total > documentedFileMembers
Definition index.cpp:93
int documentedDirs
Definition index.cpp:91
std::array< MemberIndexMap, FileMemberHighlight::Total > fileIndexLetterUsed
Definition index.cpp:97
int indexedPages
Definition index.cpp:88
std::array< int, ModuleMemberHighlight::Total > documentedModuleMembers
Definition index.cpp:95
int annotatedClasses
Definition index.cpp:73
int annotatedInterfacesPrinted
Definition index.cpp:77
int hierarchyExceptions
Definition index.cpp:83
int documentedFiles
Definition index.cpp:89
int documentedNamespaces
Definition index.cpp:85
std::array< int, NamespaceMemberHighlight::Total > documentedNamespaceMembers
Definition index.cpp:94
int documentedGroups
Definition index.cpp:84
std::array< int, ClassMemberHighlight::Total > documentedClassMembers
Definition index.cpp:92
std::array< MemberIndexMap, NamespaceMemberHighlight::Total > namespaceIndexLetterUsed
Definition index.cpp:98
int annotatedClassesPrinted
Definition index.cpp:74
int hierarchyClasses
Definition index.cpp:75
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
QCString url() const
Definition layout.cpp:151
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
Kind kind() const
Definition layout.h:213
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:3706
MmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3707
QCString title
Definition index.cpp:3709
const char * fname
Definition index.cpp:3708
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3521
const char * fname
Definition index.cpp:3523
QCString title
Definition index.cpp:3524
NmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3522
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:4066
bool mainPageHasTitle()
Definition util.cpp:6324
QCString parseCommentAsHtml(const Definition *scope, const MemberDef *member, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5467
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:4006
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5411
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:5965
QCString filterTitle(const QCString &title)
Definition util.cpp:5672
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:6129
bool isURL(const QCString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:5953
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
Definition util.cpp:3736
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:5937
QCString getDotImageExtension()
Definition util.cpp:6329
QCString stripFromPath(const QCString &path)
Definition util.cpp:321
int getPrefixIndex(const QCString &name)
Definition util.cpp:3267
QCString convertToId(const QCString &s)
Definition util.cpp:3911
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4964
A bunch of utility functions.
QCString fixSpaces(const QCString &s)
Definition util.h:522