Doxygen
index.cpp
浏览该文件的文档.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2021 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 <sstream>
22 #include <array>
23 
24 #include <assert.h>
25 
26 #include "message.h"
27 #include "index.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"
39 #include "dotgfxhierarchytable.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 
52 #define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200
53 #define MAX_ITEMS_BEFORE_QUICK_INDEX 30
54 
55 
77 
79 static void countFiles(int &htmlFiles,int &files);
80 static int countGroups();
81 static int countDirs();
82 static int countNamespaces();
83 static int countConcepts();
84 static int countAnnotatedClasses(int *cp,ClassDef::CompoundType ct);
85 static void countRelatedPages(int &docPages,int &indexPages);
86 
88 {
89  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
92  // "interfaces" + "annotated"
94  // "interfacehierarchy"
96  // "structs" + "annotated"
98  // "exceptions" + "annotated"
100  // "exceptionhierarchy"
104  documentedGroups = countGroups(); // "modules"
105  documentedNamespaces = countNamespaces(); // "namespaces"
106  documentedConcepts = countConcepts(); // "concepts"
107  documentedDirs = countDirs(); // "dirs"
108  // "globals"
109  // "namespacemembers"
110  // "functions"
111 }
112 
113 static void startIndexHierarchy(OutputList &ol,int level)
114 {
115  ol.pushGeneratorState();
118  if (level<6) ol.startIndexList();
119  ol.popGeneratorState();
120 
121  ol.pushGeneratorState();
125  ol.startItemList();
126  ol.popGeneratorState();
127 }
128 
129 static void endIndexHierarchy(OutputList &ol,int level)
130 {
131  ol.pushGeneratorState();
134  if (level<6) ol.endIndexList();
135  ol.popGeneratorState();
136 
137  ol.pushGeneratorState();
141  ol.endItemList();
142  ol.popGeneratorState();
143 }
144 
145 //----------------------------------------------------------------------------
146 
147 using MemberIndexList = std::vector<const MemberDef *>;
148 using MemberIndexMap = std::map<std::string,MemberIndexList>;
149 
150 static std::array<MemberIndexMap,CMHL_Total> g_classIndexLetterUsed;
151 static std::array<MemberIndexMap,FMHL_Total> g_fileIndexLetterUsed;
152 static std::array<MemberIndexMap,NMHL_Total> g_namespaceIndexLetterUsed;
153 
154 void MemberIndexMap_add(MemberIndexMap &map,const std::string &letter,const MemberDef *md)
155 {
156  auto it = map.find(letter);
157  if (it!=map.end())
158  {
159  it->second.push_back(md);
160  }
161  else
162  {
163  map.insert(std::make_pair(letter,std::vector<const MemberDef*>({md})));
164  }
165 }
166 
168 
169 //----------------------------------------------------------------------------
170 
171 //----------------------------------------------------------------------------
172 
173 static void startQuickIndexList(OutputList &ol,bool letterTabs=FALSE)
174 {
175  if (letterTabs)
176  {
177  ol.writeString(" <div id=\"navrow4\" class=\"tabs3\">\n");
178  }
179  else
180  {
181  ol.writeString(" <div id=\"navrow3\" class=\"tabs2\">\n");
182  }
183  ol.writeString(" <ul class=\"tablist\">\n");
184 }
185 
187 {
188  ol.writeString(" </ul>\n");
189  ol.writeString(" </div>\n");
190 }
191 
192 static void startQuickIndexItem(OutputList &ol,const QCString &l,
193  bool hl,bool compact,bool &first)
194 {
195  first=FALSE;
196  ol.writeString(" <li");
197  if (hl) ol.writeString(" class=\"current\"");
198  ol.writeString("><a ");
199  ol.writeString("href=\"");
200  ol.writeString(l);
201  ol.writeString("\">");
202  ol.writeString("<span>");
203 }
204 
206 {
207  ol.writeString("</span>");
208  ol.writeString("</a>");
209  ol.writeString("</li>\n");
210 }
211 
212 // don't make this static as it is called from a template function and some
213 // old compilers don't support calls to static functions from a template.
215 {
216  return substitute(s," ","&#160;");
217 }
218 
219 void startTitle(OutputList &ol,const QCString &fileName,const DefinitionMutable *def)
220 {
221  ol.startHeaderSection();
222  if (def) def->writeSummaryLinks(ol);
223  ol.startTitleHead(fileName);
224  ol.pushGeneratorState();
226 }
227 
228 void endTitle(OutputList &ol,const QCString &fileName,const QCString &name)
229 {
230  ol.popGeneratorState();
231  ol.endTitleHead(fileName,name);
232  ol.endHeaderSection();
233 }
234 
235 void startFile(OutputList &ol,const QCString &name,const QCString &manName,
236  const QCString &title,HighlightedItem hli,bool additionalIndices,
237  const QCString &altSidebarName)
238 {
239  static bool disableIndex = Config_getBool(DISABLE_INDEX);
240  ol.startFile(name,manName,title);
241  ol.startQuickIndices();
242  if (!disableIndex)
243  {
244  ol.writeQuickLinks(TRUE,hli,name);
245  }
246  if (!additionalIndices)
247  {
248  ol.endQuickIndices();
249  }
250  ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name);
251  ol.writeSearchInfo();
252 }
253 
254 void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents,
255  const QCString &navPath)
256 {
257  static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
258  ol.pushGeneratorState();
260  if (!skipNavIndex)
261  {
262  if (!skipEndContents) ol.endContents();
263  if (generateTreeView)
264  {
265  ol.writeString("</div><!-- doc-content -->\n");
266  }
267  }
268 
269  ol.writeFooter(navPath); // write the footer
270  ol.popGeneratorState();
271  ol.endFile();
272 }
273 
275 {
276  static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
277  QCString navPath;
278  if (generateTreeView)
279  {
280  ol.pushGeneratorState();
282  ol.writeString("</div><!-- doc-content -->\n");
283  ol.popGeneratorState();
284  navPath = d->navigationPathAsString();
285  }
286  endFile(ol,generateTreeView,TRUE,navPath);
287 }
288 
289 //----------------------------------------------------------------------
290 
291 static void writeMemberToIndex(const Definition *def,const MemberDef *md,bool addToIndex)
292 {
293  bool isAnonymous = md->isAnonymous();
294  bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
295  const MemberVector &enumList = md->enumFieldList();
296  bool isDir = !enumList.empty() && md->isEnumerate();
297  if (md->getOuterScope()==def || md->getOuterScope()==Doxygen::globalScope)
298  {
300  md->name(),md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,addToIndex && md->getGroupDef()==nullptr);
301  }
302  else // inherited member
303  {
305  md->name(),def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,addToIndex && md->getGroupDef()==nullptr);
306  }
307  if (isDir)
308  {
309  if (!isAnonymous)
310  {
312  }
313  for (const auto &emd : enumList)
314  {
315  if (!hideUndocMembers || emd->hasDocumentation())
316  {
317  if (emd->getOuterScope()==def || emd->getOuterScope()==Doxygen::globalScope)
318  {
320  emd->name(),emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,addToIndex && emd->getGroupDef()==nullptr);
321  }
322  else // inherited member
323  {
325  emd->name(),def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,addToIndex && emd->getGroupDef()==nullptr);
326  }
327  }
328  }
329  if (!isAnonymous)
330  {
332  }
333  }
334 }
335 
336 //----------------------------------------------------------------------
337 template<class T>
339  const QCString &name,const QCString &anchor,
340  bool addToIndex=TRUE,bool preventSeparateIndex=FALSE,
341  const ConceptLinkedRefMap *concepts = nullptr)
342 
343 {
344  bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty();
345  Doxygen::indexList->addContentsItem(hasMembers,name,
346  def->getReference(),def->getOutputFileBase(),anchor,
347  hasMembers && !preventSeparateIndex,
348  addToIndex,
349  def);
350  int numClasses=0;
351  for (const auto &cd : def->getClasses())
352  {
353  if (cd->isLinkable()) numClasses++;
354  }
355  int numConcepts=0;
356  if (concepts)
357  {
358  for (const auto &cd : *concepts)
359  {
360  if (cd->isLinkable()) numConcepts++;
361  }
362  }
363  //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
364  if (hasMembers || numClasses>0 || numConcepts>0)
365  {
367  for (const auto &lde : LayoutDocManager::instance().docEntries(part))
368  {
369  auto kind = lde->kind();
370  if (kind==LayoutDocEntry::MemberDef)
371  {
372  const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
373  MemberList *ml = def->getMemberList(lmd->type);
374  if (ml)
375  {
376  for (const auto &md : *ml)
377  {
378  if (md->visibleInIndex())
379  {
380  writeMemberToIndex(def,md,addToIndex);
381  }
382  }
383  }
384  }
385  else if (kind==LayoutDocEntry::NamespaceClasses ||
388  )
389  {
390  for (const auto &cd : def->getClasses())
391  {
392  if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
393  {
394  static bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
395  bool isNestedClass = def->definitionType()==Definition::TypeClass;
396  addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
397  addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
398  preventSeparateIndex || cd->isEmbeddedInOuterScope());
399  }
400  }
401  }
402  else if (kind==LayoutDocEntry::FileConcepts && concepts)
403  {
404  for (const auto &cd : *concepts)
405  {
406  if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
407  {
408  Doxygen::indexList->addContentsItem(false,cd->displayName(),
409  cd->getReference(),cd->getOutputFileBase(),QCString(),
410  addToIndex,
411  false,
412  cd);
413  }
414  }
415  }
416  }
417 
419  }
420 }
421 
422 
423 //----------------------------------------------------------------------------
424 /*! Generates HTML Help tree of classes */
425 
426 static void writeClassTreeToOutput(OutputList &ol,const BaseClassList &bcl,int level,FTVHelp* ftv,bool addToIndex,ClassDefSet &visitedClasses)
427 {
428  if (bcl.empty()) return;
429  bool started=FALSE;
430  for (const auto &bcd : bcl)
431  {
432  ClassDef *cd=bcd.classDef;
434  {
435  continue;
436  }
437 
438  bool b;
439  if (cd->getLanguage()==SrcLangExt_VHDL)
440  {
441  b=hasVisibleRoot(cd->subClasses());
442  }
443  else
444  {
445  b=hasVisibleRoot(cd->baseClasses());
446  }
447 
448  if (cd->isVisibleInHierarchy() && b) // hasVisibleRoot(cd->baseClasses()))
449  {
450  if (!started)
451  {
452  startIndexHierarchy(ol,level);
453  if (addToIndex)
454  {
456  }
457  if (ftv)
458  {
459  ftv->incContentsDepth();
460  }
461  started=TRUE;
462  }
463  ol.startIndexListItem();
464  //printf("Passed...\n");
465  bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
467  //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
468  if (cd->isLinkable())
469  {
470  //printf("Writing class %s\n",qPrint(cd->displayName()));
472  ol.parseText(cd->displayName());
474  if (cd->isReference())
475  {
476  ol.startTypewriter();
477  ol.docify(" [external]");
478  ol.endTypewriter();
479  }
480  if (addToIndex)
481  {
483  }
484  if (ftv)
485  {
486  if (cd->getLanguage()==SrcLangExt_VHDL)
487  {
488  ftv->addContentsItem(hasChildren,bcd.usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
489  }
490  else
491  {
492  ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
493  }
494  }
495  }
496  else
497  {
499  ol.parseText(cd->name());
501  if (addToIndex)
502  {
504  }
505  if (ftv)
506  {
507  ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd);
508  }
509  }
510  if (hasChildren)
511  {
512  //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
513  visitedClasses.insert(cd);
514  if (cd->getLanguage()==SrcLangExt_VHDL)
515  {
516  writeClassTreeToOutput(ol,cd->baseClasses(),level+1,ftv,addToIndex,visitedClasses);
517  }
518  else
519  {
520  writeClassTreeToOutput(ol,cd->subClasses(),level+1,ftv,addToIndex,visitedClasses);
521  }
522  }
523  ol.endIndexListItem();
524  }
525  }
526  if (started)
527  {
528  endIndexHierarchy(ol,level);
529  if (addToIndex)
530  {
532  }
533  if (ftv)
534  {
535  ftv->decContentsDepth();
536  }
537  }
538 }
539 
540 //----------------------------------------------------------------------------
541 
542 static bool dirHasVisibleChildren(const DirDef *dd)
543 {
544  if (dd->hasDocumentation()) return TRUE;
545 
546  for (const auto &fd : dd->getFiles())
547  {
548  bool genSourceFile;
549  if (fileVisibleInIndex(fd,genSourceFile))
550  {
551  return TRUE;
552  }
553  if (genSourceFile)
554  {
555  return TRUE;
556  }
557  }
558 
559  for(const auto &subdd : dd->subDirs())
560  {
561  if (dirHasVisibleChildren(subdd))
562  {
563  return TRUE;
564  }
565  }
566  return FALSE;
567 }
568 
569 //----------------------------------------------------------------------------
570 static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp* ftv,bool addToIndex)
571 {
572  if (level>20)
573  {
574  warn(dd->getDefFileName(),dd->getDefLine(),
575  "maximum nesting level exceeded for directory %s: "
576  "check for possible recursive directory relation!\n",qPrint(dd->name())
577  );
578  return;
579  }
580 
581  if (!dirHasVisibleChildren(dd))
582  {
583  return;
584  }
585 
586  static bool tocExpand = TRUE; //Config_getBool(TOC_EXPAND);
587  bool isDir = !dd->subDirs().empty() || // there are subdirs
588  (tocExpand && // or toc expand and
589  !dd->getFiles().empty() // there are files
590  );
591  //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
592  if (addToIndex)
593  {
596  }
597  if (ftv)
598  {
599  ftv->addContentsItem(isDir,dd->shortName(),dd->getReference(),
600  dd->getOutputFileBase(),QCString(),FALSE,TRUE,dd);
601  ftv->incContentsDepth();
602  }
603 
604  ol.startIndexListItem();
606  ol.parseText(dd->shortName());
608  if (dd->isReference())
609  {
610  ol.startTypewriter();
611  ol.docify(" [external]");
612  ol.endTypewriter();
613  }
614 
615  // write sub directories
616  if (dd->subDirs().size()>0)
617  {
618  startIndexHierarchy(ol,level+1);
619  for(const auto &subdd : dd->subDirs())
620  {
621  writeDirTreeNode(ol,subdd,level+1,ftv,addToIndex);
622  }
623  endIndexHierarchy(ol,level+1);
624  }
625 
626  int fileCount=0;
627  if (!dd->getFiles().empty())
628  {
629  for (const auto &fd : dd->getFiles())
630  {
631  //static bool allExternals = Config_getBool(ALLEXTERNALS);
632  //if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
633  //{
634  // fileCount++;
635  //}
636  bool genSourceFile;
637  if (fileVisibleInIndex(fd,genSourceFile))
638  {
639  fileCount++;
640  }
641  else if (genSourceFile)
642  {
643  fileCount++;
644  }
645  }
646  if (fileCount>0)
647  {
648  startIndexHierarchy(ol,level+1);
649  for (const auto &fd : dd->getFiles())
650  {
651  bool doc,src;
652  doc = fileVisibleInIndex(fd,src);
653  QCString reference;
654  QCString outputBase;
655  if (doc)
656  {
657  reference = fd->getReference();
658  outputBase = fd->getOutputFileBase();
659  }
660  if (doc || src)
661  {
662  ol.startIndexListItem();
663  ol.startIndexItem(reference,outputBase);
664  ol.parseText(fd->displayName());
665  ol.endIndexItem(reference,outputBase);
666  ol.endIndexListItem();
667  if (ftv && (src || doc))
668  {
669  ftv->addContentsItem(FALSE,
670  fd->displayName(),
671  reference,outputBase,
672  QCString(),FALSE,FALSE,fd);
673  }
674  }
675  }
676  endIndexHierarchy(ol,level+1);
677  }
678  }
679 
680  if (tocExpand && addToIndex)
681  {
682  // write files of this directory
683  if (fileCount>0)
684  {
685  for (const auto &fd : dd->getFiles())
686  {
687  //static bool allExternals = Config_getBool(ALLEXTERNALS);
688  //if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
689  bool doc,src;
690  doc = fileVisibleInIndex(fd,src);
691  if (doc)
692  {
693  addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),
694  TRUE,FALSE,&fd->getConcepts());
695  }
696  else if (src)
697  {
699  FALSE, fd->name(), QCString(),
700  fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd);
701  }
702  }
703  }
704  }
705  ol.endIndexListItem();
706 
707  if (addToIndex)
708  {
710  }
711  if (ftv)
712  {
713  ftv->decContentsDepth();
714  }
715 }
716 
717 static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
718 {
719  if (ftv)
720  {
721  ol.pushGeneratorState();
723  }
724  bool fullPathNames = Config_getBool(FULL_PATH_NAMES);
725  startIndexHierarchy(ol,0);
726  if (fullPathNames)
727  {
728  for (const auto &dd : *Doxygen::dirLinkedMap)
729  {
730  if (dd->getOuterScope()==Doxygen::globalScope)
731  {
732  writeDirTreeNode(ol,dd.get(),0,ftv,addToIndex);
733  }
734  }
735  }
736  if (ftv)
737  {
738  for (const auto &fn : *Doxygen::inputNameLinkedMap)
739  {
740  for (const auto &fd : *fn)
741  {
742  if (!fullPathNames || fd->getDirDef()==0) // top level file
743  {
744  bool src;
745  bool doc = fileVisibleInIndex(fd.get(),src);
746  QCString reference, outputBase;
747  if (doc)
748  {
749  reference = fd->getReference();
750  outputBase = fd->getOutputFileBase();
751  }
752  if (doc || src)
753  {
754  ftv->addContentsItem(FALSE,fd->displayName(),
755  reference, outputBase, QCString(),
756  FALSE,FALSE,fd.get());
757  }
758  if (addToIndex)
759  {
760  if (doc)
761  {
762  addMembersToIndex(fd.get(),LayoutDocManager::File,fd->displayName(),QCString(),TRUE,FALSE,&fd->getConcepts());
763  }
764  else if (src)
765  {
767  FALSE, fd->name(), QCString(),
768  fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd.get());
769  }
770  }
771  }
772  }
773  }
774  }
775  endIndexHierarchy(ol,0);
776  if (ftv)
777  {
778  ol.popGeneratorState();
779  }
780 }
781 
782 
783 //----------------------------------------------------------------------------
784 
785 static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &started,FTVHelp* ftv,bool addToIndex,
786  ClassDef::CompoundType ct,ClassDefSet &visitedClasses)
787 {
788  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
789  for (const auto &cd : cl)
790  {
791  //printf("class %s hasVisibleRoot=%d isVisibleInHierarchy=%d\n",
792  // qPrint(cd->name()),
793  // hasVisibleRoot(cd->baseClasses()),
794  // cd->isVisibleInHierarchy()
795  // );
796  bool b;
797  if (cd->getLanguage()==SrcLangExt_VHDL)
798  {
799  if ((VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS)
800  {
801  continue;
802  }
803  b=!hasVisibleRoot(cd->subClasses());
804  }
805  else if (sliceOpt && cd->compoundType() != ct)
806  {
807  continue;
808  }
809  else
810  {
811  b=!hasVisibleRoot(cd->baseClasses());
812  }
813 
814  if (b) //filter on root classes
815  {
816  if (cd->isVisibleInHierarchy()) // should it be visible
817  {
818  if (!started)
819  {
820  startIndexHierarchy(ol,0);
821  if (addToIndex)
822  {
824  }
825  started=TRUE;
826  }
827  ol.startIndexListItem();
828  bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
829  classHasVisibleChildren(cd.get());
830  //printf("list: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
831  if (cd->isLinkable())
832  {
833  //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->templateMaster()=%p\n",
834  // qPrint(cd->displayName()),cd->isLinkable(),cd->isLinkableInProject(),cd->templateMaster());
835  ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
836  ol.parseText(cd->displayName());
837  ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
838  if (cd->isReference())
839  {
840  ol.startTypewriter();
841  ol.docify(" [external]");
842  ol.endTypewriter();
843  }
844  if (addToIndex)
845  {
846  if (cd->getLanguage()!=SrcLangExt_VHDL) // prevents double insertion in Design Unit List
847  Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE);
848  }
849  if (ftv)
850  {
851  ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd.get());
852  }
853  }
854  else
855  {
857  ol.parseText(cd->displayName());
859  if (addToIndex)
860  {
861  Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE);
862  }
863  if (ftv)
864  {
865  ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd.get());
866  }
867  }
868  if (cd->getLanguage()==SrcLangExt_VHDL && hasChildren)
869  {
870  writeClassTreeToOutput(ol,cd->baseClasses(),1,ftv,addToIndex,visitedClasses);
871  visitedClasses.insert(cd.get());
872  }
873  else if (hasChildren)
874  {
875  writeClassTreeToOutput(ol,cd->subClasses(),1,ftv,addToIndex,visitedClasses);
876  visitedClasses.insert(cd.get());
877  }
878  ol.endIndexListItem();
879  }
880  }
881  }
882 }
883 
884 static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex,ClassDef::CompoundType ct)
885 {
886  ClassDefSet visitedClasses;
887  if (ftv)
888  {
889  ol.pushGeneratorState();
891  }
892  bool started=FALSE;
893  writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
894  writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
895  if (started)
896  {
897  endIndexHierarchy(ol,0);
898  if (addToIndex)
899  {
901  }
902  }
903  if (ftv)
904  {
905  ol.popGeneratorState();
906  }
907 }
908 
909 //----------------------------------------------------------------------------
910 
912 {
913  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
914  int count=0;
915  for (const auto &cd : cl)
916  {
917  if (sliceOpt && cd->compoundType() != ct)
918  {
919  continue;
920  }
921  if (!hasVisibleRoot(cd->baseClasses())) // filter on root classes
922  {
923  if (cd->isVisibleInHierarchy()) // should it be visible
924  {
925  if (!cd->subClasses().empty()) // should have sub classes
926  {
927  count++;
928  }
929  }
930  }
931  }
932  return count;
933 }
934 
936 {
937  int count=0;
940  return count;
941 }
942 
943 //----------------------------------------------------------------------------
944 
946 {
947  if (hierarchyClasses==0) return;
948  ol.pushGeneratorState();
949  //1.{
952 
954  QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
955  bool addToIndex = lne==0 || lne->visible();
956 
957  startFile(ol,"hierarchy",QCString(), title, HLI_ClassHierarchy);
958  startTitle(ol,QCString());
959  ol.parseText(title);
960  endTitle(ol,QCString(),QCString());
961  ol.startContents();
962  ol.startTextBlock();
963 
964  if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
965  {
966  ol.pushGeneratorState();
970  ol.startParagraph();
971  ol.startTextLink("inherits",QCString());
973  ol.endTextLink();
974  ol.endParagraph();
975  ol.popGeneratorState();
976  }
978  ol.endTextBlock();
979 
980  // ---------------
981  // Static class hierarchy for Latex/RTF
982  // ---------------
983  ol.pushGeneratorState();
984  //2.{
987 
988  writeClassHierarchy(ol,0,addToIndex,ClassDef::Class);
989 
991  ol.popGeneratorState();
992  //2.}
993 
994  // ---------------
995  // Dynamic class hierarchical index for HTML
996  // ---------------
997  ol.pushGeneratorState();
998  //2.{
1000 
1001  {
1002  if (addToIndex)
1003  {
1005  }
1006  FTVHelp* ftv = new FTVHelp(FALSE);
1007  writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Class);
1008  TextStream t;
1009  ftv->generateTreeViewInline(t);
1010  ol.pushGeneratorState();
1012  ol.writeString(t.str().c_str());
1013  ol.popGeneratorState();
1014  delete ftv;
1015  }
1016  ol.popGeneratorState();
1017  //2.}
1018  // ------
1019 
1020  endFile(ol);
1021  ol.popGeneratorState();
1022  //1.}
1023 }
1024 
1025 //----------------------------------------------------------------------------
1026 
1028 {
1029  if (hierarchyClasses==0) return;
1032  QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1033  startFile(ol,"inherits",QCString(),title,HLI_ClassHierarchy,FALSE,"hierarchy");
1034  startTitle(ol,QCString());
1035  ol.parseText(title);
1036  endTitle(ol,QCString(),QCString());
1037  ol.startContents();
1038  ol.startTextBlock();
1039  ol.startParagraph();
1040  ol.startTextLink("hierarchy",QCString());
1042  ol.endTextLink();
1043  ol.endParagraph();
1044  ol.endTextBlock();
1047  endFile(ol);
1048  ol.enableAll();
1049 }
1050 
1051 //----------------------------------------------------------------------------
1052 
1054 {
1055  if (hierarchyInterfaces==0) return;
1056  ol.pushGeneratorState();
1057  //1.{
1059 
1061  QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1062  bool addToIndex = lne==0 || lne->visible();
1063 
1064  startFile(ol,"interfacehierarchy",QCString(), title, HLI_InterfaceHierarchy);
1065  startTitle(ol,QCString());
1066  ol.parseText(title);
1067  endTitle(ol,QCString(),QCString());
1068  ol.startContents();
1069  ol.startTextBlock();
1070 
1071  if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1072  {
1075  ol.startParagraph();
1076  ol.startTextLink("interfaceinherits",QCString());
1078  ol.endTextLink();
1079  ol.endParagraph();
1082  }
1084  ol.endTextBlock();
1085 
1086  // ---------------
1087  // Static interface hierarchy for Latex/RTF
1088  // ---------------
1089  ol.pushGeneratorState();
1090  //2.{
1093 
1094  writeClassHierarchy(ol,0,addToIndex,ClassDef::Interface);
1095 
1097  ol.popGeneratorState();
1098  //2.}
1099 
1100  // ---------------
1101  // Dynamic interface hierarchical index for HTML
1102  // ---------------
1103  ol.pushGeneratorState();
1104  //2.{
1106 
1107  {
1108  if (addToIndex)
1109  {
1110  Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"interfacehierarchy",QCString(),TRUE,TRUE);
1111  }
1112  FTVHelp* ftv = new FTVHelp(FALSE);
1113  writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Interface);
1114  TextStream t;
1115  ftv->generateTreeViewInline(t);
1116  ol.pushGeneratorState();
1118  ol.writeString(t.str().c_str());
1119  ol.popGeneratorState();
1120  delete ftv;
1121  }
1122  ol.popGeneratorState();
1123  //2.}
1124  // ------
1125 
1126  endFile(ol);
1127  ol.popGeneratorState();
1128  //1.}
1129 }
1130 
1131 //----------------------------------------------------------------------------
1132 
1134 {
1135  if (hierarchyInterfaces==0) return;
1138  QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1139  startFile(ol,"interfaceinherits",QCString(),title,HLI_InterfaceHierarchy,FALSE,"interfacehierarchy");
1140  startTitle(ol,QCString());
1141  ol.parseText(title);
1142  endTitle(ol,QCString(),QCString());
1143  ol.startContents();
1144  ol.startTextBlock();
1145  ol.startParagraph();
1146  ol.startTextLink("interfacehierarchy",QCString());
1148  ol.endTextLink();
1149  ol.endParagraph();
1150  ol.endTextBlock();
1151  DotGfxHierarchyTable g("interface_",ClassDef::Interface);
1153  endFile(ol);
1154  ol.enableAll();
1155 }
1156 
1157 //----------------------------------------------------------------------------
1158 
1160 {
1161  if (hierarchyExceptions==0) return;
1162  ol.pushGeneratorState();
1163  //1.{
1165 
1167  QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1168  bool addToIndex = lne==0 || lne->visible();
1169 
1170  startFile(ol,"exceptionhierarchy",QCString(), title, HLI_ExceptionHierarchy);
1171  startTitle(ol,QCString());
1172  ol.parseText(title);
1173  endTitle(ol,QCString(),QCString());
1174  ol.startContents();
1175  ol.startTextBlock();
1176 
1177  if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1178  {
1181  ol.startParagraph();
1182  ol.startTextLink("exceptioninherits",QCString());
1184  ol.endTextLink();
1185  ol.endParagraph();
1188  }
1190  ol.endTextBlock();
1191 
1192  // ---------------
1193  // Static exception hierarchy for Latex/RTF
1194  // ---------------
1195  ol.pushGeneratorState();
1196  //2.{
1199 
1200  writeClassHierarchy(ol,0,addToIndex,ClassDef::Exception);
1201 
1203  ol.popGeneratorState();
1204  //2.}
1205 
1206  // ---------------
1207  // Dynamic exception hierarchical index for HTML
1208  // ---------------
1209  ol.pushGeneratorState();
1210  //2.{
1212 
1213  {
1214  if (addToIndex)
1215  {
1216  Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"exceptionhierarchy",QCString(),TRUE,TRUE);
1217  }
1218  FTVHelp* ftv = new FTVHelp(FALSE);
1219  writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Exception);
1220  TextStream t;
1221  ftv->generateTreeViewInline(t);
1222  ol.pushGeneratorState();
1224  ol.writeString(t.str().c_str());
1225  ol.popGeneratorState();
1226  delete ftv;
1227  }
1228  ol.popGeneratorState();
1229  //2.}
1230  // ------
1231 
1232  endFile(ol);
1233  ol.popGeneratorState();
1234  //1.}
1235 }
1236 
1237 //----------------------------------------------------------------------------
1238 
1240 {
1241  if (hierarchyExceptions==0) return;
1244  QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1245  startFile(ol,"exceptioninherits",QCString(),title,HLI_ExceptionHierarchy,FALSE,"exceptionhierarchy");
1246  startTitle(ol,QCString());
1247  ol.parseText(title);
1248  endTitle(ol,QCString(),QCString());
1249  ol.startContents();
1250  ol.startTextBlock();
1251  ol.startParagraph();
1252  ol.startTextLink("exceptionhierarchy",QCString());
1254  ol.endTextLink();
1255  ol.endParagraph();
1256  ol.endTextBlock();
1257  DotGfxHierarchyTable g("exception_",ClassDef::Exception);
1259  endFile(ol);
1260  ol.enableAll();
1261 }
1262 
1263 //----------------------------------------------------------------------------
1264 
1265 static void countFiles(int &allFiles,int &docFiles)
1266 {
1267  allFiles=0;
1268  docFiles=0;
1269  if (Config_getBool(SHOW_FILES))
1270  {
1271  for (const auto &fn : *Doxygen::inputNameLinkedMap)
1272  {
1273  for (const auto &fd: *fn)
1274  {
1275  bool doc,src;
1276  doc = fileVisibleInIndex(fd.get(),src);
1277  if (doc || src)
1278  {
1279  allFiles++;
1280  }
1281  if (doc)
1282  {
1283  docFiles++;
1284  }
1285  }
1286  }
1287  }
1288 }
1289 
1290 static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
1291 {
1292  //printf("Found filedef %s\n",qPrint(fd->name()));
1293  bool doc = fd->isLinkableInProject();
1294  bool src = fd->generateSourceFile();
1295  bool nameOk = !fd->isDocumentationFile();
1296  if (nameOk && (doc || src) && !fd->isReference())
1297  {
1298  QCString path;
1299  if (Config_getBool(FULL_PATH_NAMES))
1300  {
1301  path=stripFromPath(fd->getPath());
1302  }
1303  QCString fullName=fd->name();
1304  if (!path.isEmpty())
1305  {
1306  if (path.at(path.length()-1)!='/') fullName.prepend("/");
1307  fullName.prepend(path);
1308  }
1309 
1310  ol.startIndexKey();
1311  ol.docify(path);
1312  if (doc)
1313  {
1315  //if (addToIndex)
1316  //{
1317  // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1318  //}
1319  }
1320  else if (src)
1321  {
1323  }
1324  if (doc && src)
1325  {
1326  ol.pushGeneratorState();
1328  ol.docify(" ");
1329  ol.startTextLink(fd->includeName(),QCString());
1330  ol.docify("[");
1332  ol.docify("]");
1333  ol.endTextLink();
1334  ol.popGeneratorState();
1335  }
1336  ol.endIndexKey();
1337  bool hasBrief = !fd->briefDescription().isEmpty();
1338  ol.startIndexValue(hasBrief);
1339  if (hasBrief)
1340  {
1341  //ol.docify(" (");
1342  ol.generateDoc(
1343  fd->briefFile(),fd->briefLine(),
1344  fd,0,
1345  fd->briefDescription(TRUE),
1346  FALSE, // index words
1347  FALSE, // isExample
1348  QCString(), // example name
1349  TRUE, // single line
1350  TRUE, // link from index
1351  Config_getBool(MARKDOWN_SUPPORT)
1352  );
1353  //ol.docify(")");
1354  }
1355  if (doc)
1356  {
1357  ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1358  }
1359  else // src
1360  {
1361  ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1362  }
1363  //ol.popGeneratorState();
1364  // --------------------------------------------------------
1365  }
1366 }
1367 
1368 //----------------------------------------------------------------------------
1369 
1370 static void writeFileIndex(OutputList &ol)
1371 {
1372  if (documentedFiles==0) return;
1373 
1374  ol.pushGeneratorState();
1377 
1379  if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files); // fall back
1380  QCString title = lne ? lne->title() : theTranslator->trFileList();
1381  bool addToIndex = lne==0 || lne->visible();
1382 
1383  startFile(ol,"files",QCString(),title,HLI_Files);
1384  startTitle(ol,QCString());
1385  //if (!Config_getString(PROJECT_NAME).isEmpty())
1386  //{
1387  // title.prepend(Config_getString(PROJECT_NAME)+" ");
1388  //}
1389  ol.parseText(title);
1390  endTitle(ol,QCString(),QCString());
1391  ol.startContents();
1392  ol.startTextBlock();
1393 
1394  if (addToIndex)
1395  {
1398  }
1399 
1400  ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool(EXTRACT_ALL)));
1401  ol.endTextBlock();
1402 
1403  // ---------------
1404  // Flat file index
1405  // ---------------
1406 
1407  // 1. {
1408  ol.pushGeneratorState();
1410 
1411  ol.startIndexList();
1412  if (Config_getBool(FULL_PATH_NAMES))
1413  {
1414  std::unordered_map<std::string,size_t> pathMap;
1415  std::vector<FilesInDir> outputFiles;
1416 
1417  // re-sort input files in (dir,file) output order instead of (file,dir) input order
1418  for (const auto &fn : *Doxygen::inputNameLinkedMap)
1419  {
1420  for (const auto &fd : *fn)
1421  {
1422  QCString path=fd->getPath();
1423  if (path.isEmpty()) path="[external]";
1424  auto it = pathMap.find(path.str());
1425  if (it!=pathMap.end()) // existing path -> append
1426  {
1427  outputFiles.at(it->second).files.push_back(fd.get());
1428  }
1429  else // new path -> create path entry + append
1430  {
1431  pathMap.insert(std::make_pair(path.str(),outputFiles.size()));
1432  outputFiles.emplace_back(path);
1433  outputFiles.back().files.push_back(fd.get());
1434  }
1435  }
1436  }
1437 
1438  // sort the files by path
1439  std::sort(outputFiles.begin(),
1440  outputFiles.end(),
1441  [](const auto &fp1,const auto &fp2) { return qstricmp(fp1.path,fp2.path)<0; });
1442  // sort the files inside the directory by name
1443  for (auto &fp : outputFiles)
1444  {
1445  std::sort(fp.files.begin(), fp.files.end(), compareFileDefs);
1446  }
1447  // write the results
1448  for (const auto &fp : outputFiles)
1449  {
1450  for (const auto &fd : fp.files)
1451  {
1452  writeSingleFileIndex(ol,fd);
1453  }
1454  }
1455  }
1456  else
1457  {
1458  for (const auto &fn : *Doxygen::inputNameLinkedMap)
1459  {
1460  for (const auto &fd : *fn)
1461  {
1462  writeSingleFileIndex(ol,fd.get());
1463  }
1464  }
1465  }
1466  ol.endIndexList();
1467 
1468  // 1. }
1469  ol.popGeneratorState();
1470 
1471  // ---------------
1472  // Hierarchical file index for HTML
1473  // ---------------
1474  ol.pushGeneratorState();
1476 
1477  FTVHelp* ftv = new FTVHelp(FALSE);
1478  writeDirHierarchy(ol,ftv,addToIndex);
1479  TextStream t;
1480  ftv->generateTreeViewInline(t);
1481  ol.writeString(t.str().c_str());
1482  delete ftv;
1483 
1484  ol.popGeneratorState();
1485  // ------
1486 
1487  if (addToIndex)
1488  {
1490  }
1491 
1492  endFile(ol);
1493  ol.popGeneratorState();
1494 }
1495 
1496 //----------------------------------------------------------------------------
1497 static int countNamespaces()
1498 {
1499  int count=0;
1500  for (const auto &nd : *Doxygen::namespaceLinkedMap)
1501  {
1502  if (nd->isLinkableInProject()) count++;
1503  }
1504  return count;
1505 }
1506 
1507 //----------------------------------------------------------------------------
1508 static int countConcepts()
1509 {
1510  int count=0;
1511  for (const auto &cd : *Doxygen::conceptLinkedMap)
1512  {
1513  if (cd->isLinkableInProject()) count++;
1514  }
1515  return count;
1516 }
1517 
1518 
1519 //----------------------------------------------------------------------------
1520 template<typename Ptr> const ClassDef *get_pointer(const Ptr &p);
1521 template<> const ClassDef *get_pointer(const ClassLinkedMap::Ptr &p) { return p.get(); }
1522 template<> const ClassDef *get_pointer(const ClassLinkedRefMap::Ptr &p) { return p; }
1523 
1524 template<class ListType>
1525 static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool globalOnly,ClassDef::CompoundType ct)
1526 {
1527  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1528  for (const auto &cdi : cl)
1529  {
1530  const ClassDef *cd = get_pointer(cdi);
1532  if (cdm && cd->getLanguage()==SrcLangExt_VHDL)
1533  {
1536  )// no architecture
1537  {
1538  continue;
1539  }
1541  {
1542  QCString n=cd->name();
1543  cdm->setClassName(n);
1544  }
1545  }
1546 
1547  if (sliceOpt && cd->compoundType() != ct)
1548  {
1549  continue;
1550  }
1551 
1552  if (!globalOnly ||
1553  cd->getOuterScope()==0 ||
1555  )
1556  {
1557  int count=0;
1558  for (const auto &ccd : cd->getClasses())
1559  {
1560  if (ccd->isLinkableInProject() && ccd->templateMaster()==0)
1561  {
1562  count++;
1563  }
1564  }
1565  if (classVisibleInIndex(cd) && cd->templateMaster()==0)
1566  {
1567  ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
1568  cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
1569  if (addToIndex &&
1570  (cd->getOuterScope()==0 ||
1572  )
1573  )
1574  {
1576  cd->displayName(FALSE),
1577  cd->anchor(),
1578  cd->partOfGroups().empty() && !cd->isSimple());
1579  }
1580  if (count>0)
1581  {
1582  ftv->incContentsDepth();
1583  writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1584  ftv->decContentsDepth();
1585  }
1586  }
1587  }
1588  }
1589 }
1590 
1592 {
1593  int count=0;
1594  for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1595  {
1596  if (lde->kind()==LayoutDocEntry::MemberDef)
1597  {
1598  const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
1599  MemberList *ml = nd->getMemberList(lmd->type);
1600  if (ml)
1601  {
1602  for (const auto &md : *ml)
1603  {
1604  if (md->visibleInIndex())
1605  {
1606  count++;
1607  }
1608  }
1609  }
1610  }
1611  }
1612  return count;
1613 }
1614 
1615 static void writeNamespaceMembers(const NamespaceDef *nd,bool addToIndex)
1616 {
1617  for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1618  {
1619  if (lde->kind()==LayoutDocEntry::MemberDef)
1620  {
1621  const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
1622  MemberList *ml = nd->getMemberList(lmd->type);
1623  if (ml)
1624  {
1625  for (const auto &md : *ml)
1626  {
1627  //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1628  if (md->visibleInIndex())
1629  {
1630  writeMemberToIndex(nd,md,addToIndex);
1631  }
1632  }
1633  }
1634  }
1635  }
1636 }
1637 
1638 static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex);
1639 static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1640  bool rootOnly,bool addToIndex);
1641 
1643  bool rootOnly,bool addToIndex)
1644 {
1645  if (!nd->isAnonymous() &&
1646  (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1647  {
1648 
1649  bool hasChildren = namespaceHasNestedNamespace(nd) ||
1652  bool isLinkable = nd->isLinkableInProject();
1653  int visibleMembers = countVisibleMembers(nd);
1654 
1655  //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
1656 
1657  QCString ref;
1658  QCString file;
1659  if (isLinkable)
1660  {
1661  ref = nd->getReference();
1662  file = nd->getOutputFileBase();
1663  if (nd->getLanguage()==SrcLangExt_VHDL) // UGLY HACK
1664  {
1665  file=file.replace(0,qstrlen("namespace"),"class");
1666  }
1667  }
1668 
1669  bool isDir = hasChildren || visibleMembers>0;
1670  if ((isLinkable) || isDir)
1671  {
1672  ftv->addContentsItem(hasChildren,nd->localName(),ref,file,QCString(),FALSE,nd->partOfGroups().empty(),nd);
1673 
1674  if (addToIndex)
1675  {
1676  Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1677  hasChildren && !file.isEmpty(),nd->partOfGroups().empty());
1678  }
1679  if (addToIndex && isDir)
1680  {
1682  }
1683 
1684  if (isDir)
1685  {
1686  ftv->incContentsDepth();
1687  writeNamespaceTree(nd->getNamespaces(),ftv,FALSE,addToIndex);
1688  writeClassTree(nd->getClasses(),ftv,addToIndex,FALSE,ClassDef::Class);
1689  writeConceptList(nd->getConcepts(),ftv,addToIndex);
1690  writeNamespaceMembers(nd,addToIndex);
1691  ftv->decContentsDepth();
1692  }
1693  if (addToIndex && isDir)
1694  {
1696  }
1697  }
1698  }
1699 }
1700 
1701 static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1702  bool rootOnly,bool addToIndex)
1703 {
1704  for (const auto &nd : nsLinkedMap)
1705  {
1706  writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1707  }
1708 }
1709 
1710 static void writeNamespaceTree(const NamespaceLinkedMap &nsLinkedMap,FTVHelp *ftv,
1711  bool rootOnly,bool addToIndex)
1712 {
1713  for (const auto &nd : nsLinkedMap)
1714  {
1715  writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1716  }
1717 }
1718 
1719 static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1720  bool rootOnly,bool addToIndex,ClassDef::CompoundType ct);
1721 
1723  bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1724 {
1725  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1726  if (!nd->isAnonymous() &&
1727  (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1728  {
1729  bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
1730  bool isLinkable = nd->isLinkableInProject();
1731 
1732  //printf("namespace %s isDir=%d\n",qPrint(nd->name()),isDir);
1733 
1734  QCString ref;
1735  QCString file;
1736  if (isLinkable)
1737  {
1738  ref = nd->getReference();
1739  file = nd->getOutputFileBase();
1740  if (nd->getLanguage()==SrcLangExt_VHDL) // UGLY HACK
1741  {
1742  file=file.replace(0,qstrlen("namespace"),"class");
1743  }
1744  }
1745 
1746  if (isDir)
1747  {
1748  ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
1749 
1750  if (addToIndex)
1751  {
1752  // the namespace entry is already shown under the namespace list so don't
1753  // add it to the nav index and don't create a separate index file for it otherwise
1754  // it will overwrite the one written for the namespace list.
1755  Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1756  false, // separateIndex
1757  false // addToNavIndex
1758  );
1759  }
1760  if (addToIndex)
1761  {
1763  }
1764 
1765  ftv->incContentsDepth();
1766  writeClassTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex,ct);
1767  ClassLinkedRefMap d = nd->getClasses();
1768  if (sliceOpt)
1769  {
1770  if (ct == ClassDef::Interface)
1771  {
1772  d = nd->getInterfaces();
1773  }
1774  else if (ct == ClassDef::Struct)
1775  {
1776  d = nd->getStructs();
1777  }
1778  else if (ct == ClassDef::Exception)
1779  {
1780  d = nd->getExceptions();
1781  }
1782  }
1783  writeClassTree(d,ftv,addToIndex,FALSE,ct);
1784  ftv->decContentsDepth();
1785 
1786  if (addToIndex)
1787  {
1789  }
1790  }
1791  }
1792 }
1793 
1795  bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1796 {
1797  for (const auto &nd : nsLinkedMap)
1798  {
1799  writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
1800  }
1801 }
1802 
1803 static void writeClassTreeInsideNamespace(const NamespaceLinkedMap &nsLinkedMap,FTVHelp *ftv,
1804  bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1805 {
1806  for (const auto &nd : nsLinkedMap)
1807  {
1808  writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
1809  }
1810 }
1811 
1813 {
1814  if (documentedNamespaces==0) return;
1815  ol.pushGeneratorState();
1819  if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
1820  QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
1821  bool addToIndex = lne==0 || lne->visible();
1822  startFile(ol,"namespaces",QCString(),title,HLI_Namespaces);
1823  startTitle(ol,QCString());
1824  ol.parseText(title);
1825  endTitle(ol,QCString(),QCString());
1826  ol.startContents();
1827  ol.startTextBlock();
1828  ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
1829  ol.endTextBlock();
1830 
1831  bool first=TRUE;
1832 
1833  // ---------------
1834  // Linear namespace index for Latex/RTF
1835  // ---------------
1836  ol.pushGeneratorState();
1838 
1839  for (const auto &nd : *Doxygen::namespaceLinkedMap)
1840  {
1841  if (nd->isLinkableInProject())
1842  {
1843  if (first)
1844  {
1845  ol.startIndexList();
1846  first=FALSE;
1847  }
1848  //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
1849  ol.startIndexKey();
1850  if (nd->getLanguage()==SrcLangExt_VHDL)
1851  {
1852  ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
1853  }
1854  else
1855  {
1856  ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
1857  }
1858  ol.endIndexKey();
1859 
1860  bool hasBrief = !nd->briefDescription().isEmpty();
1861  ol.startIndexValue(hasBrief);
1862  if (hasBrief)
1863  {
1864  //ol.docify(" (");
1865  ol.generateDoc(
1866  nd->briefFile(),nd->briefLine(),
1867  nd.get(),0,
1868  nd->briefDescription(TRUE),
1869  FALSE, // index words
1870  FALSE, // isExample
1871  QCString(), // example name
1872  TRUE, // single line
1873  TRUE, // link from index
1874  Config_getBool(MARKDOWN_SUPPORT)
1875  );
1876  //ol.docify(")");
1877  }
1878  ol.endIndexValue(nd->getOutputFileBase(),hasBrief);
1879 
1880  }
1881  }
1882  if (!first) ol.endIndexList();
1883 
1884  ol.popGeneratorState();
1885 
1886  // ---------------
1887  // Hierarchical namespace index for HTML
1888  // ---------------
1889  ol.pushGeneratorState();
1891 
1892  {
1893  if (addToIndex)
1894  {
1897  }
1898  FTVHelp* ftv = new FTVHelp(FALSE);
1900  TextStream t;
1901  ftv->generateTreeViewInline(t);
1902  ol.writeString(t.str().c_str());
1903  delete ftv;
1904  if (addToIndex)
1905  {
1907  }
1908  }
1909 
1910  ol.popGeneratorState();
1911  // ------
1912 
1913  endFile(ol);
1914  ol.popGeneratorState();
1915 }
1916 
1917 //----------------------------------------------------------------------------
1918 
1920 {
1921  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1922  int count=0;
1923  int countPrinted=0;
1924  for (const auto &cd : *Doxygen::classLinkedMap)
1925  {
1926  if (sliceOpt && cd->compoundType() != ct)
1927  {
1928  continue;
1929  }
1930  if (cd->isLinkableInProject() && cd->templateMaster()==0)
1931  {
1932  if (!cd->isEmbeddedInOuterScope())
1933  {
1934  countPrinted++;
1935  }
1936  count++;
1937  }
1938  }
1939  *cp = countPrinted;
1940  return count;
1941 }
1942 
1943 
1945 {
1946  //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
1947  //bool addToIndex = lne==0 || lne->visible();
1948  bool first=TRUE;
1949 
1950  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1951 
1952  for (const auto &cd : *Doxygen::classLinkedMap)
1953  {
1954  if (cd->getLanguage()==SrcLangExt_VHDL &&
1955  ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKAGECLASS ||
1957  ) // no architecture
1958  {
1959  continue;
1960  }
1961  if (first)
1962  {
1963  ol.startIndexList();
1964  first=FALSE;
1965  }
1966 
1967  if (sliceOpt && cd->compoundType() != ct)
1968  {
1969  continue;
1970  }
1971 
1972  ol.pushGeneratorState();
1973  if (cd->isEmbeddedInOuterScope())
1974  {
1978  }
1979  if (cd->isLinkableInProject() && cd->templateMaster()==0)
1980  {
1981  ol.startIndexKey();
1982  if (cd->getLanguage()==SrcLangExt_VHDL)
1983  {
1985  ol.docify(prot);
1986  ol.writeString(" ");
1987  }
1988  ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
1989  ol.endIndexKey();
1990  bool hasBrief = !cd->briefDescription().isEmpty();
1991  ol.startIndexValue(hasBrief);
1992  if (hasBrief)
1993  {
1994  ol.generateDoc(
1995  cd->briefFile(),cd->briefLine(),
1996  cd.get(),0,
1997  cd->briefDescription(TRUE),
1998  FALSE, // indexWords
1999  FALSE, // isExample
2000  QCString(), // example name
2001  TRUE, // single line
2002  TRUE, // link from index
2003  Config_getBool(MARKDOWN_SUPPORT)
2004  );
2005  }
2006  ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2007 
2008  //if (addToIndex)
2009  //{
2010  // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2011  //}
2012  }
2013  ol.popGeneratorState();
2014  }
2015  if (!first) ol.endIndexList();
2016 }
2017 
2018 inline bool isId1(int c)
2019 {
2020  return (c<127 && c>31); // printable ASCII character
2021 }
2022 
2023 static QCString letterToLabel(const QCString &startLetter)
2024 {
2025  if (startLetter.isEmpty()) return startLetter;
2026  const char *p = startLetter.data();
2027  char c = *p;
2028  QCString result;
2029  if (isId1(c))
2030  {
2031  result+=c;
2032  }
2033  else
2034  {
2035  result="0x";
2036  const char hex[]="0123456789abcdef";
2037  while ((c=*p++))
2038  {
2039  result+=hex[((unsigned char)c)>>4];
2040  result+=hex[((unsigned char)c)&0xf];
2041  }
2042  }
2043  return result;
2044 }
2045 
2046 //----------------------------------------------------------------------------
2047 
2048 /** Class representing a cell in the alphabetical class index. */
2050 {
2051  public:
2052  AlphaIndexTableCell(int row,int col,const std::string &letter,const ClassDef *cd) :
2053  m_letter(letter), m_class(cd), m_row(row), m_col(col)
2054  {
2055  }
2056 
2057  const ClassDef *classDef() const { return m_class; }
2058  std::string letter() const { return m_letter; }
2059  int row() const { return m_row; }
2060  int column() const { return m_col; }
2061 
2062  private:
2063  std::string m_letter;
2065  int m_row;
2066  int m_col;
2067 };
2068 
2069 using UsedIndexLetters = std::set<std::string>;
2070 
2071 // write an alphabetical index of all class with a header for each letter
2072 static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int annotatedCount)
2073 {
2074  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2075 
2076  // What starting letters are used
2077  UsedIndexLetters indexLettersUsed;
2078 
2079  // first count the number of headers
2080  for (const auto &cd : *Doxygen::classLinkedMap)
2081  {
2082  if (sliceOpt && cd->compoundType() != ct)
2083  continue;
2084  if (cd->isLinkableInProject() && cd->templateMaster()==0)
2085  {
2086  if (cd->getLanguage()==SrcLangExt_VHDL && !((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS ))// no architecture
2087  continue;
2088 
2089  // get the first UTF8 character (after the part that should be ignored)
2090  int index = getPrefixIndex(cd->className());
2091  std::string letter = getUTF8CharAt(cd->className().str(),index);
2092  if (!letter.empty())
2093  {
2094  indexLettersUsed.insert(convertUTF8ToUpper(letter));
2095  }
2096  }
2097  }
2098 
2099  // write quick link index (row of letters)
2100  QCString alphaLinks = "<div class=\"qindex\">";
2101  bool first=true;
2102  for (const auto &letter : indexLettersUsed)
2103  {
2104  if (!first) alphaLinks += "&#160;|&#160;";
2105  first=false;
2106  QCString li = letterToLabel(letter.c_str());
2107  alphaLinks += "<a class=\"qindex\" href=\"#letter_" +
2108  li + "\">" +
2109  QCString(letter) + "</a>";
2110  }
2111  alphaLinks += "</div>\n";
2112  ol.writeString(alphaLinks);
2113 
2114  std::map<std::string, std::vector<const ClassDef*> > classesByLetter;
2115 
2116  // fill the columns with the class list (row elements in each column,
2117  // expect for the columns with number >= itemsInLastRow, which get one
2118  // item less.
2119  for (const auto &cd : *Doxygen::classLinkedMap)
2120  {
2121  if (sliceOpt && cd->compoundType() != ct)
2122  continue;
2123  if (cd->getLanguage()==SrcLangExt_VHDL && !((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS ))// no architecture
2124  continue;
2125 
2126  if (cd->isLinkableInProject() && cd->templateMaster()==0)
2127  {
2128  QCString className = cd->className();
2129  int index = getPrefixIndex(className);
2130  std::string letter = getUTF8CharAt(className.str(),index);
2131  if (!letter.empty())
2132  {
2133  letter = convertUTF8ToUpper(letter);
2134  auto it = classesByLetter.find(letter);
2135  if (it!=classesByLetter.end()) // add class to the existing list
2136  {
2137  it->second.push_back(cd.get());
2138  }
2139  else // new entry
2140  {
2141  classesByLetter.insert(
2142  std::make_pair(letter, std::vector<const ClassDef*>({ cd.get() })));
2143  }
2144  }
2145  }
2146  }
2147 
2148  // sort the class lists per letter while ignoring the prefix
2149  for (auto &kv : classesByLetter)
2150  {
2151  std::sort(kv.second.begin(), kv.second.end(),
2152  [](const auto &c1,const auto &c2)
2153  {
2154  QCString n1 = c1->className();
2155  QCString n2 = c2->className();
2156  return qstricmp(n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2))<0;
2157  });
2158  }
2159 
2160  // generate table
2161  if (!classesByLetter.empty())
2162  {
2163  ol.writeString("<div class=\"classindex\">\n");
2164  int counter=0;
2165  for (const auto &cl : classesByLetter)
2166  {
2167  QCString parity = (counter++%2)==0 ? "even" : "odd";
2168  ol.writeString("<dl class=\"classindex " + parity + "\">\n");
2169 
2170  // write character heading
2171  ol.writeString("<dt class=\"alphachar\">");
2172  QCString s = letterToLabel(cl.first.c_str());
2173  ol.writeString("<a id=\"letter_");
2174  ol.writeString(s);
2175  ol.writeString("\" name=\"letter_");
2176  ol.writeString(s);
2177  ol.writeString("\">");
2178  ol.writeString(cl.first.c_str());
2179  ol.writeString("</a>");
2180  ol.writeString("</dt>\n");
2181 
2182  // write class links
2183  for (const auto &cd : cl.second)
2184  {
2185  ol.writeString("<dd>");
2186  QCString namesp,cname;
2187  extractNamespaceName(cd->name(),cname,namesp);
2188  QCString nsDispName;
2189  SrcLangExt lang = cd->getLanguage();
2191  if (sep!="::")
2192  {
2193  nsDispName=substitute(namesp,"::",sep);
2194  cname=substitute(cname,"::",sep);
2195  }
2196  else
2197  {
2198  nsDispName=namesp;
2199  }
2200 
2201  ol.writeObjectLink(cd->getReference(),
2202  cd->getOutputFileBase(),cd->anchor(),cname);
2203  if (!namesp.isEmpty())
2204  {
2205  ol.writeString(" (");
2206  NamespaceDef *nd = getResolvedNamespace(namesp);
2207  if (nd && nd->isLinkable())
2208  {
2209  ol.writeObjectLink(nd->getReference(),
2210  nd->getOutputFileBase(),QCString(),nsDispName);
2211  }
2212  else
2213  {
2214  ol.docify(nsDispName);
2215  }
2216  ol.writeString(")");
2217  }
2218  ol.writeString("</dd>");
2219  }
2220 
2221  ol.writeString("</dl>\n");
2222  }
2223  ol.writeString("</div>\n");
2224  }
2225 }
2226 
2227 //----------------------------------------------------------------------------
2228 
2230 {
2231  if (annotatedClasses==0) return;
2232  ol.pushGeneratorState();
2235  QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
2236  bool addToIndex = lne==0 || lne->visible();
2237 
2238  startFile(ol,"classes",QCString(),title,HLI_Classes);
2239 
2240  startTitle(ol,QCString());
2241  ol.parseText(title);
2242  endTitle(ol,QCString(),QCString());
2243 
2244  if (addToIndex)
2245  {
2247  }
2248 
2249  ol.startContents();
2251  endFile(ol); // contains ol.endContents()
2252 
2253  ol.popGeneratorState();
2254 }
2255 
2256 //----------------------------------------------------------------------------
2257 
2259 {
2260  if (annotatedInterfaces==0) return;
2261  ol.pushGeneratorState();
2264  QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2265  bool addToIndex = lne==0 || lne->visible();
2266 
2267  startFile(ol,"interfaces",QCString(),title,HLI_Interfaces);
2268 
2269  startTitle(ol,QCString());
2270  ol.parseText(title);
2271  endTitle(ol,QCString(),QCString());
2272 
2273  if (addToIndex)
2274  {
2276  }
2277 
2278  ol.startContents();
2280  endFile(ol); // contains ol.endContents()
2281 
2282  ol.popGeneratorState();
2283 }
2284 
2285 //----------------------------------------------------------------------------
2286 
2288 {
2289  if (annotatedStructs==0) return;
2290  ol.pushGeneratorState();
2293  QCString title = lne ? lne->title() : theTranslator->trStructIndex();
2294  bool addToIndex = lne==0 || lne->visible();
2295 
2296  startFile(ol,"structs",QCString(),title,HLI_Structs);
2297 
2298  startTitle(ol,QCString());
2299  ol.parseText(title);
2300  endTitle(ol,QCString(),QCString());
2301 
2302  if (addToIndex)
2303  {
2305  }
2306 
2307  ol.startContents();
2309  endFile(ol); // contains ol.endContents()
2310 
2311  ol.popGeneratorState();
2312 }
2313 
2314 //----------------------------------------------------------------------------
2315 
2317 {
2318  if (annotatedExceptions==0) return;
2319  ol.pushGeneratorState();
2322  QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2323  bool addToIndex = lne==0 || lne->visible();
2324 
2325  startFile(ol,"exceptions",QCString(),title,HLI_Exceptions);
2326 
2327  startTitle(ol,QCString());
2328  ol.parseText(title);
2329  endTitle(ol,QCString(),QCString());
2330 
2331  if (addToIndex)
2332  {
2334  }
2335 
2336  ol.startContents();
2338  endFile(ol); // contains ol.endContents()
2339 
2340  ol.popGeneratorState();
2341 }
2342 
2343 //----------------------------------------------------------------------------
2344 
2346 {
2347  AnnotatedIndexContext(int numAnno,int numPrint,
2349  const QCString &title,const QCString &intro,
2351  const QCString &fn,
2352  HighlightedItem hi) :
2353  numAnnotated(numAnno), numPrinted(numPrint),
2354  listKind(lk), fallbackKind(fk),
2356  compoundType(ct),fileBaseName(fn),
2357  hiItem(hi) { }
2358 
2359  const int numAnnotated;
2360  const int numPrinted;
2368 };
2369 
2371 {
2372  //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2373  // annotatedClasses,annotatedClassesPrinted);
2374  if (ctx.numAnnotated==0) return;
2375 
2376  ol.pushGeneratorState();
2378  if (ctx.numPrinted==0)
2379  {
2382  }
2384  if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2385  QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2386  bool addToIndex = lne==0 || lne->visible();
2387 
2388  startFile(ol,ctx.fileBaseName,QCString(),title,ctx.hiItem);
2389 
2390  startTitle(ol,QCString());
2391  ol.parseText(title);
2392  endTitle(ol,QCString(),QCString());
2393 
2394  ol.startContents();
2395 
2396  ol.startTextBlock();
2397  ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2398  ol.endTextBlock();
2399 
2400  // ---------------
2401  // Linear class index for Latex/RTF
2402  // ---------------
2403  ol.pushGeneratorState();
2406 
2408 
2410  ol.popGeneratorState();
2411 
2412  // ---------------
2413  // Hierarchical class index for HTML
2414  // ---------------
2415  ol.pushGeneratorState();
2417 
2418  {
2419  if (addToIndex)
2420  {
2423  }
2424  FTVHelp ftv(false);
2427  TextStream t;
2428  ftv.generateTreeViewInline(t);
2429  ol.writeString(t.str().c_str());
2430  if (addToIndex)
2431  {
2433  }
2434  }
2435 
2436  ol.popGeneratorState();
2437  // ------
2438 
2439  endFile(ol); // contains ol.endContents()
2440  ol.popGeneratorState();
2441 }
2442 
2443 //----------------------------------------------------------------------------
2444 
2446 {
2452  "annotated",
2454 
2455 }
2456 
2457 //----------------------------------------------------------------------------
2458 
2460 {
2466  "annotatedinterfaces",
2468 
2469 }
2470 
2471 //----------------------------------------------------------------------------
2472 
2474 {
2480  "annotatedstructs",
2482 
2483 }
2484 
2485 //----------------------------------------------------------------------------
2486 
2488 {
2494  "annotatedexceptions",
2496 
2497 }
2498 
2499 //----------------------------------------------------------------------------
2500 static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2501  QCString &prevClassName)
2502 {
2503  const ClassDef *cd=md->getClassDef();
2504  if ( cd && prevClassName!=cd->displayName())
2505  {
2506  ol.writeString(separator);
2508  cd->displayName());
2509  //ol.writeString("\n");
2510  prevClassName = cd->displayName();
2511  }
2512 }
2513 
2514 static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2515  QCString &prevFileName)
2516 {
2517  const FileDef *fd=md->getFileDef();
2518  if (fd && prevFileName!=fd->name())
2519  {
2520  ol.writeString(separator);
2522  fd->name());
2523  //ol.writeString("\n");
2524  prevFileName = fd->name();
2525  }
2526 }
2527 
2528 static void writeNamespaceLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2529  QCString &prevNamespaceName)
2530 {
2531  const NamespaceDef *nd=md->getNamespaceDef();
2532  if (nd && prevNamespaceName!=nd->displayName())
2533  {
2534  ol.writeString(separator);
2536  nd->displayName());
2537  //ol.writeString("\n");
2538  prevNamespaceName = nd->displayName();
2539  }
2540 }
2541 
2542 static void writeMemberList(OutputList &ol,bool useSections,const std::string &page,
2543  const MemberIndexMap &memberIndexMap,
2544  Definition::DefType type)
2545 {
2546  int index = (int)type;
2547  ASSERT(index<3);
2548 
2549  typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
2550  QCString &prevNamespaceName);
2551 
2552  // each index tab has its own write function
2553  static writeLinkForMember_t writeLinkForMemberMap[3] =
2554  {
2558  };
2559  QCString prevName;
2560  QCString prevDefName;
2561  bool first=TRUE;
2562  bool firstSection=TRUE;
2563  bool firstItem=TRUE;
2564  const MemberIndexList *mil = 0;
2565  std::string letter;
2566  for (const auto &kv : memberIndexMap)
2567  {
2568  if (!page.empty()) // specific page mode
2569  {
2570  auto it = memberIndexMap.find(page);
2571  if (it != memberIndexMap.end())
2572  {
2573  mil = &it->second;
2574  letter = page;
2575  }
2576  }
2577  else // do all pages
2578  {
2579  mil = &kv.second;
2580  letter = kv.first;
2581  }
2582  if (mil==0 || mil->empty()) continue;
2583  for (const auto &md : *mil)
2584  {
2585  const char *sep;
2586  bool isFunc=!md->isObjCMethod() &&
2587  (md->isFunction() || md->isSlot() || md->isSignal());
2588  QCString name=md->name();
2589  int startIndex = getPrefixIndex(name);
2590  if (name.data()+startIndex!=prevName) // new entry
2591  {
2592  if ((prevName.isEmpty() ||
2593  tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2594  useSections) // new section
2595  {
2596  if (!firstItem) ol.endItemListItem();
2597  if (!firstSection) ol.endItemList();
2598  QCString cs = letterToLabel(letter.c_str());
2599  QCString anchor=(QCString)"index_"+convertToId(cs);
2600  QCString title=(QCString)"- "+letter.c_str()+" -";
2601  ol.startSection(anchor,title,SectionType::Subsection);
2602  ol.docify(title);
2603  ol.endSection(anchor,SectionType::Subsection);
2604  ol.startItemList();
2605  firstSection=FALSE;
2606  firstItem=TRUE;
2607  }
2608  else if (!useSections && first)
2609  {
2610  ol.startItemList();
2611  first=FALSE;
2612  }
2613 
2614  // member name
2615  if (!firstItem) ol.endItemListItem();
2616  ol.startItemListItem();
2617  firstItem=FALSE;
2618  ol.docify(name);
2619  if (isFunc) ol.docify("()");
2620  //ol.writeString("\n");
2621 
2622  // link to class
2623  prevDefName="";
2624  sep = "&#160;:&#160;";
2625  prevName = name.data()+startIndex;
2626  }
2627  else // same entry
2628  {
2629  sep = ", ";
2630  // link to class for other members with the same name
2631  }
2632  if (index<3)
2633  {
2634  // write the link for the specific list type
2635  writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2636  }
2637  }
2638  if (!page.empty())
2639  {
2640  break;
2641  }
2642  }
2643  if (!firstItem) ol.endItemListItem();
2644  ol.endItemList();
2645 }
2646 
2647 //----------------------------------------------------------------------------
2648 
2650 {
2651  int j=0;
2652  for (j=0;j<CMHL_Total;j++)
2653  {
2655  g_classIndexLetterUsed[j].clear();
2656  }
2657 }
2658 
2660 {
2661  static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
2662  const ClassDef *cd=0;
2663 
2664  if (md->isLinkableInProject() &&
2665  (cd=md->getClassDef()) &&
2666  cd->isLinkableInProject() &&
2667  cd->templateMaster()==0)
2668  {
2669  QCString n = md->name();
2670  int index = getPrefixIndex(n);
2671  std::string letter = getUTF8CharAt(n.str(),index);
2672  if (!letter.empty())
2673  {
2674  letter = convertUTF8ToLower(letter);
2675  bool isFriendToHide = hideFriendCompounds &&
2676  (QCString(md->typeString())=="friend class" ||
2677  QCString(md->typeString())=="friend struct" ||
2678  QCString(md->typeString())=="friend union");
2679  if (!(md->isFriend() && isFriendToHide) &&
2680  (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
2681  )
2682  {
2685  }
2686  if (md->isFunction() || md->isSlot() || md->isSignal())
2687  {
2690  }
2691  else if (md->isVariable())
2692  {
2695  }
2696  else if (md->isTypedef())
2697  {
2700  }
2701  else if (md->isEnumerate())
2702  {
2705  }
2706  else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
2707  {
2710  }
2711  else if (md->isProperty())
2712  {
2715  }
2716  else if (md->isEvent())
2717  {
2720  }
2721  else if (md->isRelated() || md->isForeign() ||
2722  (md->isFriend() && !isFriendToHide))
2723  {
2726  }
2727  }
2728  }
2729 }
2730 
2731 //----------------------------------------------------------------------------
2732 
2734 {
2735  int j=0;
2736  for (j=0;j<NMHL_Total;j++)
2737  {
2739  g_namespaceIndexLetterUsed[j].clear();
2740  }
2741 }
2742 
2744 {
2745  const NamespaceDef *nd=md->getNamespaceDef();
2746  if (nd && nd->isLinkableInProject() && md->isLinkableInProject())
2747  {
2748  QCString n = md->name();
2749  int index = getPrefixIndex(n);
2750  std::string letter = getUTF8CharAt(n.str(),index);
2751  if (!letter.empty())
2752  {
2753  letter = convertUTF8ToLower(letter);
2754  if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
2755  {
2758  }
2759 
2760  if (md->isFunction())
2761  {
2764  }
2765  else if (md->isVariable())
2766  {
2769  }
2770  else if (md->isTypedef())
2771  {
2774  }
2775  else if (md->isSequence())
2776  {
2779  }
2780  else if (md->isDictionary())
2781  {
2784  }
2785  else if (md->isEnumerate())
2786  {
2789  }
2790  else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
2791  {
2794  }
2795  }
2796  }
2797 }
2798 
2799 //----------------------------------------------------------------------------
2800 
2802 {
2803  int j=0;
2804  for (j=0;j<NMHL_Total;j++)
2805  {
2806  documentedFileMembers[j]=0;
2807  g_fileIndexLetterUsed[j].clear();
2808  }
2809 }
2810 
2812 {
2813  const FileDef *fd=md->getFileDef();
2814  if (fd && fd->isLinkableInProject() && md->isLinkableInProject())
2815  {
2816  QCString n = md->name();
2817  int index = getPrefixIndex(n);
2818  std::string letter = getUTF8CharAt(n.str(),index);
2819  if (!letter.empty())
2820  {
2821  letter = convertUTF8ToLower(letter);
2822  if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
2823  {
2826  }
2827 
2828  if (md->isFunction())
2829  {
2832  }
2833  else if (md->isVariable())
2834  {
2837  }
2838  else if (md->isTypedef())
2839  {
2842  }
2843  else if (md->isSequence())
2844  {
2847  }
2848  else if (md->isDictionary())
2849  {
2852  }
2853  else if (md->isEnumerate())
2854  {
2857  }
2858  else if (md->isEnumValue() && md->getEnumScope() && !md->getEnumScope()->isStrong())
2859  {
2862  }
2863  else if (md->isDefine())
2864  {
2867  }
2868  }
2869  }
2870 }
2871 
2872 //----------------------------------------------------------------------------
2873 
2875 {
2876  for (auto &kv : map)
2877  {
2878  std::sort(kv.second.begin(),kv.second.end(),
2879  [](const MemberDef *md1,const MemberDef *md2)
2880  {
2881  int result = qstricmp(md1->name(),md2->name());
2882  return result==0 ? qstricmp(md1->qualifiedName(),md2->qualifiedName())<0 : result<0;
2883  });
2884  }
2885 }
2886 
2888 {
2889  for (auto &idx : g_classIndexLetterUsed)
2890  {
2891  sortMemberIndexList(idx);
2892  }
2893  for (auto &idx : g_fileIndexLetterUsed)
2894  {
2895  sortMemberIndexList(idx);
2896  }
2897  for (auto &idx : g_namespaceIndexLetterUsed)
2898  {
2899  sortMemberIndexList(idx);
2900  }
2901 }
2902 
2903 //----------------------------------------------------------------------------
2904 
2906  const MemberIndexMap &map,const std::string &page,
2907  QCString fullName,bool multiPage)
2908 {
2909  bool first=TRUE;
2911  for (const auto &kv : map)
2912  {
2913  QCString ci = kv.first.c_str();
2914  QCString is = letterToLabel(ci);
2915  QCString anchor;
2917  if (!multiPage)
2918  anchor="#index_";
2919  else if (first)
2920  anchor=fullName+extension+"#index_";
2921  else
2922  anchor=fullName+"_"+is+extension+"#index_";
2923  startQuickIndexItem(ol,anchor+convertToId(is),kv.first==page,TRUE,first);
2924  ol.writeString(ci);
2925  endQuickIndexItem(ol);
2926  first=FALSE;
2927  }
2928  endQuickIndexList(ol);
2929 }
2930 
2931 //----------------------------------------------------------------------------
2932 
2933 /** Helper class representing a class member in the navigation menu. */
2934 struct CmhlInfo
2935 {
2936  CmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
2937  const char *fname;
2939 };
2940 
2941 static const CmhlInfo *getCmhlInfo(size_t hl)
2942 {
2943  static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2944  static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2945  static CmhlInfo cmhlInfo[] =
2946  {
2947  CmhlInfo("functions", theTranslator->trAll()),
2948  CmhlInfo("functions_func",
2949  fortranOpt ? theTranslator->trSubprograms() :
2950  vhdlOpt ? theTranslator->trFunctionAndProc() :
2952  CmhlInfo("functions_vars",theTranslator->trVariables()),
2953  CmhlInfo("functions_type",theTranslator->trTypedefs()),
2954  CmhlInfo("functions_enum",theTranslator->trEnumerations()),
2955  CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
2956  CmhlInfo("functions_prop",theTranslator->trProperties()),
2957  CmhlInfo("functions_evnt",theTranslator->trEvents()),
2958  CmhlInfo("functions_rela",theTranslator->trRelatedFunctions())
2959  };
2960  return &cmhlInfo[hl];
2961 }
2962 
2964 {
2965  if (documentedClassMembers[hl]==0) return;
2966 
2967  static bool disableIndex = Config_getBool(DISABLE_INDEX);
2968 
2969  bool multiPageIndex=FALSE;
2971  {
2972  multiPageIndex=TRUE;
2973  }
2974 
2975  ol.pushGeneratorState();
2977 
2980  QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
2981  if (hl!=CMHL_All) title+=(QCString)" - "+getCmhlInfo(hl)->title;
2982  bool addToIndex = lne==0 || lne->visible();
2983 
2984  if (addToIndex)
2985  {
2987  getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
2988  if (multiPageIndex) Doxygen::indexList->incContentsDepth();
2989  }
2990 
2991  bool first=TRUE;
2992  for (const auto &kv : g_classIndexLetterUsed[hl])
2993  {
2994  std::string page = kv.first;
2995  QCString fileName = getCmhlInfo(hl)->fname;
2996  if (multiPageIndex)
2997  {
2998  QCString cs(page);
2999  if (!first)
3000  {
3001  fileName+="_"+letterToLabel(cs);
3002  }
3003  if (addToIndex)
3004  {
3006  }
3007  }
3008  bool quickIndex = documentedClassMembers[hl]>maxItemsBeforeQuickIndex;
3009 
3010  ol.startFile(fileName+extension,QCString(),title);
3011  ol.startQuickIndices();
3012  if (!disableIndex)
3013  {
3015 
3016  if (!Config_getBool(HTML_DYNAMIC_MENUS))
3017  {
3018  startQuickIndexList(ol);
3019 
3020  // index item for global member list
3022  getCmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==CMHL_All,TRUE,first);
3023  ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3024  endQuickIndexItem(ol);
3025 
3026  int i;
3027  // index items per category member lists
3028  for (i=1;i<CMHL_Total;i++)
3029  {
3030  if (documentedClassMembers[i]>0)
3031  {
3033  ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3034  //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3035  // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3036  endQuickIndexItem(ol);
3037  }
3038  }
3039 
3040  endQuickIndexList(ol);
3041 
3042  // quick alphabetical index
3043  if (quickIndex)
3044  {
3046  getCmhlInfo(hl)->fname,multiPageIndex);
3047  }
3048  }
3049  }
3050  ol.endQuickIndices();
3051  ol.writeSplitBar(fileName);
3052  ol.writeSearchInfo();
3053 
3054  ol.startContents();
3055 
3056  if (hl==CMHL_All)
3057  {
3058  ol.startTextBlock();
3059  ol.parseText(lne ? lne->intro() : theTranslator->trCompoundMembersDescription(Config_getBool(EXTRACT_ALL)));
3060  ol.endTextBlock();
3061  }
3062  else
3063  {
3064  // hack to work around a mozilla bug, which refuses to switch to
3065  // normal lists otherwise
3066  ol.writeString("&#160;");
3067  }
3068 
3069  writeMemberList(ol,quickIndex,
3070  multiPageIndex ? page : std::string(),
3073  endFile(ol);
3074  first=FALSE;
3075  }
3076 
3077  if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3078 
3079  ol.popGeneratorState();
3080 }
3081 
3083 {
3085  bool addToIndex = lne==0 || lne->visible();
3086 
3087  if (documentedClassMembers[CMHL_All]>0 && addToIndex)
3088  {
3091  }
3101  if (documentedClassMembers[CMHL_All]>0 && addToIndex)
3102  {
3104  }
3105 
3106 }
3107 
3108 //----------------------------------------------------------------------------
3109 
3110 /** Helper class representing a file member in the navigation menu. */
3111 struct FmhlInfo
3112 {
3113  FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3114  const char *fname;
3116 };
3117 
3118 static const FmhlInfo *getFmhlInfo(size_t hl)
3119 {
3120  static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3121  static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3122  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3123  static FmhlInfo fmhlInfo[] =
3124  {
3125  FmhlInfo("globals", theTranslator->trAll()),
3126  FmhlInfo("globals_func",
3127  fortranOpt ? theTranslator->trSubprograms() :
3128  vhdlOpt ? theTranslator->trFunctionAndProc() :
3130  FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3131  FmhlInfo("globals_type",theTranslator->trTypedefs()),
3132  FmhlInfo("globals_sequ",theTranslator->trSequences()),
3133  FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3134  FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3135  FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3136  FmhlInfo("globals_defs",theTranslator->trDefines())
3137  };
3138  return &fmhlInfo[hl];
3139 }
3140 
3142 {
3143  if (documentedFileMembers[hl]==0) return;
3144 
3145  static bool disableIndex = Config_getBool(DISABLE_INDEX);
3146 
3147  bool multiPageIndex=FALSE;
3149  {
3150  multiPageIndex=TRUE;
3151  }
3152 
3153  ol.pushGeneratorState();
3155 
3158  QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3159  bool addToIndex = lne==0 || lne->visible();
3160 
3161  if (addToIndex)
3162  {
3163  Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3164  getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3165  if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3166  }
3167 
3168  bool first=TRUE;
3169  for (const auto &kv : g_fileIndexLetterUsed[hl])
3170  {
3171  std::string page = kv.first;
3172  QCString fileName = getFmhlInfo(hl)->fname;
3173  if (multiPageIndex)
3174  {
3175  QCString cs(page);
3176  if (!first)
3177  {
3178  fileName+="_"+letterToLabel(cs);
3179  }
3180  if (addToIndex)
3181  {
3183  }
3184  }
3185  bool quickIndex = documentedFileMembers[hl]>maxItemsBeforeQuickIndex;
3186 
3187  ol.startFile(fileName+extension,QCString(),title);
3188  ol.startQuickIndices();
3189  if (!disableIndex)
3190  {
3192  if (!Config_getBool(HTML_DYNAMIC_MENUS))
3193  {
3194  startQuickIndexList(ol);
3195 
3196  // index item for all file member lists
3198  getFmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==FMHL_All,TRUE,first);
3199  ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3200  endQuickIndexItem(ol);
3201 
3202  int i;
3203  // index items for per category member lists
3204  for (i=1;i<FMHL_Total;i++)
3205  {
3206  if (documentedFileMembers[i]>0)
3207  {
3209  getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3210  ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3211  endQuickIndexItem(ol);
3212  }
3213  }
3214 
3215  endQuickIndexList(ol);
3216 
3217  if (quickIndex)
3218  {
3220  getFmhlInfo(hl)->fname,multiPageIndex);
3221  }
3222  }
3223  }
3224  ol.endQuickIndices();
3225  ol.writeSplitBar(fileName);
3226  ol.writeSearchInfo();
3227 
3228  ol.startContents();
3229 
3230  if (hl==FMHL_All)
3231  {
3232  ol.startTextBlock();
3233  ol.parseText(lne ? lne->intro() : theTranslator->trFileMembersDescription(Config_getBool(EXTRACT_ALL)));
3234  ol.endTextBlock();
3235  }
3236  else
3237  {
3238  // hack to work around a mozilla bug, which refuses to switch to
3239  // normal lists otherwise
3240  ol.writeString("&#160;");
3241  }
3242 
3243  writeMemberList(ol,quickIndex,
3244  multiPageIndex ? page : std::string(),
3247  endFile(ol);
3248  first=FALSE;
3249  }
3250  if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3251  ol.popGeneratorState();
3252 }
3253 
3255 {
3257  bool addToIndex = lne==0 || lne->visible();
3258  if (documentedFileMembers[FMHL_All]>0 && addToIndex)
3259  {
3262  }
3272  if (documentedFileMembers[FMHL_All]>0 && addToIndex)
3273  {
3275  }
3276 
3277 }
3278 
3279 //----------------------------------------------------------------------------
3280 
3281 /** Helper class representing a namespace member in the navigation menu. */
3282 struct NmhlInfo
3283 {
3284  NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3285  const char *fname;
3287 };
3288 
3289 static const NmhlInfo *getNmhlInfo(size_t hl)
3290 {
3291  static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3292  static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3293  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3294  static NmhlInfo nmhlInfo[] =
3295  {
3296  NmhlInfo("namespacemembers", theTranslator->trAll()),
3297  NmhlInfo("namespacemembers_func",
3298  fortranOpt ? theTranslator->trSubprograms() :
3299  vhdlOpt ? theTranslator->trFunctionAndProc() :
3301  NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3302  NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3303  NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3304  NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3305  NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3306  NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3307  };
3308  return &nmhlInfo[hl];
3309 }
3310 
3311 //----------------------------------------------------------------------------
3312 
3315 {
3316  if (documentedNamespaceMembers[hl]==0) return;
3317 
3318  static bool disableIndex = Config_getBool(DISABLE_INDEX);
3319 
3320 
3321  bool multiPageIndex=FALSE;
3323  {
3324  multiPageIndex=TRUE;
3325  }
3326 
3327  ol.pushGeneratorState();
3329 
3332  QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3333  bool addToIndex = lne==0 || lne->visible();
3334 
3335  if (addToIndex)
3336  {
3337  Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3338  getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3339  if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3340  }
3341 
3342  bool first=TRUE;
3343  for (const auto &kv : g_namespaceIndexLetterUsed[hl])
3344  {
3345  std::string page = kv.first;
3346  QCString fileName = getNmhlInfo(hl)->fname;
3347  if (multiPageIndex)
3348  {
3349  QCString cs(page);
3350  if (!first)
3351  {
3352  fileName+="_"+letterToLabel(cs);
3353  }
3354  if (addToIndex)
3355  {
3357  }
3358  }
3360 
3361  ol.startFile(fileName+extension,QCString(),title);
3362  ol.startQuickIndices();
3363  if (!disableIndex)
3364  {
3366  if (!Config_getBool(HTML_DYNAMIC_MENUS))
3367  {
3368  startQuickIndexList(ol);
3369 
3370  // index item for all namespace member lists
3372  getNmhlInfo(0)->fname+Doxygen::htmlFileExtension,hl==NMHL_All,TRUE,first);
3373  ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3374  endQuickIndexItem(ol);
3375 
3376  int i;
3377  // index items per category member lists
3378  for (i=1;i<NMHL_Total;i++)
3379  {
3380  if (documentedNamespaceMembers[i]>0)
3381  {
3383  getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3384  ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3385  endQuickIndexItem(ol);
3386  }
3387  }
3388 
3389  endQuickIndexList(ol);
3390 
3391  if (quickIndex)
3392  {
3394  getNmhlInfo(hl)->fname,multiPageIndex);
3395  }
3396  }
3397  }
3398  ol.endQuickIndices();
3399  ol.writeSplitBar(fileName);
3400  ol.writeSearchInfo();
3401 
3402  ol.startContents();
3403 
3404  if (hl==NMHL_All)
3405  {
3406  ol.startTextBlock();
3407  ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceMemberDescription(Config_getBool(EXTRACT_ALL)));
3408  ol.endTextBlock();
3409  }
3410  else
3411  {
3412  // hack to work around a mozilla bug, which refuses to switch to
3413  // normal lists otherwise
3414  ol.writeString("&#160;");
3415  }
3416 
3417  writeMemberList(ol,quickIndex,
3418  multiPageIndex ? page : std::string(),
3421  endFile(ol);
3422  first=FALSE;
3423  }
3424  if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3425  ol.popGeneratorState();
3426 }
3427 
3429 {
3431  bool addToIndex = lne==0 || lne->visible();
3432  if (documentedNamespaceMembers[NMHL_All]>0 && addToIndex)
3433  {
3436  }
3437  //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3446  if (documentedNamespaceMembers[NMHL_All]>0 && addToIndex)
3447  {
3449  }
3450 
3451 }
3452 
3453 //----------------------------------------------------------------------------
3454 
3455 //----------------------------------------------------------------------------
3456 
3458 {
3459  if (Doxygen::exampleLinkedMap->empty()) return;
3460  ol.pushGeneratorState();
3464  QCString title = lne ? lne->title() : theTranslator->trExamples();
3465  bool addToIndex = lne==0 || lne->visible();
3466 
3467  startFile(ol,"examples",QCString(),title,HLI_Examples);
3468 
3469  startTitle(ol,QCString());
3470  ol.parseText(title);
3471  endTitle(ol,QCString(),QCString());
3472 
3473  ol.startContents();
3474 
3475  if (addToIndex)
3476  {
3479  }
3480 
3481  ol.startTextBlock();
3482  ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3483  ol.endTextBlock();
3484 
3485  ol.startItemList();
3486  for (const auto &pd : *Doxygen::exampleLinkedMap)
3487  {
3488  ol.startItemListItem();
3489  QCString n=pd->getOutputFileBase();
3490  if (!pd->title().isEmpty())
3491  {
3492  ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3493  if (addToIndex)
3494  {
3495  Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title().str()),pd->getReference(),n,QCString(),FALSE,TRUE);
3496  }
3497  }
3498  else
3499  {
3500  ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3501  if (addToIndex)
3502  {
3503  Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3504  }
3505  }
3506  ol.endItemListItem();
3507  //ol.writeString("\n");
3508  }
3509  ol.endItemList();
3510 
3511  if (addToIndex)
3512  {
3514  }
3515  endFile(ol);
3516  ol.popGeneratorState();
3517 }
3518 
3519 
3520 //----------------------------------------------------------------------------
3521 
3522 static void countRelatedPages(int &docPages,int &indexPages)
3523 {
3524  docPages=indexPages=0;
3525  for (const auto &pd : *Doxygen::pageLinkedMap)
3526  {
3527  if (pd->visibleInIndex())
3528  {
3529  indexPages++;
3530  }
3531  if (pd->documentedPage())
3532  {
3533  docPages++;
3534  }
3535  }
3536 }
3537 
3538 //----------------------------------------------------------------------------
3539 
3540 static bool mainPageHasOwnTitle()
3541 {
3542  static QCString projectName = Config_getString(PROJECT_NAME);
3543  QCString title;
3544  if (Doxygen::mainPage)
3545  {
3546  title = filterTitle(Doxygen::mainPage->title().str());
3547  }
3548  return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3549 }
3550 
3551 static void writePages(const PageDef *pd,FTVHelp *ftv)
3552 {
3553  //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),pd,Doxygen::mainPage);
3555  bool addToIndex = lne==0 || lne->visible();
3556  if (!addToIndex) return;
3557 
3558  bool hasSubPages = pd->hasSubPages();
3559  bool hasSections = pd->hasSections();
3560 
3561  if (pd->visibleInIndex())
3562  {
3563  QCString pageTitle;
3564 
3565  if (pd->title().isEmpty())
3566  pageTitle=pd->name();
3567  else
3568  pageTitle=filterTitle(pd->title().str());
3569 
3570  if (ftv)
3571  {
3572  //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
3573  ftv->addContentsItem(
3574  hasSubPages,pageTitle,
3575  pd->getReference(),pd->getOutputFileBase(),
3576  QCString(),hasSubPages,TRUE,pd);
3577  }
3578  if (addToIndex && pd!=Doxygen::mainPage.get())
3579  {
3581  hasSubPages || hasSections,pageTitle,
3582  pd->getReference(),pd->getOutputFileBase(),
3583  QCString(),hasSubPages,TRUE);
3584  }
3585  }
3586  if (hasSubPages && ftv) ftv->incContentsDepth();
3587  bool doIndent = (hasSections || hasSubPages) &&
3588  (pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
3589  if (doIndent)
3590  {
3592  }
3593  if (hasSections)
3594  {
3595  const_cast<PageDef*>(pd)->addSectionsToIndex();
3596  }
3597  for (const auto &subPage : pd->getSubPages())
3598  {
3599  writePages(subPage,ftv);
3600  }
3601  if (hasSubPages && ftv) ftv->decContentsDepth();
3602  if (doIndent)
3603  {
3605  }
3606  //printf("end writePages()=%s\n",qPrint(pd->title()));
3607 }
3608 
3609 //----------------------------------------------------------------------------
3610 
3611 static void writePageIndex(OutputList &ol)
3612 {
3613  if (indexedPages==0) return;
3614  ol.pushGeneratorState();
3617  QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
3618  startFile(ol,"pages",QCString(),title,HLI_Pages);
3619  startTitle(ol,QCString());
3620  ol.parseText(title);
3621  endTitle(ol,QCString(),QCString());
3622  ol.startContents();
3623  ol.startTextBlock();
3625  ol.endTextBlock();
3626 
3627  {
3628  FTVHelp* ftv = new FTVHelp(FALSE);
3629  for (const auto &pd : *Doxygen::pageLinkedMap)
3630  {
3631  if ((pd->getOuterScope()==0 ||
3632  pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
3633  !pd->isReference() // not an external page
3634  )
3635  {
3636  writePages(pd.get(),ftv);
3637  }
3638  }
3639  TextStream t;
3640  ftv->generateTreeViewInline(t);
3641  ol.writeString(t.str().c_str());
3642  delete ftv;
3643  }
3644 
3645 // ol.popGeneratorState();
3646  // ------
3647 
3648  endFile(ol);
3649  ol.popGeneratorState();
3650 }
3651 
3652 //----------------------------------------------------------------------------
3653 
3654 static int countGroups()
3655 {
3656  int count=0;
3657  for (const auto &gd : *Doxygen::groupLinkedMap)
3658  {
3659  if (!gd->isReference())
3660  {
3661  //gd->visited=FALSE;
3662  count++;
3663  }
3664  }
3665  return count;
3666 }
3667 
3668 //----------------------------------------------------------------------------
3669 
3670 static int countDirs()
3671 {
3672  int count=0;
3673  for (const auto &dd : *Doxygen::dirLinkedMap)
3674  {
3675  if (dd->isLinkableInProject())
3676  {
3677  count++;
3678  }
3679  }
3680  return count;
3681 }
3682 
3683 
3684 //----------------------------------------------------------------------------
3685 
3687 {
3688  if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
3689  ol.pushGeneratorState();
3691 
3692  DotLegendGraph gd;
3693  gd.writeGraph(Config_getString(HTML_OUTPUT));
3694 
3695  bool stripCommentsStateRef = Config_getBool(STRIP_CODE_COMMENTS);
3696  bool oldStripCommentsState = stripCommentsStateRef;
3697  bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
3698  bool oldCreateSubdirs = createSubdirs;
3699  // temporarily disable the stripping of comments for our own code example!
3700  stripCommentsStateRef = Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
3701  // temporarily disable create subdirs for linking to our example
3702  createSubdirs = Config_updateBool(CREATE_SUBDIRS,FALSE);
3703 
3704  startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
3705  startTitle(ol,QCString());
3707  endTitle(ol,QCString(),QCString());
3708  ol.startContents();
3709  QCString legendDocs = theTranslator->trLegendDocs();
3710  int s = legendDocs.find("<center>");
3711  int e = legendDocs.find("</center>");
3712  QCString imgExt = getDotImageExtension();
3713  if (imgExt=="svg" && s!=-1 && e!=-1)
3714  {
3715  legendDocs = legendDocs.left(s+8) + "[!-- SVG 0 --]\n" + legendDocs.mid(e);
3716  //printf("legendDocs=%s\n",qPrint(legendDocs));
3717  }
3718  FileDef *fd = createFileDef("","graph_legend.dox");
3719  ol.generateDoc("graph_legend",1,fd,0,legendDocs,FALSE,FALSE,
3721  delete fd;
3722 
3723  // restore config settings
3724  Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
3725  Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
3726 
3727  endFile(ol);
3728  ol.popGeneratorState();
3729 }
3730 
3731 
3732 
3733 //----------------------------------------------------------------------------
3734 /*!
3735  * write groups as hierarchical trees
3736  */
3737 static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex)
3738 {
3739  //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3740  //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3741  if (level>20)
3742  {
3743  warn(gd->getDefFileName(),gd->getDefLine(),
3744  "maximum nesting level exceeded for group %s: check for possible recursive group relation!\n",qPrint(gd->name())
3745  );
3746  return;
3747  }
3748 
3749  /* Some groups should appear twice under different parent-groups.
3750  * That is why we should not check if it was visited
3751  */
3752  if ((!gd->isASubGroup() || level>0) && gd->isVisible() &&
3753  (!gd->isReference() || Config_getBool(EXTERNAL_GROUPS)) // hide external groups by default
3754  )
3755  {
3756  //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
3757  // write group info
3758  bool hasSubGroups = !gd->getSubGroups().empty();
3759  bool hasSubPages = !gd->getPages().empty();
3760  size_t numSubItems = 0;
3761  if (1 /*Config_getBool(TOC_EXPAND)*/)
3762  {
3763  for (const auto &ml : gd->getMemberLists())
3764  {
3765  if (ml->listType()&MemberListType_documentationLists)
3766  {
3767  numSubItems += ml->size();
3768  }
3769  }
3770  numSubItems += gd->getNamespaces().size();
3771  numSubItems += gd->getClasses().size();
3772  numSubItems += gd->getFiles().size();
3773  numSubItems += gd->getConcepts().size();
3774  numSubItems += gd->getDirs().size();
3775  numSubItems += gd->getPages().size();
3776  }
3777 
3778  bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
3779  //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
3780  if (addToIndex)
3781  {
3784  }
3785  if (ftv)
3786  {
3787  ftv->addContentsItem(hasSubGroups,gd->groupTitle(),
3788  gd->getReference(),gd->getOutputFileBase(),QCString(),
3789  FALSE,FALSE,gd);
3790  ftv->incContentsDepth();
3791  }
3792 
3793  //ol.writeListItem();
3794  //ol.startTextLink(gd->getOutputFileBase(),0);
3795  //parseText(ol,gd->groupTitle());
3796  //ol.endTextLink();
3797 
3798  ol.startIndexListItem();
3800  ol.parseText(gd->groupTitle());
3802  if (gd->isReference())
3803  {
3804  ol.startTypewriter();
3805  ol.docify(" [external]");
3806  ol.endTypewriter();
3807  }
3808 
3809  for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
3810  {
3811  if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
3812  {
3813  const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
3814  MemberList *ml = gd->getMemberList(lmd->type);
3815  if (ml)
3816  {
3817  for (const auto &md : *ml)
3818  {
3819  const MemberVector &enumList = md->enumFieldList();
3820  isDir = !enumList.empty() && md->isEnumerate();
3821  if (md->isVisible() && !md->isAnonymous())
3822  {
3824  md->qualifiedName(),md->getReference(),
3825  md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
3826  }
3827  if (isDir)
3828  {
3830  for (const auto &emd : enumList)
3831  {
3832  if (emd->isVisible())
3833  {
3835  emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
3836  emd->anchor(),FALSE,addToIndex);
3837  }
3838  }
3840  }
3841  }
3842  }
3843  }
3844  else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
3845  {
3846  for (const auto &cd : gd->getClasses())
3847  {
3848  //bool nestedClassInSameGroup =
3849  // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
3850  // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
3851  //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
3852  if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
3853  {
3854  addMembersToIndex(cd,
3856  cd->displayName(),
3857  cd->anchor(),
3858  addToIndex,
3859  TRUE);
3860  }
3861  }
3862  }
3863  else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex)
3864  {
3865  for (const auto &nd : gd->getNamespaces())
3866  {
3867  if (nd->isVisible())
3868  {
3870  nd->displayName(),nd->getReference(),
3871  nd->getOutputFileBase(),QCString(),FALSE,addToIndex);
3872  }
3873  }
3874  }
3875  else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
3876  {
3877  for (const auto &cd : gd->getConcepts())
3878  {
3879  if (cd->isVisible())
3880  {
3882  cd->displayName(),cd->getReference(),
3883  cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
3884  }
3885  }
3886  }
3887  else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
3888  {
3889  for (const auto &fd : gd->getFiles())
3890  {
3891  if (fd->isVisible())
3892  {
3894  fd->displayName(),fd->getReference(),
3895  fd->getOutputFileBase(),QCString(),FALSE,FALSE);
3896  }
3897  }
3898  }
3899  else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
3900  {
3901  for (const auto &dd : gd->getDirs())
3902  {
3903  if (dd->isVisible())
3904  {
3906  dd->shortName(),dd->getReference(),
3907  dd->getOutputFileBase(),QCString(),FALSE,FALSE);
3908  }
3909  }
3910  }
3911  else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
3912  {
3913  for (const auto &pd : gd->getPages())
3914  {
3915  const SectionInfo *si=0;
3916  if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
3917  hasSubPages = pd->hasSubPages();
3918  bool hasSections = pd->hasSections();
3920  hasSubPages || hasSections,
3921  pd->title(),
3922  gd->getReference(),
3923  gd->getOutputFileBase(),
3924  si ? si->label() : QCString(),
3925  hasSubPages || hasSections,
3926  TRUE); // addToNavIndex
3927  if (hasSections || hasSubPages)
3928  {
3930  }
3931  if (hasSections)
3932  {
3933  const_cast<PageDef*>(pd)->addSectionsToIndex();
3934  }
3935  writePages(pd,0);
3936  if (hasSections || hasSubPages)
3937  {
3939  }
3940  }
3941  }
3942  else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
3943  {
3944  if (!gd->getSubGroups().empty())
3945  {
3946  startIndexHierarchy(ol,level+1);
3947  for (const auto &subgd : gd->getSubGroups())
3948  {
3949  writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
3950  }
3951  endIndexHierarchy(ol,level+1);
3952  }
3953  }
3954  }
3955 
3956  ol.endIndexListItem();
3957 
3958  if (addToIndex)
3959  {
3961  }
3962  if (ftv)
3963  {
3964  ftv->decContentsDepth();
3965  }
3966  //gd->visited=TRUE;
3967  }
3968 }
3969 
3970 static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
3971 {
3972  if (ftv)
3973  {
3974  ol.pushGeneratorState();
3976  }
3977  startIndexHierarchy(ol,0);
3978  for (const auto &gd : *Doxygen::groupLinkedMap)
3979  {
3980  writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
3981  }
3982  endIndexHierarchy(ol,0);
3983  if (ftv)
3984  {
3985  ol.popGeneratorState();
3986  }
3987 }
3988 
3989 //----------------------------------------------------------------------------
3990 
3991 static void writeGroupIndex(OutputList &ol)
3992 {
3993  if (documentedGroups==0) return;
3994  ol.pushGeneratorState();
3995  // 1.{
3999  QCString title = lne ? lne->title() : theTranslator->trModules();
4000  bool addToIndex = lne==0 || lne->visible();
4001 
4002  startFile(ol,"modules",QCString(),title,HLI_Modules);
4003  startTitle(ol,QCString());
4004  ol.parseText(title);
4005  endTitle(ol,QCString(),QCString());
4006  ol.startContents();
4007  ol.startTextBlock();
4008  ol.parseText(lne ? lne->intro() : theTranslator->trModulesDescription());
4009  ol.endTextBlock();
4010 
4011  // ---------------
4012  // Normal group index for Latex/RTF
4013  // ---------------
4014  // 2.{
4015  ol.pushGeneratorState();
4018 
4019  writeGroupHierarchy(ol,0,FALSE);
4020 
4022  ol.popGeneratorState();
4023  // 2.}
4024 
4025  // ---------------
4026  // interactive group index for HTML
4027  // ---------------
4028  // 2.{
4029  ol.pushGeneratorState();
4031 
4032  {
4033  if (addToIndex)
4034  {
4037  }
4038  FTVHelp* ftv = new FTVHelp(FALSE);
4039  writeGroupHierarchy(ol,ftv,addToIndex);
4040  TextStream t;
4041  ftv->generateTreeViewInline(t);
4043  ol.writeString(t.str().c_str());
4044  delete ftv;
4045  if (addToIndex)
4046  {
4048  }
4049  }
4050  ol.popGeneratorState();
4051  // 2.}
4052 
4053  endFile(ol);
4054  ol.popGeneratorState();
4055  // 1.}
4056 }
4057 
4058 //----------------------------------------------------------------------------
4059 
4060 static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex)
4061 {
4062  for (const auto &cd : concepts)
4063  {
4064  ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4065  cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4066  if (addToIndex)
4067  {
4068  Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4069  cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4070  }
4071  }
4072 }
4073 
4075  bool rootOnly, bool addToIndex);
4076 
4078  bool rootOnly, bool addToIndex)
4079 {
4080  for (const auto &nd : nsLinkedMap)
4081  {
4082  writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4083  }
4084 }
4085 
4086 
4088  bool rootOnly, bool addToIndex)
4089 {
4090  if (!nd->isAnonymous() &&
4091  (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4092  {
4093  bool isDir = namespaceHasNestedConcept(nd);
4094  bool isLinkable = nd->isLinkableInProject();
4095 
4096  //printf("namespace %s isDir=%d\n",qPrint(nd->name()),isDir);
4097 
4098  QCString ref;
4099  QCString file;
4100  if (isLinkable)
4101  {
4102  ref = nd->getReference();
4103  file = nd->getOutputFileBase();
4104  }
4105 
4106  if (isDir)
4107  {
4108  ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4109 
4110  if (addToIndex)
4111  {
4112  // the namespace entry is already shown under the namespace list so don't
4113  // add it to the nav index and don't create a separate index file for it otherwise
4114  // it will overwrite the one written for the namespace list.
4115  Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4116  false, // separateIndex
4117  false // addToNavIndex
4118  );
4119  }
4120  if (addToIndex)
4121  {
4123  }
4124 
4125  ftv->incContentsDepth();
4126  writeConceptTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex);
4127  writeConceptList(nd->getConcepts(),ftv,addToIndex);
4128  ftv->decContentsDepth();
4129 
4130  if (addToIndex)
4131  {
4133  }
4134  }
4135  }
4136 }
4137 
4138 static void writeConceptRootList(FTVHelp *ftv,bool addToIndex)
4139 {
4140  for (const auto &cd : *Doxygen::conceptLinkedMap)
4141  {
4142  if (cd->getOuterScope()==0 ||
4143  cd->getOuterScope()==Doxygen::globalScope)
4144  {
4145  //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4146  ftv->addContentsItem(
4147  false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4148  QCString(),false,cd->partOfGroups().empty(),cd.get());
4149  if (addToIndex)
4150  {
4152  false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4153  QCString(),false,cd->partOfGroups().empty(),cd.get());
4154  }
4155  }
4156  }
4157 }
4158 
4160 {
4161  if (documentedConcepts==0) return;
4162  ol.pushGeneratorState();
4163  // 1.{
4167  QCString title = lne ? lne->title() : theTranslator->trConceptList();
4168  bool addToIndex = lne==0 || lne->visible();
4169 
4170  startFile(ol,"concepts",QCString(),title,HLI_Concepts);
4171  startTitle(ol,QCString());
4172  ol.parseText(title);
4173  endTitle(ol,QCString(),QCString());
4174  ol.startContents();
4175  ol.startTextBlock();
4176  ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4177  ol.endTextBlock();
4178 
4179  // ---------------
4180  // Normal group index for Latex/RTF
4181  // ---------------
4182  // 2.{
4183  ol.pushGeneratorState();
4185 
4186  bool first=TRUE;
4187  for (const auto &cd : *Doxygen::conceptLinkedMap)
4188  {
4189  if (cd->isLinkableInProject())
4190  {
4191  if (first)
4192  {
4193  ol.startIndexList();
4194  first=FALSE;
4195  }
4196  //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4197  ol.startIndexKey();
4198  ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4199  ol.endIndexKey();
4200 
4201  bool hasBrief = !cd->briefDescription().isEmpty();
4202  ol.startIndexValue(hasBrief);
4203  if (hasBrief)
4204  {
4205  //ol.docify(" (");
4206  ol.generateDoc(
4207  cd->briefFile(),cd->briefLine(),
4208  cd.get(),0,
4209  cd->briefDescription(TRUE),
4210  FALSE, // index words
4211  FALSE, // isExample
4212  QCString(), // example name
4213  TRUE, // single line
4214  TRUE, // link from index
4215  Config_getBool(MARKDOWN_SUPPORT)
4216  );
4217  //ol.docify(")");
4218  }
4219  ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4220 
4221  }
4222  }
4223  if (!first) ol.endIndexList();
4224 
4225  ol.popGeneratorState();
4226  // 2.}
4227 
4228  // ---------------
4229  // interactive group index for HTML
4230  // ---------------
4231  // 2.{
4232  ol.pushGeneratorState();
4234 
4235  {
4236  if (addToIndex)
4237  {
4240  }
4241  FTVHelp ftv(false);
4242  for (const auto &nd : *Doxygen::namespaceLinkedMap)
4243  {
4244  writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4245  }
4246  writeConceptRootList(&ftv,addToIndex);
4247  TextStream t;
4248  ftv.generateTreeViewInline(t);
4249  ol.writeString(t.str().c_str());
4250  if (addToIndex)
4251  {
4253  }
4254  }
4255  ol.popGeneratorState();
4256  // 2.}
4257 
4258  endFile(ol);
4259  ol.popGeneratorState();
4260  // 1.}
4261 }
4262 
4263 //----------------------------------------------------------------------------
4264 
4266 {
4267  if (lne->baseFile().left(9)=="usergroup")
4268  {
4269  ol.pushGeneratorState();
4271  startFile(ol,lne->baseFile(),QCString(),lne->title(),HLI_UserGroup);
4272  startTitle(ol,QCString());
4273  ol.parseText(lne->title());
4274  endTitle(ol,QCString(),QCString());
4275  ol.startContents();
4276  int count=0;
4277  for (const auto &entry: lne->children())
4278  {
4279  if (entry->visible()) count++;
4280  }
4281  if (count>0)
4282  {
4283  ol.writeString("<ul>\n");
4284  for (const auto &entry: lne->children())
4285  {
4286  if (entry->visible())
4287  {
4288  ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4289  fixSpaces(entry->title())+"</span></a></li>\n");
4290  }
4291  }
4292  ol.writeString("</ul>\n");
4293  }
4294  endFile(ol);
4295  ol.popGeneratorState();
4296  }
4297 }
4298 
4299 //----------------------------------------------------------------------------
4300 
4301 
4302 static void writeIndex(OutputList &ol)
4303 {
4304  static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4305  static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4306  static QCString projectName = Config_getString(PROJECT_NAME);
4307  // save old generator state
4308  ol.pushGeneratorState();
4309 
4310  QCString projPrefix;
4311  if (!projectName.isEmpty())
4312  {
4313  projPrefix=projectName+" ";
4314  }
4315 
4316  //--------------------------------------------------------------------
4317  // write HTML index
4318  //--------------------------------------------------------------------
4320 
4321  QCString defFileName =
4322  Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4323  int defLine =
4324  Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4325 
4326  QCString title;
4327  if (!mainPageHasTitle())
4328  {
4329  title = theTranslator->trMainPage();
4330  }
4331  else if (Doxygen::mainPage)
4332  {
4333  title = filterTitle(Doxygen::mainPage->title().str());
4334  }
4335 
4336  QCString indexName="index";
4337  ol.startFile(indexName,QCString(),title);
4338 
4339  if (Doxygen::mainPage)
4340  {
4341  if (
4342  (!projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0)
4343  ) // to avoid duplicate entries in the treeview
4344  {
4345  Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,QCString(),indexName,QCString(),Doxygen::mainPage->hasSubPages(),TRUE);
4346  }
4347  if (Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections())
4348  {
4349  writePages(Doxygen::mainPage.get(),0);
4350  }
4351  }
4352 
4353  ol.startQuickIndices();
4354  if (!Config_getBool(DISABLE_INDEX))
4355  {
4357  }
4358  ol.endQuickIndices();
4359  ol.writeSplitBar(indexName);
4360  ol.writeSearchInfo();
4361  bool headerWritten=FALSE;
4362  if (Doxygen::mainPage)
4363  {
4364  if (!Doxygen::mainPage->title().isEmpty())
4365  {
4366  if (Doxygen::mainPage->title().lower() != "notitle")
4367  ol.startPageDoc(Doxygen::mainPage->title());
4368  else
4369  ol.startPageDoc("");
4370  }
4371  else
4372  ol.startPageDoc(projectName);
4373  }
4374  if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4375  {
4376  if (Doxygen::mainPage->title().lower()!="notitle")
4377  {
4378  ol.startHeaderSection();
4379  ol.startTitleHead(QCString());
4380  ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
4381  Doxygen::mainPage.get(),0,Doxygen::mainPage->title(),TRUE,FALSE,
4382  QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
4383  headerWritten = TRUE;
4384  }
4385  }
4386  else
4387  {
4388  if (!projectName.isEmpty())
4389  {
4390  ol.startHeaderSection();
4391  ol.startTitleHead(QCString());
4392  ol.parseText(projPrefix+theTranslator->trDocumentation());
4393  headerWritten = TRUE;
4394  }
4395  }
4396  if (headerWritten)
4397  {
4398  ol.endTitleHead(QCString(),QCString());
4399  ol.endHeaderSection();
4400  }
4401 
4402  ol.startContents();
4403  if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==0)
4404  {
4406  }
4407 
4408  if (Doxygen::mainPage)
4409  {
4411  if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections())
4412  {
4413  Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4414  }
4415 
4416  ol.startTextBlock();
4417  ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,
4418  Doxygen::mainPage->documentation(),TRUE,FALSE,
4419  QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
4420  ol.endTextBlock();
4421  ol.endPageDoc();
4422 
4424  }
4425 
4426  endFile(ol);
4428 
4429  //--------------------------------------------------------------------
4430  // write LaTeX/RTF index
4431  //--------------------------------------------------------------------
4435 
4436  ol.startFile("refman",QCString(),QCString());
4440 
4441  if (projPrefix.isEmpty())
4442  {
4444  }
4445  else
4446  {
4447  ol.parseText(projPrefix);
4448  }
4449 
4450  if (!Config_getString(PROJECT_NUMBER).isEmpty())
4451  {
4452  ol.startProjectNumber();
4453  ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,Config_getString(PROJECT_NUMBER),FALSE,FALSE,
4454  QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
4455  ol.endProjectNumber();
4456  }
4463 
4464  ol.lastIndexPage();
4465  if (Doxygen::mainPage)
4466  {
4468  if (mainPageHasTitle())
4469  {
4470  ol.parseText(Doxygen::mainPage->title());
4471  }
4472  else
4473  {
4474  ol.parseText(/*projPrefix+*/theTranslator->trMainPage());
4475  }
4477  }
4478  if (documentedPages>0)
4479  {
4480  //ol.parseText(projPrefix+theTranslator->trPageDocumentation());
4481  //ol.endIndexSection(isPageDocumentation);
4482  bool first=Doxygen::mainPage==0;
4483  for (const auto &pd : *Doxygen::pageLinkedMap)
4484  {
4485  if (!pd->getGroupDef() && !pd->isReference() &&
4486  (!pd->hasParentPage() || // not inside other page
4487  (Doxygen::mainPage.get()==pd->getOuterScope())) // or inside main page
4488  )
4489  {
4490  bool isCitationPage = pd->name()=="citelist";
4491  if (isCitationPage)
4492  {
4493  // For LaTeX the bibliograph is already written by \bibliography
4494  ol.pushGeneratorState();
4496  }
4497  title = pd->title();
4498  if (title.isEmpty()) title=pd->name();
4499 
4502  ol.parseText(title);
4505 
4506  ol.pushGeneratorState(); // write TOC title (RTF only)
4509  ol.parseText(title);
4511  ol.popGeneratorState();
4512 
4513  ol.writeAnchor(QCString(),pd->getOutputFileBase());
4514 
4515  ol.writePageLink(pd->getOutputFileBase(),first);
4516  first=FALSE;
4517 
4518  if (isCitationPage)
4519  {
4520  ol.popGeneratorState();
4521  }
4522  }
4523  }
4524  }
4525 
4527  if (!Config_getBool(LATEX_HIDE_INDICES))
4528  {
4529  //if (indexedPages>0)
4530  //{
4531  // ol.startIndexSection(isPageIndex);
4532  // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
4533  // ol.endIndexSection(isPageIndex);
4534  //}
4535  if (documentedGroups>0)
4536  {
4538  ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
4540  }
4541  if (Config_getBool(SHOW_NAMESPACES) && (documentedNamespaces>0))
4542  {
4544  ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
4546  }
4547  if (documentedConcepts>0)
4548  {
4550  ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
4552  }
4553  if (hierarchyInterfaces>0)
4554  {
4556  ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
4558  }
4559  if (hierarchyClasses>0)
4560  {
4562  ol.parseText(/*projPrefix+*/
4563  (fortranOpt ? theTranslator->trCompoundIndexFortran() :
4564  vhdlOpt ? theTranslator->trHierarchicalIndex() :
4566  ));
4568  }
4569  if (hierarchyExceptions>0)
4570  {
4572  ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
4574  }
4576  {
4578  ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
4580  }
4582  {
4584  ol.parseText(/*projPrefix+*/
4585  (fortranOpt ? theTranslator->trCompoundIndexFortran() :
4586  vhdlOpt ? theTranslator->trDesignUnitIndex() :
4588  ));
4590  }
4592  {
4594  ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
4596  }
4598  {
4600  ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
4602  }
4603  if (documentedFiles>0)
4604  {
4606  ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
4608  }
4609  }
4611 
4612  if (documentedGroups>0)
4613  {
4615  ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
4617  }
4618  if (documentedNamespaces>0)
4619  {
4623  }
4624  if (documentedConcepts>0)
4625  {
4627  ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
4629  }
4631  {
4633  ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
4635  }
4637  {
4639  ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
4641  }
4643  {
4645  ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
4647  }
4649  {
4651  ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
4653  }
4654  if (documentedFiles>0)
4655  {
4657  ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
4659  }
4660  if (!Doxygen::exampleLinkedMap->empty())
4661  {
4663  ol.parseText(/*projPrefix+*/theTranslator->trExampleDocumentation());
4665  }
4667  endFile(ol);
4668 
4669  if (Doxygen::mainPage)
4670  {
4673  startFile(ol,Doxygen::mainPage->name(),QCString(),Doxygen::mainPage->title());
4674  ol.startContents();
4675  ol.startTextBlock();
4676  ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,
4677  Doxygen::mainPage->documentation(),FALSE,FALSE,
4678  QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
4679  );
4680  ol.endTextBlock();
4681  endFile(ol);
4684  }
4685 
4686  ol.popGeneratorState();
4687 }
4688 
4689 static std::vector<bool> indexWritten;
4690 
4692 {
4693  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
4694  for (const auto &lne : entries)
4695  {
4696  LayoutNavEntry::Kind kind = lne->kind();
4697  uint index = (uint)kind;
4698  if (index>=indexWritten.size())
4699  {
4700  size_t i;
4701  size_t oldSize = indexWritten.size();
4702  size_t newSize = index+1;
4703  indexWritten.resize(newSize);
4704  for (i=oldSize;i<newSize;i++) indexWritten.at(i)=FALSE;
4705  }
4706  //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
4707  bool addToIndex=lne->visible();
4708  bool needsClosing=FALSE;
4709  if (!indexWritten.at(index))
4710  {
4711  switch(kind)
4712  {
4714  msg("Generating index page...\n");
4715  writeIndex(ol);
4716  break;
4717  case LayoutNavEntry::Pages:
4718  msg("Generating page index...\n");
4719  writePageIndex(ol);
4720  break;
4722  msg("Generating module index...\n");
4723  writeGroupIndex(ol);
4724  break;
4726  {
4727  static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
4728  if (showNamespaces)
4729  {
4730  if (documentedNamespaces>0 && addToIndex)
4731  {
4732  Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
4734  needsClosing=TRUE;
4735  }
4736  if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
4737  {
4738  msg("Generating namespace index...\n");
4739  writeNamespaceIndex(ol);
4740  }
4741  }
4742  }
4743  break;
4745  {
4746  static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
4747  if (showNamespaces)
4748  {
4749  msg("Generating namespace index...\n");
4750  writeNamespaceIndex(ol);
4751  }
4752  }
4753  break;
4755  msg("Generating namespace member index...\n");
4757  break;
4759  if (annotatedClasses>0 && addToIndex)
4760  {
4761  Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
4763  needsClosing=TRUE;
4764  }
4765  if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
4766  {
4767  msg("Generating annotated compound index...\n");
4768  writeAnnotatedIndex(ol);
4769  }
4770  break;
4772  msg("Generating concept index...\n");
4773  writeConceptIndex(ol);
4774  break;
4776  msg("Generating annotated compound index...\n");
4777  writeAnnotatedIndex(ol);
4778  break;
4780  msg("Generating alphabetical compound index...\n");
4782  break;
4784  msg("Generating hierarchical class index...\n");
4786  if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
4787  {
4788  msg("Generating graphical class hierarchy...\n");
4790  }
4791  break;
4793  if (!sliceOpt)
4794  {
4795  msg("Generating member index...\n");
4797  }
4798  break;
4800  if (sliceOpt && annotatedInterfaces>0 && addToIndex)
4801  {
4802  Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
4804  needsClosing=TRUE;
4805  }
4806  break;
4808  if (sliceOpt)
4809  {
4810  msg("Generating annotated interface index...\n");
4812  }
4813  break;
4815  if (sliceOpt)
4816  {
4817  msg("Generating alphabetical interface index...\n");
4819  }
4820  break;
4822  if (sliceOpt)
4823  {
4824  msg("Generating hierarchical interface index...\n");
4826  if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
4827  {
4828  msg("Generating graphical interface hierarchy...\n");
4830  }
4831  }
4832  break;
4834  if (sliceOpt && annotatedStructs>0 && addToIndex)
4835  {
4836  Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
4838  needsClosing=TRUE;
4839  }
4840  break;
4842  if (sliceOpt)
4843  {
4844  msg("Generating annotated struct index...\n");
4846  }
4847  break;
4849  if (sliceOpt)
4850  {
4851  msg("Generating alphabetical struct index...\n");
4853  }
4854  break;
4856  if (sliceOpt && annotatedExceptions>0 && addToIndex)
4857  {
4858  Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
4860  needsClosing=TRUE;
4861  }
4862  break;
4864  if (sliceOpt)
4865  {
4866  msg("Generating annotated exception index...\n");
4868  }
4869  break;
4871  if (sliceOpt)
4872  {
4873  msg("Generating alphabetical exception index...\n");
4875  }
4876  break;
4878  if (sliceOpt)
4879  {
4880  msg("Generating hierarchical exception index...\n");
4882  if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
4883  {
4884  msg("Generating graphical exception hierarchy...\n");
4886  }
4887  }
4888  break;
4889  case LayoutNavEntry::Files:
4890  {
4891  if (documentedFiles>0 && addToIndex)
4892  {
4893  Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
4895  needsClosing=TRUE;
4896  }
4897  if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
4898  {
4899  msg("Generating file index...\n");
4900  writeFileIndex(ol);
4901  }
4902  }
4903  break;
4905  msg("Generating file index...\n");
4906  writeFileIndex(ol);
4907  break;
4909  msg("Generating file member index...\n");
4911  break;
4913  msg("Generating example index...\n");
4914  writeExampleIndex(ol);
4915  break;
4916  case LayoutNavEntry::User:
4917  {
4918  // prepend a ! or ^ marker to the URL to avoid tampering with it
4919  QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
4920  bool isRelative=url.at(0)=='!';
4921  if (!url.isEmpty() && !isRelative) // absolute URL
4922  {
4923  url.prepend("^"); // prepend ^ to absolute URL
4924  }
4925  bool isRef = lne->baseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref";
4926  Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),url,QCString(),FALSE,isRef || isRelative);
4927  }
4928  break;
4930  if (addToIndex)
4931  {
4932  QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
4933  if (!url.isEmpty())
4934  {
4935  if (url=="![none]")
4936  {
4938  }
4939  else
4940  {
4941  bool isRelative=url.at(0)=='!';
4942  if (!isRelative) // absolute URL
4943  {
4944  url.prepend("^"); // prepend ^ to absolute URL
4945  }
4946  bool isRef = lne->baseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref";
4947  Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),url,QCString(),FALSE,isRef || isRelative);
4948  }
4949  }
4950  else
4951  {
4952  Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
4953  }
4955  needsClosing=TRUE;
4956  }
4957  writeUserGroupStubPage(ol,lne.get());
4958  break;
4959  case LayoutNavEntry::None:
4960  assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
4961  break;
4962  }
4963  if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
4964  {
4965  indexWritten.at(index)=TRUE;
4966  }
4967  }
4968  writeIndexHierarchyEntries(ol,lne->children());
4969  if (needsClosing)
4970  {
4971  switch(kind)
4972  {
4975  case LayoutNavEntry::Files:
4978  break;
4979  default:
4980  break;
4981  }
4982  }
4983  //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
4984  }
4985 }
4986 
4988 {
4989  static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
4990  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
4991  switch (kind)
4992  {
4993  case LayoutNavEntry::MainPage: return TRUE;
4994  case LayoutNavEntry::User: return TRUE;
4995  case LayoutNavEntry::UserGroup: return TRUE;
4996  case LayoutNavEntry::Pages: return indexedPages>0;
4998  case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces;
4999  case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces;
5006  case LayoutNavEntry::ClassMembers: return documentedClassMembers[CMHL_All]>0 && !sliceOpt;
5018  case LayoutNavEntry::Files: return documentedFiles>0;
5022  case LayoutNavEntry::None: // should never happen, means not properly initialized
5023  assert(kind != LayoutNavEntry::None);
5024  return FALSE;
5025  }
5026  return FALSE;
5027 }
5028 
5029 template<class T,std::size_t total>
5030 void renderMemberIndicesAsJs(std::ostream &t,
5031  const int *numDocumented,
5032  const std::array<MemberIndexMap,total> &memberLists,
5033  const T *(*getInfo)(size_t hl))
5034 {
5035  // index items per category member lists
5036  bool firstMember=TRUE;
5037  for (std::size_t i=0;i<total;i++)
5038  {
5039  if (numDocumented[i]>0)
5040  {
5041  t << ",";
5042  if (firstMember)
5043  {
5044  t << "children:[";
5045  firstMember=FALSE;
5046  }
5047  t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5048  << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5049 
5050  // Check if we have many members, then add sub entries per letter...
5051  // quick alphabetical index
5052  bool quickIndex = numDocumented[i]>maxItemsBeforeQuickIndex;
5053  if (quickIndex)
5054  {
5055  bool multiPageIndex=FALSE;
5056  if (numDocumented[i]>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5057  {
5058  multiPageIndex=TRUE;
5059  }
5060  t << ",children:[\n";
5061  bool firstLetter=TRUE;
5062  for (const auto &kv : memberLists[i])
5063  {
5064  if (!firstLetter) t << ",\n";
5065  std::string letter = kv.first;
5066  QCString ci(letter);
5067  QCString is(letterToLabel(ci));
5068  QCString anchor;
5070  QCString fullName = getInfo(i)->fname;
5071  if (!multiPageIndex || firstLetter)
5072  anchor=fullName+extension+"#index_";
5073  else // other pages of multi page index
5074  anchor=fullName+"_"+is+extension+"#index_";
5075  t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5076  << convertToJSString(anchor+convertToId(is)) << "\"}";
5077  firstLetter=FALSE;
5078  }
5079  t << "]";
5080  }
5081  t << "}";
5082  }
5083  }
5084  if (!firstMember)
5085  {
5086  t << "]";
5087  }
5088 }
5089 
5090 static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5091 {
5092  int count=0;
5093  for (const auto &entry : root->children())
5094  {
5095  if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5096  }
5097  if (count>0) // at least one item is visible
5098  {
5099  bool firstChild = TRUE;
5100  if (!first) t << ",";
5101  t << "children:[\n";
5102  for (const auto &entry : root->children())
5103  {
5104  if (entry->visible() && quickLinkVisible(entry->kind()))
5105  {
5106  if (!firstChild) t << ",\n";
5107  firstChild=FALSE;
5108  QCString url = entry->url();
5109  t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5110  << convertToJSString(url) << "\"";
5111  bool hasChildren=FALSE;
5112  if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5113  {
5116  }
5117  else if (entry->kind()==LayoutNavEntry::ClassMembers)
5118  {
5121  }
5122  else if (entry->kind()==LayoutNavEntry::FileGlobals)
5123  {
5126  }
5127  else // recursive into child list
5128  {
5129  hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5130  }
5131  if (hasChildren) t << "]";
5132  t << "}";
5133  }
5134  }
5135  }
5136  return count>0;
5137 }
5138 
5139 static void writeMenuData()
5140 {
5141  if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5142  QCString outputDir = Config_getBool(HTML_OUTPUT);
5144  std::ofstream t(outputDir.str()+"/menudata.js",std::ofstream::out | std::ofstream::binary);
5145  if (t.is_open())
5146  {
5148  t << "var menudata={";
5149  bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5150  if (hasChildren) t << "]";
5151  t << "}\n";
5152  }
5153 }
5154 
5156 {
5157  writeMenuData();
5159  if (lne)
5160  {
5162  }
5163 }
MemberIndexMap
std::map< std::string, MemberIndexList > MemberIndexMap
Definition: index.cpp:148
LayoutDocEntry::GroupPageDocs
@ GroupPageDocs
Definition: layout.h:65
getDotImageExtension
QCString getDotImageExtension()
Definition: util.cpp:7032
OutputList::disableAllBut
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:76
LayoutNavEntry::Interfaces
@ Interfaces
Definition: layout.h:142
writeAlphabeticalClassList
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int annotatedCount)
Definition: index.cpp:2072
Translator::trConstants
virtual QCString trConstants()=0
annotatedClassesPrinted
int annotatedClassesPrinted
Definition: index.cpp:57
writeAlphabeticalStructIndex
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition: index.cpp:2287
OutputList::endIndexList
void endIndexList()
Definition: outputlist.h:119
isExampleDocumentation
@ isExampleDocumentation
Definition: index.h:134
startTitle
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition: index.cpp:219
DefinitionMutable::writeSummaryLinks
virtual void writeSummaryLinks(OutputList &) const =0
outputlist.h
LinkedRefMap::empty
bool empty() const
Definition: linkedmap.h:374
MemberDef::isTypedef
virtual bool isTypedef() const =0
namespaceHasNestedConcept
bool namespaceHasNestedConcept(const NamespaceDef *nd)
Definition: namespacedef.cpp:1646
GroupDef::getConcepts
virtual const ConceptLinkedRefMap & getConcepts() const =0
writeAnnotatedExceptionIndex
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition: index.cpp:2487
OutputList::endIndexKey
void endIndexKey()
Definition: outputlist.h:123
hasVisibleRoot
bool hasVisibleRoot(const BaseClassList &bcl)
Definition: classdef.cpp:4980
NamespaceDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
LayoutNavEntry
Base class for the layout of a navigation item at the top of the HTML pages.
Definition: layout.h:125
OutputList::endIndexValue
void endIndexValue(const QCString &name, bool b)
Definition: outputlist.h:127
Translator::trClassHierarchyDescription
virtual QCString trClassHierarchyDescription()=0
HLI_Functions
@ HLI_Functions
Definition: index.h:161
Translator::trCompoundMembers
virtual QCString trCompoundMembers()=0
AnnotatedIndexContext::fallbackKind
const LayoutNavEntry::Kind fallbackKind
Definition: index.cpp:2362
Translator::trModulesDescription
virtual QCString trModulesDescription()=0
HLI_Classes
@ HLI_Classes
Definition: index.h:150
Translator::trSubprograms
virtual QCString trSubprograms()=0
FmhlInfo::FmhlInfo
FmhlInfo(const char *fn, const QCString &t)
Definition: index.cpp:3113
FileDef::getSourceFileBase
virtual QCString getSourceFileBase() const =0
writeAnnotatedClassList
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
Definition: index.cpp:1944
documentedDirs
int documentedDirs
Definition: index.cpp:76
writeConceptIndex
static void writeConceptIndex(OutputList &ol)
Definition: index.cpp:4159
ClassDefMutable
Definition: classdef.h:384
Translator::trGeneratedBy
virtual QCString trGeneratedBy()=0
writeFileIndex
static void writeFileIndex(OutputList &ol)
Definition: index.cpp:1370
htmlhelp.h
endTitle
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition: index.cpp:228
NmhlInfo::NmhlInfo
NmhlInfo(const char *fn, const QCString &t)
Definition: index.cpp:3284
QCString::replace
QCString & replace(size_t index, size_t len, const char *s)
Definition: qcstring.cpp:207
LayoutDocManager::rootNavEntry
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition: layout.cpp:1585
Doxygen::mainPage
static std::unique_ptr< PageDef > mainPage
Definition: doxygen.h:83
isNamespaceIndex
@ isNamespaceIndex
Definition: index.h:122
NamespaceMemberHighlight
NamespaceMemberHighlight
Definition: index.h:205
isId1
bool isId1(int c)
Definition: index.cpp:2018
NmhlInfo
Helper class representing a namespace member in the navigation menu.
Definition: index.cpp:3282
CMHL_EnumValues
@ CMHL_EnumValues
Definition: index.h:184
CMHL_Functions
@ CMHL_Functions
Definition: index.h:180
AnnotatedIndexContext::hiItem
const HighlightedItem hiItem
Definition: index.cpp:2367
FileDef::generateSourceFile
virtual bool generateSourceFile() const =0
Translator::trLegendDocs
virtual QCString trLegendDocs()=0
LayoutDocEntry::GroupConcepts
@ GroupConcepts
Definition: layout.h:63
LayoutNavEntry::ExceptionList
@ ExceptionList
Definition: layout.h:150
Translator::trFileMembersDescription
virtual QCString trFileMembersDescription(bool extractAll)=0
convertUTF8ToLower
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
Translator::trNamespaceDocumentation
virtual QCString trNamespaceDocumentation()=0
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
Translator::trFunctionAndProc
virtual QCString trFunctionAndProc()=0
writeClassLinkForMember
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
Definition: index.cpp:2500
MemberDef::isSignal
virtual bool isSignal() const =0
LayoutDocEntry::GroupFiles
@ GroupFiles
Definition: layout.h:64
hierarchyInterfaces
int hierarchyInterfaces
Definition: index.cpp:61
documentedClassMembers
int documentedClassMembers[CMHL_Total]
Definition: index.cpp:71
NamespaceDef::localName
virtual QCString localName() const =0
VhdlDocGen::getProtectionName
static QCString getProtectionName(int prot)
Definition: vhdldocgen.cpp:1055
NamespaceDef
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
countNamespaces
static int countNamespaces()
Definition: index.cpp:1497
OutputList::startIndexItem
void startIndexItem(const QCString &ref, const QCString &file)
Definition: outputlist.h:133
LayoutDocEntry::MemberDef
@ MemberDef
Definition: layout.h:38
Translator::trFileList
virtual QCString trFileList()=0
PageDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
LayoutNavEntry::Kind
Kind
Definition: layout.h:128
countClassHierarchy
static int countClassHierarchy(ClassDef::CompoundType ct)
Definition: index.cpp:935
GroupDef::getClasses
virtual const ClassLinkedRefMap & getClasses() const =0
LayoutDocEntry::FileClasses
@ FileClasses
Definition: layout.h:57
Translator::trClassDocumentation
virtual QCString trClassDocumentation()=0
writeUserGroupStubPage
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition: index.cpp:4265
HLI_Modules
@ HLI_Modules
Definition: index.h:144
OutputList::docify
void docify(const QCString &s)
Definition: outputlist.h:137
addClassMemberNameToIndex
void addClassMemberNameToIndex(const MemberDef *md)
Definition: index.cpp:2659
pagedef.h
writeConceptList
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition: index.cpp:4060
HLI_AnnotatedStructs
@ HLI_AnnotatedStructs
Definition: index.h:157
getNmhlInfo
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition: index.cpp:3289
writeClassTreeInsideNamespaceElement
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition: index.cpp:1722
Doxygen::hiddenClassLinkedMap
static ClassLinkedMap * hiddenClassLinkedMap
Definition: doxygen.h:79
isFileIndex
@ isFileIndex
Definition: index.h:126
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
HLI_InterfaceHierarchy
@ HLI_InterfaceHierarchy
Definition: index.h:148
OutputList::endTitleHead
void endTitleHead(const QCString &fileName, const QCString &name)
Definition: outputlist.h:101
OutputList::lastIndexPage
void lastIndexPage()
Definition: outputlist.h:413
annotatedInterfaces
int annotatedInterfaces
Definition: index.cpp:59
NamespaceDef::getExceptions
virtual ClassLinkedRefMap getExceptions() const =0
isCompoundIndex
@ isCompoundIndex
Definition: index.h:125
dotlegendgraph.h
LayoutDocManager::File
@ File
Definition: layout.h:203
annotatedInterfacesPrinted
int annotatedInterfacesPrinted
Definition: index.cpp:60
Doxygen::conceptLinkedMap
static ConceptLinkedMap * conceptLinkedMap
Definition: doxygen.h:80
writeIndex
static void writeIndex(OutputList &ol)
Definition: index.cpp:4302
isTitlePageStart
@ isTitlePageStart
Definition: index.h:117
writeDirHierarchy
static void writeDirHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition: index.cpp:717
writeIndexHierarchyEntries
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition: index.cpp:4691
writeNamespaceTree
static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition: index.cpp:1701
Translator::trSequences
virtual QCString trSequences()=0
Definition::getDefLine
virtual int getDefLine() const =0
DirDef
A model of a directory symbol.
Definition: dirdef.h:110
endQuickIndexList
static void endQuickIndexList(OutputList &ol)
Definition: index.cpp:186
writeNamespaceLinkForMember
static void writeNamespaceLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
Definition: index.cpp:2528
filterTitle
QCString filterTitle(const QCString &title)
Definition: util.cpp:6254
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
LayoutNavEntry::find
LayoutNavEntry * find(LayoutNavEntry::Kind k, const QCString &file=QCString()) const
Definition: layout.cpp:107
classHasVisibleChildren
bool classHasVisibleChildren(const ClassDef *cd)
Definition: classdef.cpp:4991
index.h
writeClassTreeToOutput
static void writeClassTreeToOutput(OutputList &ol, const BaseClassList &bcl, int level, FTVHelp *ftv, bool addToIndex, ClassDefSet &visitedClasses)
Definition: index.cpp:426
initFileMemberIndices
void initFileMemberIndices()
Definition: index.cpp:2801
Translator::trConceptDocumentation
virtual QCString trConceptDocumentation()=0
LayoutNavEntry::FileList
@ FileList
Definition: layout.h:154
dotgfxhierarchytable.h
LayoutNavEntry::User
@ User
Definition: layout.h:157
Translator::trModules
virtual QCString trModules()=0
Doxygen::pageLinkedMap
static PageLinkedMap * pageLinkedMap
Definition: doxygen.h:82
namespacedef.h
Doxygen::indexList
static IndexList * indexList
Definition: doxygen.h:114
GroupDef::groupTitle
virtual QCString groupTitle() const =0
writeExampleIndex
static void writeExampleIndex(OutputList &ol)
Definition: index.cpp:3457
Definition::TypePage
@ TypePage
Definition: definition.h:93
ClassDef::CompoundType
CompoundType
The various compound types
Definition: classdef.h:107
documentedFileMembers
int documentedFileMembers[FMHL_Total]
Definition: index.cpp:72
OutputList::writeSplitBar
void writeSplitBar(const QCString &name)
Definition: outputlist.h:351
namespaceHasNestedClass
bool namespaceHasNestedClass(const NamespaceDef *nd, bool filterClasses, ClassDef::CompoundType ct)
Definition: namespacedef.cpp:1666
OutputList::writeString
void writeString(const QCString &text)
Definition: outputlist.h:111
LinkedMap::empty
bool empty() const
Definition: linkedmap.h:222
writeDirTreeNode
static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
Definition: index.cpp:570
ClassDef::Interface
@ Interface
Definition: classdef.h:110
IndexList::decContentsDepth
void decContentsDepth()
Definition: index.h:95
VhdlDocGen::PACKAGECLASS
@ PACKAGECLASS
Definition: vhdldocgen.h:77
NamespaceDef::getInterfaces
virtual ClassLinkedRefMap getInterfaces() const =0
PageDef::getSubPages
virtual const PageLinkedRefMap & getSubPages() const =0
GroupDef::getFiles
virtual const FileList & getFiles() const =0
GroupDef::getMemberList
virtual MemberList * getMemberList(MemberListType lt) const =0
OutputList::endProjectNumber
void endProjectNumber()
Definition: outputlist.h:84
SrcLangExt
SrcLangExt
Language as given by extension
Definition: types.h:41
LayoutNavEntry::StructList
@ StructList
Definition: layout.h:147
Translator::trTypeDocumentation
virtual QCString trTypeDocumentation()=0
FTVHelp::addContentsItem
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:210
writeGraphicalClassHierarchy
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition: index.cpp:1027
AnnotatedIndexContext::listDefaultIntroText
const QCString listDefaultIntroText
Definition: index.cpp:2364
CMHL_Typedefs
@ CMHL_Typedefs
Definition: index.h:182
HLI_UserGroup
@ HLI_UserGroup
Definition: index.h:166
Doxygen::globalScope
static NamespaceDefMutable * globalScope
Definition: doxygen.h:102
HLI_Globals
@ HLI_Globals
Definition: index.h:162
namespaceHasNestedNamespace
bool namespaceHasNestedNamespace(const NamespaceDef *nd)
Definition: namespacedef.cpp:1634
AnnotatedIndexContext::AnnotatedIndexContext
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:2347
Translator::trExceptionHierarchyDescription
virtual QCString trExceptionHierarchyDescription()=0
FTVHelp::incContentsDepth
void incContentsDepth()
Definition: ftvhelp.cpp:168
QCString::str
std::string str() const
Definition: qcstring.h:442
LinkedMap< ClassDef >::Ptr
std::unique_ptr< ClassDef > Ptr
Definition: linkedmap.h:51
FTVHelp::decContentsDepth
void decContentsDepth()
Definition: ftvhelp.cpp:179
Translator::trNamespaceMemberDescription
virtual QCString trNamespaceMemberDescription(bool extractAll)=0
LayoutNavEntry::UserGroup
@ UserGroup
Definition: layout.h:158
annotatedExceptions
int annotatedExceptions
Definition: index.cpp:64
MemberIndexMap_add
void MemberIndexMap_add(MemberIndexMap &map, const std::string &letter, const MemberDef *md)
Definition: index.cpp:154
Translator::trRelatedPages
virtual QCString trRelatedPages()=0
startQuickIndexList
static void startQuickIndexList(OutputList &ol, bool letterTabs=FALSE)
Definition: index.cpp:173
ClassDef::isLinkableInProject
virtual bool isLinkableInProject() const =0
returns TRUE iff a link is possible to this item within this project.
LayoutDocEntry::NamespaceClasses
@ NamespaceClasses
Definition: layout.h:53
Definition::TypeGroup
@ TypeGroup
Definition: definition.h:91
LayoutDocEntry::GroupClasses
@ GroupClasses
Definition: layout.h:63
isClassDocumentation
@ isClassDocumentation
Definition: index.h:131
isModuleDocumentation
@ isModuleDocumentation
Definition: index.h:128
OutputList::startItemList
void startItemList()
Definition: outputlist.h:129
OutputList::writeGraphicalHierarchy
void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
Definition: outputlist.h:407
HLI_Examples
@ HLI_Examples
Definition: index.h:164
isConceptIndex
@ isConceptIndex
Definition: index.h:123
FTVHelp::generateTreeViewInline
void generateTreeViewInline(TextStream &t)
Definition: ftvhelp.cpp:787
correctURL
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition: util.cpp:6573
Translator::trDocumentation
virtual QCString trDocumentation()=0
Translator::trEnumerationValues
virtual QCString trEnumerationValues()=0
Translator::trEvents
virtual QCString trEvents()=0
Translator::trConceptIndex
virtual QCString trConceptIndex()=0
Translator::trEnumerations
virtual QCString trEnumerations()=0
FileDef::isLinkableInProject
virtual bool isLinkableInProject() const =0
countRelatedPages
static void countRelatedPages(int &docPages, int &indexPages)
Definition: index.cpp:3522
ClassDef::isVisibleInHierarchy
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
GroupDef::getSubGroups
virtual const GroupList & getSubGroups() const =0
AnnotatedIndexContext::numPrinted
const int numPrinted
Definition: index.cpp:2360
Translator::trInterfaceHierarchy
virtual QCString trInterfaceHierarchy()=0
QCString::at
char & at(size_t i)
Returns a reference to the character at index i.
Definition: qcstring.h:477
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
Doxygen::dirLinkedMap
static DirLinkedMap * dirLinkedMap
Definition: doxygen.h:109
LayoutNavEntry::Exceptions
@ Exceptions
Definition: layout.h:149
ClassDef::protection
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
LayoutDocManager::Class
@ Class
Definition: layout.h:203
QCString::find
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:38
endQuickIndexItem
static void endQuickIndexItem(OutputList &ol)
Definition: index.cpp:205
g_namespaceIndexLetterUsed
static std::array< MemberIndexMap, NMHL_Total > g_namespaceIndexLetterUsed
Definition: index.cpp:152
Translator::trRelatedPagesDescription
virtual QCString trRelatedPagesDescription()=0
getCmhlInfo
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition: index.cpp:2941
LayoutDocEntryMemberDef::type
MemberListType type
Definition: layout.h:116
Definition::briefLine
virtual int briefLine() const =0
MemberDef::isDictionary
virtual bool isDictionary() const =0
OutputList::startIndexList
void startIndexList()
Definition: outputlist.h:117
writeAnnotatedStructIndex
static void writeAnnotatedStructIndex(OutputList &ol)
Definition: index.cpp:2473
getResolvedNamespace
NamespaceDef * getResolvedNamespace(const QCString &name)
Definition: namespacedef.cpp:1606
LayoutDocEntry::FileConcepts
@ FileConcepts
Definition: layout.h:57
filename.h
FMHL_All
@ FMHL_All
Definition: index.h:193
OutputList::endTypewriter
void endTypewriter()
Definition: outputlist.h:167
MemberDef::isProperty
virtual bool isProperty() const =0
CMHL_Enums
@ CMHL_Enums
Definition: index.h:183
endFileWithNavPath
void endFileWithNavPath(const Definition *d, OutputList &ol)
Definition: index.cpp:274
ClassDef::isSimple
virtual bool isSimple() const =0
Translator::trGotoGraphicalHierarchy
virtual QCString trGotoGraphicalHierarchy()=0
ClassDef::Class
@ Class
Definition: classdef.h:107
GroupDef::isASubGroup
virtual bool isASubGroup() const =0
MemberDef::getReference
virtual QCString getReference() const =0
Translator::trFileDocumentation
virtual QCString trFileDocumentation()=0
SectionInfo::label
QCString label() const
Definition: section.h:65
AnnotatedIndexContext::fileBaseName
const QCString fileBaseName
Definition: index.cpp:2366
NamespaceLinkedRefMap
Definition: namespacedef.h:45
PageDef::hasSubPages
virtual bool hasSubPages() const =0
warn
void warn(const QCString &file, int line, const char *fmt,...)
Definition: message.cpp:151
writeConceptRootList
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition: index.cpp:4138
Definition::getLanguage
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
AlphaIndexTableCell::letter
std::string letter() const
Definition: index.cpp:2058
HLI_AnnotatedExceptions
@ HLI_AnnotatedExceptions
Definition: index.h:158
HLI_AnnotatedClasses
@ HLI_AnnotatedClasses
Definition: index.h:155
mainPageHasTitle
bool mainPageHasTitle()
Definition: util.cpp:7027
HLI_ClassHierarchy
@ HLI_ClassHierarchy
Definition: index.h:147
Translator::trInterfaceDocumentation
virtual QCString trInterfaceDocumentation()=0
OutputList::startTypewriter
void startTypewriter()
Definition: outputlist.h:165
MemberDef::isSequence
virtual bool isSequence() const =0
LayoutNavEntry::StructIndex
@ StructIndex
Definition: layout.h:148
OutputList::endTextBlock
void endTextBlock(bool paraBreak=FALSE)
Definition: outputlist.h:411
writeMemberToIndex
static void writeMemberToIndex(const Definition *def, const MemberDef *md, bool addToIndex)
Definition: index.cpp:291
AnnotatedIndexContext
Definition: index.cpp:2345
HLI_Files
@ HLI_Files
Definition: index.h:159
LayoutNavEntry::None
@ None
Definition: layout.h:129
OutputGenerator::RTF
@ RTF
Definition: outputgen.h:333
countClassesInTreeList
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition: index.cpp:911
writeFileLinkForMember
static void writeFileLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevFileName)
Definition: index.cpp:2514
ClassDef::templateMaster
virtual const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
LayoutDocManager::LayoutPart
LayoutPart
Definition: layout.h:201
PageDef
A model of a page symbol.
Definition: pagedef.h:25
GroupDef
A model of a group of symbols.
Definition: groupdef.h:49
LayoutDocManager::Group
@ Group
Definition: layout.h:203
Doxygen::inputNameLinkedMap
static FileNameLinkedMap * inputNameLinkedMap
Definition: doxygen.h:88
Translator::trExceptionList
virtual QCString trExceptionList()=0
LayoutNavEntry::ExceptionHierarchy
@ ExceptionHierarchy
Definition: layout.h:152
writeFileMemberIndex
static void writeFileMemberIndex(OutputList &ol)
Definition: index.cpp:3254
HLI_Concepts
@ HLI_Concepts
Definition: index.h:151
FileDef::includeName
virtual QCString includeName() const =0
AlphaIndexTableCell::row
int row() const
Definition: index.cpp:2059
LayoutDocManager::Namespace
@ Namespace
Definition: layout.h:203
classVisibleInIndex
bool classVisibleInIndex(const ClassDef *cd)
Definition: classdef.cpp:5016
NamespaceDef::isLinkableInProject
virtual bool isLinkableInProject() const =0
uint
unsigned uint
Definition: qcstring.h:40
OutputList::startItemListItem
void startItemListItem()
Definition: outputlist.h:173
MemberDef::anchor
virtual QCString anchor() const =0
LayoutNavEntry::NamespaceMembers
@ NamespaceMembers
Definition: layout.h:135
writeClassTreeInsideNamespace
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition: index.cpp:1794
DirDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
OutputList
Class representing a list of output generators that are written to in parallel.
Definition: outputlist.h:37
ClassDefMutable::setClassName
virtual void setClassName(const QCString &name)=0
writeAnnotatedIndexGeneric
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition: index.cpp:2370
LayoutDocEntryMemberDef
Represents of a member definition list with configurable title.
Definition: layout.h:110
OutputList::endQuickIndices
void endQuickIndices()
Definition: outputlist.h:349
dot.h
LayoutNavEntry::Files
@ Files
Definition: layout.h:153
MemberDef
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
writeClassTree
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition: index.cpp:1525
writeAnnotatedIndex
static void writeAnnotatedIndex(OutputList &ol)
Definition: index.cpp:2445
DirDef::shortName
virtual const QCString shortName() const =0
writeGraphicalExceptionHierarchy
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition: index.cpp:1239
GroupDef::getDirs
virtual const DirList & getDirs() const =0
OutputGenerator::Latex
@ Latex
Definition: outputgen.h:333
createFileDef
FileDef * createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition: filedef.cpp:190
Translator::trExceptionHierarchy
virtual QCString trExceptionHierarchy()=0
isNamespaceDocumentation
@ isNamespaceDocumentation
Definition: index.h:130
OutputList::startQuickIndices
void startQuickIndices()
Definition: outputlist.h:347
Definition::TypeNamespace
@ TypeNamespace
Definition: definition.h:89
ClassDef
A abstract class representing of a compound symbol.
Definition: classdef.h:103
FMHL_Dictionaries
@ FMHL_Dictionaries
Definition: index.h:198
classlist.h
NMHL_Functions
@ NMHL_Functions
Definition: index.h:208
MemberDef::isFriend
virtual bool isFriend() const =0
MAX_ITEMS_BEFORE_QUICK_INDEX
#define MAX_ITEMS_BEFORE_QUICK_INDEX
Definition: index.cpp:53
writeNamespaceTreeElement
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition: index.cpp:1642
OutputList::startTextBlock
void startTextBlock(bool dense=FALSE)
Definition: outputlist.h:409
OutputList::disable
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:100
addNamespaceMemberNameToIndex
void addNamespaceMemberNameToIndex(const MemberDef *md)
Definition: index.cpp:2743
QCString::left
QCString left(size_t len) const
Definition: qcstring.h:212
Translator::trVariables
virtual QCString trVariables()=0
FMHL_Defines
@ FMHL_Defines
Definition: index.h:201
fileVisibleInIndex
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition: util.cpp:6712
MemberVector::empty
bool empty() const
Definition: memberlist.h:47
LayoutNavEntry::Modules
@ Modules
Definition: layout.h:132
message.h
FileDef::name
virtual QCString name() const =0
MemberDef::isDefine
virtual bool isDefine() const =0
Translator::trStructListDescription
virtual QCString trStructListDescription()=0
IndexList::addContentsItem
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex=FALSE, bool addToNavIndex=FALSE, const Definition *def=0)
Definition: index.h:97
NMHL_EnumValues
@ NMHL_EnumValues
Definition: index.h:214
Definition::hasSections
virtual bool hasSections() const =0
MemberDef::isVariable
virtual bool isVariable() const =0
isEndIndex
@ isEndIndex
Definition: index.h:137
MemberDef::enumFieldList
virtual const MemberVector & enumFieldList() const =0
MAX_ITEMS_BEFORE_MULTIPAGE_INDEX
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX
Definition: index.cpp:52
Definition::isAnonymous
virtual bool isAnonymous() const =0
Translator::trCode
virtual QCString trCode()=0
OutputList::writeAnchor
void writeAnchor(const QCString &fileName, const QCString &name)
Definition: outputlist.h:239
Translator::trExamplesDescription
virtual QCString trExamplesDescription()=0
letterToLabel
static QCString letterToLabel(const QCString &startLetter)
Definition: index.cpp:2023
ClassDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
Returns the unique base name (without extension) of the class's file on disk
CmhlInfo::title
QCString title
Definition: index.cpp:2938
DefinitionMutable
Definition: definition.h:308
UsedIndexLetters
std::set< std::string > UsedIndexLetters
Definition: index.cpp:2069
startQuickIndexItem
static void startQuickIndexItem(OutputList &ol, const QCString &l, bool hl, bool compact, bool &first)
Definition: index.cpp:192
LayoutNavEntryList
std::vector< std::unique_ptr< LayoutNavEntry > > LayoutNavEntryList
Definition: layout.h:122
ClassDef::baseClasses
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
Definition::TypeFile
@ TypeFile
Definition: definition.h:88
OutputList::endContents
void endContents()
Definition: outputlist.h:363
writeGraphicalInterfaceHierarchy
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition: index.cpp:1133
get_pointer
const ClassDef * get_pointer(const Ptr &p)
NMHL_Dictionaries
@ NMHL_Dictionaries
Definition: index.h:212
MemberDef::isSlot
virtual bool isSlot() const =0
Translator::trClassHierarchy
virtual QCString trClassHierarchy()=0
OutputList::startHeaderSection
void startHeaderSection()
Definition: outputlist.h:181
VhdlDocGen::ENTITYCLASS
@ ENTITYCLASS
Definition: vhdldocgen.h:74
NamespaceDef::getClasses
virtual ClassLinkedRefMap getClasses() const =0
writeQuickMemberIndex
static void writeQuickMemberIndex(OutputList &ol, const MemberIndexMap &map, const std::string &page, QCString fullName, bool multiPage)
Definition: index.cpp:2905
NamespaceDef::displayName
virtual QCString displayName(bool=TRUE) const =0
hierarchyClasses
int hierarchyClasses
Definition: index.cpp:58
Definition::isVisible
virtual bool isVisible() const =0
sortMemberIndexLists
void sortMemberIndexLists()
Definition: index.cpp:2887
qstricmp
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:433
HLI_Namespaces
@ HLI_Namespaces
Definition: index.h:146
theTranslator
Translator * theTranslator
Definition: language.cpp:156
AnnotatedIndexContext::numAnnotated
const int numAnnotated
Definition: index.cpp:2359
Definition::isReference
virtual bool isReference() const =0
sortMemberIndexList
static void sortMemberIndexList(MemberIndexMap &map)
Definition: index.cpp:2874
writeClassMemberIndexFiltered
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight hl)
Definition: index.cpp:2963
Definition::name
virtual QCString name() const =0
Doxygen::groupLinkedMap
static GroupLinkedMap * groupLinkedMap
Definition: doxygen.h:96
Translator::trInterfaceList
virtual QCString trInterfaceList()=0
Translator::trFileListDescription
virtual QCString trFileListDescription(bool extractAll)=0
ClassDef::getClasses
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
doxygen.h
AlphaIndexTableCell::m_col
int m_col
Definition: index.cpp:2066
AnnotatedIndexContext::listKind
const LayoutNavEntry::Kind listKind
Definition: index.cpp:2361
NMHL_Sequences
@ NMHL_Sequences
Definition: index.h:211
AnnotatedIndexContext::listDefaultTitleText
const QCString listDefaultTitleText
Definition: index.cpp:2363
LayoutNavEntry::Pages
@ Pages
Definition: layout.h:131
JAVASCRIPT_LICENSE_TEXT
const char * JAVASCRIPT_LICENSE_TEXT
Definition: ftvhelp.cpp:42
AlphaIndexTableCell
Class representing a cell in the alphabetical class index.
Definition: index.cpp:2049
documentedConcepts
int documentedConcepts
Definition: index.cpp:69
IndexList::incContentsDepth
void incContentsDepth()
Definition: index.h:93
LayoutNavEntry::intro
QCString intro() const
Definition: layout.h:173
MemberDef::getClassDef
virtual const ClassDef * getClassDef() const =0
getUTF8CharAt
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
Translator::trInterfaceHierarchyDescription
virtual QCString trInterfaceHierarchyDescription()=0
OutputList::startIndexSection
void startIndexSection(IndexSections is)
Definition: outputlist.h:76
language.h
writeMemberList
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition: index.cpp:2542
renderMemberIndicesAsJs
void renderMemberIndicesAsJs(std::ostream &t, const int *numDocumented, const std::array< MemberIndexMap, total > &memberLists, const T *(*getInfo)(size_t hl))
Definition: index.cpp:5030
OutputList::startIndexKey
void startIndexKey()
Definition: outputlist.h:121
writePageIndex
static void writePageIndex(OutputList &ol)
Definition: index.cpp:3611
LayoutNavEntry::Examples
@ Examples
Definition: layout.h:156
LayoutNavEntry::FileGlobals
@ FileGlobals
Definition: layout.h:155
VhdlDocGen::VhdlClasses
VhdlClasses
Definition: vhdldocgen.h:72
getLanguageSpecificSeparator
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang
Definition: util.cpp:6545
Translator::trMainPage
virtual QCString trMainPage()=0
countDataStructures
void countDataStructures()
Definition: index.cpp:87
MemberDef::isFunction
virtual bool isFunction() const =0
OutputList::endParagraph
void endParagraph()
Definition: outputlist.h:109
startFile
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName)
Definition: index.cpp:235
NamespaceDef::getMemberList
virtual MemberList * getMemberList(MemberListType lt) const =0
writeFileMemberIndexFiltered
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
Definition: index.cpp:3141
tooltip.h
NMHL_Variables
@ NMHL_Variables
Definition: index.h:209
Definition::briefDescription
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
TRUE
#define TRUE
Definition: qcstring.h:36
Definition::getOutputFileBase
virtual QCString getOutputFileBase() const =0
GroupDef::getNamespaces
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
MemberVector
A vector of MemberDef object
Definition: memberlist.h:32
MemberDef::getNamespaceDef
virtual const NamespaceDef * getNamespaceDef() const =0
documentedPages
int documentedPages
Definition: index.cpp:75
writeClassTreeForList
static void writeClassTreeForList(OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
Definition: index.cpp:785
OutputList::startProjectNumber
void startProjectNumber()
Definition: outputlist.h:82
IndexList::enable
void enable()
Definition: index.h:83
LayoutNavEntry::InterfaceList
@ InterfaceList
Definition: layout.h:143
writeGroupIndex
static void writeGroupIndex(OutputList &ol)
Definition: index.cpp:3991
LayoutDocEntry::GroupNestedGroups
@ GroupNestedGroups
Definition: layout.h:64
HLI_AnnotatedInterfaces
@ HLI_AnnotatedInterfaces
Definition: index.h:156
filedef.h
writeNamespaceMemberIndexFiltered
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight hl)
Definition: index.cpp:3313
Config_updateBool
#define Config_updateBool(name, value)
Definition: config.h:39
CmhlInfo::CmhlInfo
CmhlInfo(const char *fn, const QCString &t)
Definition: index.cpp:2936
FileDef::getPath
virtual QCString getPath() const =0
isModuleIndex
@ isModuleIndex
Definition: index.h:120
Translator::trConceptList
virtual QCString trConceptList()=0
ClassDef::Struct
@ Struct
Definition: classdef.h:108
renderQuickLinksAsJs
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition: index.cpp:5090
Definition::navigationPathAsString
virtual QCString navigationPathAsString() const =0
HLI_Exceptions
@ HLI_Exceptions
Definition: index.h:154
OutputGenerator::Html
@ Html
Definition: outputgen.h:333
LinkedMap::find
const T * find(const std::string &key) const
Find an object given the key.
Definition: linkedmap.h:60
TextStream::str
std::string str() const
Return the contents of the buffer as a std::string object
Definition: textstream.h:208
Definition::partOfGroups
virtual const GroupList & partOfGroups() const =0
countVisibleMembers
int countVisibleMembers(const NamespaceDef *nd)
Definition: index.cpp:1591
CMHL_Events
@ CMHL_Events
Definition: index.h:186
LayoutNavEntry::visible
bool visible()
Definition: layout.h:175
OutputList::enableAll
void enableAll()
Definition: outputlist.cpp:84
Definition::DefType
DefType
Definition: definition.h:85
NamespaceDef::getNamespaces
virtual NamespaceLinkedRefMap getNamespaces() const =0
Translator::trTypedefs
virtual QCString trTypedefs()=0
isClassHierarchyIndex
@ isClassHierarchyIndex
Definition: index.h:124
getFmhlInfo
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition: index.cpp:3118
addFileMemberNameToIndex
void addFileMemberNameToIndex(const MemberDef *md)
Definition: index.cpp:2811
MemberDef::isStrong
virtual bool isStrong() const =0
indexedPages
int indexedPages
Definition: index.cpp:70
NMHL_Enums
@ NMHL_Enums
Definition: index.h:213
CmhlInfo::fname
const char * fname
Definition: index.cpp:2937
OutputList::startIndexValue
void startIndexValue(bool b)
Definition: outputlist.h:125
mainPageHasOwnTitle
static bool mainPageHasOwnTitle()
Definition: index.cpp:3540
SectionType::Subsection
@ Subsection
memberlist.h
Definition::TypeClass
@ TypeClass
Definition: definition.h:87
Translator::trConceptListDescription
virtual QCString trConceptListDescription(bool extractAll)=0
OutputList::startContents
void startContents()
Definition: outputlist.h:361
Definition::definitionType
virtual DefType definitionType() const =0
ClassDef::subClasses
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class
dirdef.h
OutputList::writeQuickLinks
void writeQuickLinks(bool compact, HighlightedItem hli, const QCString &file)
Definition: outputlist.h:357
NMHL_Typedefs
@ NMHL_Typedefs
Definition: index.h:210
documentedNamespaces
int documentedNamespaces
Definition: index.cpp:68
dirHasVisibleChildren
static bool dirHasVisibleChildren(const DirDef *dd)
Definition: index.cpp:542
OutputList::popGeneratorState
void popGeneratorState()
Definition: outputlist.cpp:134
DotLegendGraph
Representation of a legend explaining the meaning of boxes, arrows, and colors
Definition: dotlegendgraph.h:22
LayoutNavEntry::Structs
@ Structs
Definition: layout.h:146
Definition::briefFile
virtual QCString briefFile() const =0
OutputGenerator::Docbook
@ Docbook
Definition: outputgen.h:333
FMHL_Variables
@ FMHL_Variables
Definition: index.h:195
OutputList::startTextLink
void startTextLink(const QCString &file, const QCString &anchor)
Definition: outputlist.h:152
writeAlphabeticalInterfaceIndex
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition: index.cpp:2258
writeSingleFileIndex
static void writeSingleFileIndex(OutputList &ol, const FileDef *fd)
Definition: index.cpp:1290
documentedFiles
int documentedFiles
Definition: index.cpp:74
MemberDef::isForeign
virtual bool isForeign() const =0
Translator::trExceptionListDescription
virtual QCString trExceptionListDescription()=0
GroupDef::getMemberLists
virtual const MemberLists & getMemberLists() const =0
ClassDef::compoundType
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
getPrefixIndex
int getPrefixIndex(const QCString &name)
Definition: util.cpp:3357
Translator::trCompoundListDescription
virtual QCString trCompoundListDescription()=0
GroupDef::getPages
virtual const PageLinkedRefMap & getPages() const =0
utf8.h
Various UTF8 related helper functions.
Definition::getReference
virtual QCString getReference() const =0
Translator::trProperties
virtual QCString trProperties()=0
fixSpaces
QCString fixSpaces(const QCString &s)
Definition: index.cpp:214
compareFileDefs
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
Definition: filedef.cpp:1771
OutputList::endHeaderSection
void endHeaderSection()
Definition: outputlist.h:183
documentedGroups
int documentedGroups
Definition: index.cpp:67
countAnnotatedClasses
static int countAnnotatedClasses(int *cp, ClassDef::CompoundType ct)
Definition: index.cpp:1919
writeGroupHierarchy
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition: index.cpp:3970
OutputList::endIndexListItem
void endIndexListItem()
Definition: outputlist.h:115
Translator::trGotoTextualHierarchy
virtual QCString trGotoTextualHierarchy()=0
QCString::mid
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition: qcstring.h:224
isTitlePageAuthor
@ isTitlePageAuthor
Definition: index.h:118
substitute
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: qcstring.cpp:465
initNamespaceMemberIndices
void initNamespaceMemberIndices()
Definition: index.cpp:2733
NMHL_All
@ NMHL_All
Definition: index.h:207
writeHierarchicalIndex
static void writeHierarchicalIndex(OutputList &ol)
Definition: index.cpp:945
FmhlInfo::title
QCString title
Definition: index.cpp:3115
LayoutNavEntry::ClassIndex
@ ClassIndex
Definition: layout.h:139
MemberDef::isLinkableInProject
virtual bool isLinkableInProject() const =0
Translator::trExceptionIndex
virtual QCString trExceptionIndex()=0
extractNamespaceName
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
Definition: util.cpp:3733
MemberDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
NamespaceDef::getConcepts
virtual ConceptLinkedRefMap getConcepts() const =0
Translator::trModuleDocumentation
virtual QCString trModuleDocumentation()=0
writeAlphabeticalIndex
static void writeAlphabeticalIndex(OutputList &ol)
Definition: index.cpp:2229
NmhlInfo::fname
const char * fname
Definition: index.cpp:3285
writeMenuData
static void writeMenuData()
Definition: index.cpp:5139
indexWritten
static std::vector< bool > indexWritten
Definition: index.cpp:4689
LayoutNavEntry::Concepts
@ Concepts
Definition: layout.h:136
NamespaceDef::isLinkable
virtual bool isLinkable() const =0
FileDef::isDocumentationFile
virtual bool isDocumentationFile() const =0
writeHierarchicalInterfaceIndex
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition: index.cpp:1053
FMHL_EnumValues
@ FMHL_EnumValues
Definition: index.h:200
FileMemberHighlight
FileMemberHighlight
Definition: index.h:191
isFileDocumentation
@ isFileDocumentation
Definition: index.h:133
OutputList::startTitleHead
void startTitleHead(const QCString &fileName)
Definition: outputlist.h:99
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
LayoutDocEntry::GroupDirs
@ GroupDirs
Definition: layout.h:64
GroupDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
OutputList::endIndexItem
void endIndexItem(const QCString &ref, const QCString &file)
Definition: outputlist.h:135
endIndexHierarchy
static void endIndexHierarchy(OutputList &ol, int level)
Definition: index.cpp:129
layout.h
Translator::trDefines
virtual QCString trDefines()=0
AlphaIndexTableCell::classDef
const ClassDef * classDef() const
Definition: index.cpp:2057
Doxygen::htmlFileExtension
static QCString htmlFileExtension
Definition: doxygen.h:103
CMHL_Properties
@ CMHL_Properties
Definition: index.h:185
MemberDef::getEnumScope
virtual const MemberDef * getEnumScope() const =0
Definition::hasDocumentation
virtual bool hasDocumentation() const =0
SectionManager::instance
static SectionManager & instance()
returns a reference to the singleton
Definition: section.h:172
htmlgen.h
writeGroupTreeNode
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition: index.cpp:3737
MemberDef::isEnumerate
virtual bool isEnumerate() const =0
ClassDef::getReference
virtual QCString getReference() const =0
If this class originated from a tagfile, this will return the tag file reference
msg
void msg(const char *fmt,...)
Definition: message.cpp:53
NMHL_Total
@ NMHL_Total
Definition: index.h:215
MemberListType_documentationLists
@ MemberListType_documentationLists
Definition: types.h:105
writeGraphInfo
void writeGraphInfo(OutputList &ol)
Definition: index.cpp:3686
LayoutDocManager::instance
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition: layout.cpp:1574
Translator::trNamespaceList
virtual QCString trNamespaceList()=0
hex
static const char * hex
Definition: htmldocvisitor.cpp:65
FmhlInfo::fname
const char * fname
Definition: index.cpp:3114
ClassDef::isReference
virtual bool isReference() const =0
Returns TRUE if this class is imported via a tag file
Translator::trCompoundList
virtual QCString trCompoundList()=0
writeIndexHierarchy
void writeIndexHierarchy(OutputList &ol)
Definition: index.cpp:5155
countDirs
static int countDirs()
Definition: index.cpp:3670
OutputList::endIndexSection
void endIndexSection(IndexSections is)
Definition: outputlist.h:78
Definition::getOuterScope
virtual Definition * getOuterScope() const =0
g_classIndexLetterUsed
static std::array< MemberIndexMap, CMHL_Total > g_classIndexLetterUsed
Definition: index.cpp:150
Translator::trModulesIndex
virtual QCString trModulesIndex()=0
MemberDef::isEnumValue
virtual bool isEnumValue() const =0
Translator::trLegendTitle
virtual QCString trLegendTitle()=0
OutputList::parseText
void parseText(const QCString &textStr)
Definition: outputlist.cpp:179
Translator::trAll
virtual QCString trAll()=0
writeAlphabeticalExceptionIndex
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition: index.cpp:2316
CMHL_Variables
@ CMHL_Variables
Definition: index.h:181
isPageDocumentation
@ isPageDocumentation
Definition: index.h:135
isPageDocumentation2
@ isPageDocumentation2
Definition: index.h:136
Translator::trExampleDocumentation
virtual QCString trExampleDocumentation()=0
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
AlphaIndexTableCell::m_row
int m_row
Definition: index.cpp:2065
ConceptLinkedRefMap
Definition: conceptdef.h:67
LayoutNavEntry::ClassList
@ ClassList
Definition: layout.h:138
Translator::trNamespaceListDescription
virtual QCString trNamespaceListDescription(bool extractAll)=0
LayoutNavEntry::Classes
@ Classes
Definition: layout.h:137
MemberDef::getFileDef
virtual const FileDef * getFileDef() const =0
Config_getString
#define Config_getString(name)
Definition: config.h:32
DotLegendGraph::writeGraph
void writeGraph(const QCString &path)
Definition: dotlegendgraph.cpp:26
documentedNamespaceMembers
int documentedNamespaceMembers[NMHL_Total]
Definition: index.cpp:73
AlphaIndexTableCell::AlphaIndexTableCell
AlphaIndexTableCell(int row, int col, const std::string &letter, const ClassDef *cd)
Definition: index.cpp:2052
Definition::getDefFileName
virtual QCString getDefFileName() const =0
SectionInfo
class that provide information about a section.
Definition: section.h:49
annotatedStructs
int annotatedStructs
Definition: index.cpp:62
OutputList::generateDoc
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)
Definition: outputlist.cpp:142
Doxygen::insideMainPage
static bool insideMainPage
Definition: doxygen.h:84
OutputList::endPageDoc
void endPageDoc()
Definition: outputlist.h:367
LayoutNavEntry::NamespaceList
@ NamespaceList
Definition: layout.h:134
writeClassHierarchy
static void writeClassHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
Definition: index.cpp:884
AnnotatedIndexContext::compoundType
const ClassDef::CompoundType compoundType
Definition: index.cpp:2365
isMainPage
@ isMainPage
Definition: index.h:119
CmhlInfo
Helper class representing a class member in the navigation menu.
Definition: index.cpp:2934
LayoutNavEntry::Namespaces
@ Namespaces
Definition: layout.h:133
config.h
Translator::trCompoundMembersDescription
virtual QCString trCompoundMembersDescription(bool extractAll)=0
writeNamespaceMembers
static void writeNamespaceMembers(const NamespaceDef *nd, bool addToIndex)
Definition: index.cpp:1615
OutputList::endFile
void endFile()
Definition: outputlist.h:97
FMHL_Typedefs
@ FMHL_Typedefs
Definition: index.h:196
Doxygen::namespaceLinkedMap
static NamespaceLinkedMap * namespaceLinkedMap
Definition: doxygen.h:97
Translator::trStructIndex
virtual QCString trStructIndex()=0
ClassDef::displayName
virtual QCString displayName(bool includeScope=TRUE) const =0
Returns the name as it is appears in the documentation
ASSERT
#define ASSERT(x)
Definition: qcstring.h:44
quickLinkVisible
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition: index.cpp:4987
OutputList::pushGeneratorState
void pushGeneratorState()
Definition: outputlist.cpp:126
groupdef.h
QCString::data
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:153
initClassMemberIndices
void initClassMemberIndices()
Definition: index.cpp:2649
DirDef::getFiles
virtual const FileList & getFiles() const =0
FmhlInfo
Helper class representing a file member in the navigation menu.
Definition: index.cpp:3111
AlphaIndexTableCell::column
int column() const
Definition: index.cpp:2060
FileDef
A model of a file symbol.
Definition: filedef.h:73
LayoutNavEntry::title
QCString title() const
Definition: layout.h:172
convertToJSString
QCString convertToJSString(const QCString &s)
Definition: util.cpp:4123
PageDef::title
virtual QCString title() const =0
VhdlDocGen::PACKBODYCLASS
@ PACKBODYCLASS
Definition: vhdldocgen.h:75
CMHL_Related
@ CMHL_Related
Definition: index.h:187
g_fileIndexLetterUsed
static std::array< MemberIndexMap, FMHL_Total > g_fileIndexLetterUsed
Definition: index.cpp:151
writeNamespaceMemberIndex
static void writeNamespaceMemberIndex(OutputList &ol)
Definition: index.cpp:3428
Translator::trNamespaceMembers
virtual QCString trNamespaceMembers()=0
Translator::trReferenceManual
virtual QCString trReferenceManual()=0
Translator::trFunctions
virtual QCString trFunctions()=0
HLI_Main
@ HLI_Main
Definition: index.h:143
SrcLangExt_VHDL
@ SrcLangExt_VHDL
Definition: types.h:54
OutputList::endItemListItem
void endItemListItem()
Definition: outputlist.h:175
Translator::trDictionaries
virtual QCString trDictionaries()=0
OutputList::writeFooter
void writeFooter(const QCString &navPath)
Definition: outputlist.h:95
writePages
static void writePages(const PageDef *pd, FTVHelp *ftv)
Definition: index.cpp:3551
stripFromPath
static QCString stripFromPath(const QCString &path, const StringVector &l)
Definition: util.cpp:292
OutputList::startPageDoc
void startPageDoc(const QCString &pageTitle)
Definition: outputlist.h:365
writeNamespaceIndex
static void writeNamespaceIndex(OutputList &ol)
Definition: index.cpp:1812
FMHL_Enums
@ FMHL_Enums
Definition: index.h:199
OutputList::startIndexListItem
void startIndexListItem()
Definition: outputlist.h:113
Translator::trStructList
virtual QCString trStructList()=0
annotatedExceptionsPrinted
int annotatedExceptionsPrinted
Definition: index.cpp:65
HLI_NamespaceMembers
@ HLI_NamespaceMembers
Definition: index.h:160
HLI_Structs
@ HLI_Structs
Definition: index.h:153
countFiles
static void countFiles(int &htmlFiles, int &files)
Definition: index.cpp:1265
ClassMemberHighlight
ClassMemberHighlight
Definition: index.h:177
writeHierarchicalExceptionIndex
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition: index.cpp:1159
FTVHelp
A class that generates a dynamic tree view side panel.
Definition: ftvhelp.h:36
Translator::trDesignUnitIndex
virtual QCString trDesignUnitIndex()=0
annotatedStructsPrinted
int annotatedStructsPrinted
Definition: index.cpp:63
OutputList::writeObjectLink
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition: outputlist.h:141
DotGfxHierarchyTable
Represents a graphical class hierarchy
Definition: dotgfxhierarchytable.h:31
HLI_Interfaces
@ HLI_Interfaces
Definition: index.h:152
IndexList::disable
void disable()
Definition: index.h:81
writeConceptTreeInsideNamespace
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition: index.cpp:4077
hierarchyExceptions
int hierarchyExceptions
Definition: index.cpp:66
toClassDefMutable
ClassDefMutable * toClassDefMutable(Definition *d)
Definition: classdef.cpp:4944
LayoutNavEntry::ClassHierarchy
@ ClassHierarchy
Definition: layout.h:140
Translator::trExceptionDocumentation
virtual QCString trExceptionDocumentation()=0
HLI_ExceptionHierarchy
@ HLI_ExceptionHierarchy
Definition: index.h:149
writeAnnotatedInterfaceIndex
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition: index.cpp:2459
ftvhelp.h
writeClassMemberIndex
static void writeClassMemberIndex(OutputList &ol)
Definition: index.cpp:3082
NamespaceDef::getStructs
virtual ClassLinkedRefMap getStructs() const =0
DirDef::subDirs
virtual const DirList & subDirs() const =0
convertUTF8ToUpper
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
Translator::trInterfaceListDescription
virtual QCString trInterfaceListDescription()=0
LayoutNavEntry::InterfaceIndex
@ InterfaceIndex
Definition: layout.h:144
LinkedRefMap< const ClassDef >::Ptr
const ClassDef * Ptr
Definition: linkedmap.h:234
FMHL_Total
@ FMHL_Total
Definition: index.h:202
MemberIndexList
std::vector< const MemberDef * > MemberIndexList
Definition: index.cpp:147
Translator::trInterfaceIndex
virtual QCString trInterfaceIndex()=0
Translator::trExamples
virtual QCString trExamples()=0
ClassDef::Exception
@ Exception
Definition: classdef.h:113
LayoutDocEntry::ClassNestedClasses
@ ClassNestedClasses
Definition: layout.h:44
LayoutNavEntry::ClassMembers
@ ClassMembers
Definition: layout.h:141
Translator::trCompoundIndexFortran
virtual QCString trCompoundIndexFortran()=0
ClassLinkedMap
Definition: classlist.h:26
Doxygen::classLinkedMap
static ClassLinkedMap * classLinkedMap
Definition: doxygen.h:78
OutputList::startFile
void startFile(const QCString &name, const QCString &manName, const QCString &title)
Definition: outputlist.h:88
writeConceptTreeInsideNamespaceElement
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition: index.cpp:4087
FileDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
countGroups
static int countGroups()
Definition: index.cpp:3654
MemberDef::isRelated
virtual bool isRelated() const =0
Translator::trNamespaceIndex
virtual QCString trNamespaceIndex()=0
util.h
A bunch of utility functions.
LayoutNavEntry::children
const LayoutNavEntryList & children() const
Definition: layout.h:179
FMHL_Functions
@ FMHL_Functions
Definition: index.h:194
LayoutNavEntry::baseFile
QCString baseFile() const
Definition: layout.h:171
MemberDef::typeString
virtual QCString typeString() const =0
Translator::trStructDocumentation
virtual QCString trStructDocumentation()=0
BaseClassList
std::vector< BaseClassDef > BaseClassList
Definition: classdef.h:81
Translator::trFileIndex
virtual QCString trFileIndex()=0
LayoutNavEntry::ExceptionIndex
@ ExceptionIndex
Definition: layout.h:151
OutputList::enable
void enable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:108
LayoutNavEntry::MainPage
@ MainPage
Definition: layout.h:130
Translator::trModuleIndex
virtual QCString trModuleIndex()=0
startIndexHierarchy
static void startIndexHierarchy(OutputList &ol, int level)
Definition: index.cpp:113
LayoutNavEntry::InterfaceHierarchy
@ InterfaceHierarchy
Definition: layout.h:145
countConcepts
static int countConcepts()
Definition: index.cpp:1508
FMHL_Sequences
@ FMHL_Sequences
Definition: index.h:197
PageDef::visibleInIndex
virtual bool visibleInIndex() const =0
ClassDef::isLinkable
virtual bool isLinkable() const =0
return TRUE iff a link to this class is possible (either within this project, or as a cross-reference...
convertToId
QCString convertToId(const QCString &s)
Definition: util.cpp:3908
Translator::trFileMembers
virtual QCString trFileMembers()=0
OutputList::writeSearchInfo
void writeSearchInfo()
Definition: outputlist.h:93
Translator::trRelatedFunctions
virtual QCString trRelatedFunctions()=0
MemberList
A list of MemberDef objects as shown in documentation sections.
Definition: memberlist.h:81
LayoutDocEntry::GroupNamespaces
@ GroupNamespaces
Definition: layout.h:63
ClassLinkedRefMap
Definition: classlist.h:30
LinkedRefMap::size
size_t size() const
Definition: linkedmap.h:375
HLI_Pages
@ HLI_Pages
Definition: index.h:163
OutputList::endItemList
void endItemList()
Definition: outputlist.h:131
AlphaIndexTableCell::m_letter
std::string m_letter
Definition: index.cpp:2063
QCString::prepend
QCString & prepend(const char *s)
Definition: qcstring.h:339
OutputList::writePageLink
void writePageLink(const QCString &name, bool first)
Definition: outputlist.h:80
Translator::trCompoundIndex
virtual QCString trCompoundIndex()=0
MemberDef::isEvent
virtual bool isEvent() const =0
qstrlen
uint qstrlen(const char *str)
Definition: qcstring.h:65
OutputList::endTextLink
void endTextLink()
Definition: outputlist.h:154
NamespaceLinkedMap
Definition: namespacedef.h:41
HighlightedItem
HighlightedItem
Definition: index.h:140
CMHL_Total
@ CMHL_Total
Definition: index.h:188
VhdlDocGen::ARCHITECTURECLASS
@ ARCHITECTURECLASS
Definition: vhdldocgen.h:76
OutputList::startParagraph
void startParagraph(const QCString &classDef=QCString())
Definition: outputlist.h:107
ClassDefSet
std::set< const ClassDef * > ClassDefSet
Definition: classdef.h:95
CMHL_All
@ CMHL_All
Definition: index.h:179
MemberDef::getGroupDef
virtual const GroupDef * getGroupDef() const =0
vhdldocgen.h
endFile
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition: index.cpp:254
NmhlInfo::title
QCString title
Definition: index.cpp:3286
maxItemsBeforeQuickIndex
const int maxItemsBeforeQuickIndex
Definition: index.cpp:167
AlphaIndexTableCell::m_class
const ClassDef * m_class
Definition: index.cpp:2064
FALSE
#define FALSE
Definition: qcstring.h:33
Translator::trHierarchicalIndex
virtual QCString trHierarchicalIndex()=0
Doxygen::exampleLinkedMap
static PageLinkedMap * exampleLinkedMap
Definition: doxygen.h:81
ClassDef::anchor
virtual QCString anchor() const =0
addMembersToIndex
void addMembersToIndex(T *def, LayoutDocManager::LayoutPart part, const QCString &name, const QCString &anchor, bool addToIndex=TRUE, bool preventSeparateIndex=FALSE, const ConceptLinkedRefMap *concepts=nullptr)
Definition: index.cpp:338
annotatedClasses
int annotatedClasses
Definition: index.cpp:56
isConceptDocumentation
@ isConceptDocumentation
Definition: index.h:132
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108
OutputGenerator::Man
@ Man
Definition: outputgen.h:333