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