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