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