Doxygen
layout.cpp
浏览该文件的文档.
1 /******************************************************************************
2  *
3  *
4  *
5  *
6  * Copyright (C) 1997-2015 by Dimitri van Heesch.
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation under the terms of the GNU General Public License is hereby
10  * granted. No representations are made about the suitability of this software
11  * for any purpose. It is provided "as is" without express or implied warranty.
12  * See the GNU General Public License for more details.
13  *
14  * Documents produced by Doxygen are derivative works derived from the
15  * input used in their production; they are not affected by this license.
16  *
17  */
18 
19 #include <array>
20 
21 #include <assert.h>
22 
23 #include "layout.h"
24 #include "message.h"
25 #include "language.h"
26 #include "vhdldocgen.h"
27 #include "util.h"
28 #include "doxygen.h"
29 #include "version.h"
30 #include "config.h"
31 #include "xml.h"
32 #include "resourcemgr.h"
33 #include "debug.h"
34 
35 inline QCString compileOptions(const QCString &def)
36 {
37  return def;
38 }
39 
40 inline QCString compileOptions(const QCString &def,SrcLangExt langId1,const QCString &value1)
41 {
42  return compileOptions(def)+"|"+QCString().setNum(langId1)+"="+value1;
43 }
44 
45 inline QCString compileOptions(const QCString &def,SrcLangExt langId1,const QCString &value1,
46  SrcLangExt langId2,const QCString &value2)
47 {
48  return compileOptions(def,langId1,value1)+
49  "|"+QCString().setNum(langId2)+"="+value2;
50 }
51 
52 inline QCString compileOptions(const QCString &def,SrcLangExt langId1,const QCString &value1,
53  SrcLangExt langId2,const QCString &value2,
54  SrcLangExt langId3,const QCString &value3)
55 {
56  return compileOptions(def,langId1,value1,langId2,value2)+
57  "|"+QCString().setNum(langId3)+"="+value3;
58 }
59 
60 inline QCString compileOptions(const QCString &def,SrcLangExt langId1,const QCString &value1,
61  SrcLangExt langId2,const QCString &value2,
62  SrcLangExt langId3,const QCString &value3,
63  SrcLangExt langId4,const QCString &value4)
64 {
65  return compileOptions(def,langId1,value1,langId2,value2,langId3,value3)+
66  "|"+QCString().setNum(langId4)+"="+value4;
67 }
68 
69 inline QCString compileOptions(const QCString &def,SrcLangExt langId1,const QCString &value1,
70  SrcLangExt langId2,const QCString &value2,
71  SrcLangExt langId3,const QCString &value3,
72  SrcLangExt langId4,const QCString &value4,
73  SrcLangExt langId5,const QCString &value5)
74 {
75  return compileOptions(def,langId1,value1,langId2,value2,langId3,value3,langId4,value4)+
76  "|"+QCString().setNum(langId5)+"="+value5;
77 }
78 
79 
80 static bool elemIsVisible(const XMLHandlers::Attributes &attrib,bool defVal=TRUE)
81 {
82  QCString visible = XMLHandlers::value(attrib,"visible");
83  if (visible.isEmpty()) return defVal;
84  if (visible.at(0)=='$' && visible.length()>1)
85  {
86  QCString id = visible.mid(1);
87  const ConfigValues::Info *opt = ConfigValues::instance().get(id);
88  if (opt && opt->type==ConfigValues::Info::Bool)
89  {
90  return ConfigValues::instance().*(opt->value.b);
91  }
92  else if (opt && opt->type==ConfigValues::Info::String)
93  {
94  return ConfigValues::instance().*(opt->value.s) != "NO";
95  }
96  else if (!opt)
97  {
98  err("found unsupported value %s for visible attribute in layout file\n",
99  qPrint(visible));
100  }
101  }
102  return visible!="no" && visible!="0";
103 }
104 
105 //---------------------------------------------------------------------------------
106 
108  const QCString &file) const
109 {
110  LayoutNavEntry *result=0;
111  for (const auto &entry : m_children)
112  {
113  // depth first search, needed to find the entry furthest from the
114  // root in case an entry is in the tree twice
115  result = entry->find(kind,file);
116  if (result) return result;
117  if (entry->kind()==kind && (file==QCString() || entry->baseFile()==file))
118  {
119  return entry.get();
120  }
121  }
122  return result;
123 }
124 
125 
126 
128 {
131  (kind()==LayoutNavEntry::UserGroup && url.left(9)=="usergroup"))
132  {
134  }
135  else if (url.left(5)=="@ref " || url.left(5)=="\\ref ")
136  {
137  const Definition *d = 0;
138  QCString anchor;
139  bool found=FALSE;
140  if (resolveLink(QCString(),url.mid(5).stripWhiteSpace(),TRUE,&d,anchor))
141  {
142  if (d && d->isLinkable())
143  {
145  if (!anchor.isEmpty())
146  {
147  url+="#"+anchor;
148  }
149  found=TRUE;
150  }
151  }
152  if (!found)
153  {
154  msg("explicit link request to '%s' in layout file '%s' could not be resolved\n",qPrint(url.mid(5)),qPrint(Config_getString(LAYOUT_FILE)));
155  }
156  }
157  //printf("LayoutNavEntry::url()=%s\n",qPrint(url));
158  return url;
159 }
160 
161 //---------------------------------------------------------------------------------
162 
164 {
165  public:
167  {
168  static LayoutParser *theInstance = new LayoutParser;
169  return *theInstance;
170  }
171 
172  // =========== XMLHandler events
173  void setDocumentLocator(const XMLLocator *locator)
174  {
175  m_locator = locator;
176  }
177  void error( const std::string &fileName,int lineNr,const std::string &msg)
178  {
179  ::warn(fileName.c_str(),lineNr,"%s",msg.c_str());
180  }
181  void startElement( const std::string &name, const XMLHandlers::Attributes& attrib );
182  void endElement( const std::string &name );
183 
185  {
186  bool isVisible = elemIsVisible(attrib);
187  if (m_part!=-1 && isVisible)
188  {
190  new LayoutDocEntrySimple(k));
191  }
192  }
193 
194  // ============ Specific callbacks
195 
197  const QCString &title)
198  {
199  bool isVisible = elemIsVisible(attrib);
200  QCString userTitle = XMLHandlers::value(attrib,"title");
201  //printf("startSectionEntry: title='%s' userTitle='%s'\n",
202  // qPrint(title),qPrint(userTitle));
203  if (userTitle.isEmpty()) userTitle = title;
204  if (m_part!=-1 && isVisible)
205  {
207  new LayoutDocEntrySection(k,userTitle));
208  }
209  }
210 
211 
213  const QCString &title,const QCString &subscript)
214  {
215  //QCString visible = convertToQCString(XMLHandlers::value(attrib,"visible"));
216  //bool isVisible = visible.isEmpty() || (visible!="no" && visible!="0");
217  QCString userTitle = XMLHandlers::value(attrib,"title");
218  QCString userSubscript = XMLHandlers::value(attrib,"subtitle");
219  if (userTitle.isEmpty()) userTitle = title;
220  if (userSubscript.isEmpty()) userSubscript = subscript;
221  //printf("memberdecl: %s\n",qPrint(userTitle));
222  if (m_part!=-1 /*&& isVisible*/)
223  {
225  new LayoutDocEntryMemberDecl(type,userTitle,userSubscript));
226  }
227  }
228 
230  const QCString &title,const QCString &)
231  {
232  QCString userTitle = XMLHandlers::value(attrib,"title");
233  if (userTitle.isEmpty()) userTitle = title;
234  //printf("memberdef: %s\n",qPrint(userTitle));
235  if (m_part!=-1 /*&& isVisible*/)
236  {
238  new LayoutDocEntryMemberDef(type,userTitle));
239  }
240  }
241 
243  {
244  }
245 
247  {
248  m_scope="navindex/";
250  if (m_rootNav) m_rootNav->clear();
251  }
252 
253  void endNavIndex()
254  {
255  m_scope="";
257  {
258  // no MainPage node... add one as the first item of the root node...
260  /*Config_getBool(GENERATE_TREEVIEW) ? "main" :*/ "index",
262  }
263  }
264 
266  {
267  static bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
268  static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
269  static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
270  static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
271  static bool hasGraphicalHierarchy = Config_getBool(HAVE_DOT) &&
272  Config_getBool(GRAPHICAL_HIERARCHY);
273  static bool extractAll = Config_getBool(EXTRACT_ALL);
274  static struct NavEntryMap
275  {
276  const char *typeStr; // type attribute name in the XML file
277  LayoutNavEntry::Kind kind; // corresponding enum name
278  QCString mainName; // default title for an item if it has children
279  QCString subName; // optional name for an item if it is rendered as a child
280  QCString intro; // introduction text to be put on the index page
281  QCString baseFile; // base name of the file containing the index page
282  } mapping[] =
283  {
284  { "mainpage",
287  QCString(),
288  QCString(),
289  "index"
290  },
291  { "pages",
294  QCString(),
296  "pages"
297  },
298  { "modules",
301  QCString(),
303  "modules"
304  },
305  { "namespaces",
307  javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt || sliceOpt ? theTranslator->trModules() : theTranslator->trNamespaces(),
308  javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
309  javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt || sliceOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
310  "namespaces"
311  },
312  { "namespacelist",
314  javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
315  QCString(),
316  javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt || sliceOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
317  "namespaces"
318  },
319  { "namespacemembers",
321  javaOpt || vhdlOpt ? theTranslator->trPackageMembers() : fortranOpt || sliceOpt ? theTranslator->trModulesMembers() : theTranslator->trNamespaceMembers(),
322  QCString(),
323  fortranOpt || sliceOpt ? theTranslator->trModulesMemberDescription(extractAll) : theTranslator->trNamespaceMemberDescription(extractAll),
324  "namespacemembers"
325  },
326  { "concepts",
328  theTranslator->trConcept(true,false),
331  "concepts"
332  },
333  { "classindex",
336  QCString(),
337  QCString(),
338  "classes"
339  },
340  { "classes",
345  "annotated"
346  },
347  { "classlist",
350  QCString(),
352  "annotated"
353  },
354  { "hierarchy",
357  QCString(),
359  hasGraphicalHierarchy ? "inherits" : "hierarchy"
360  },
361  { "classmembers",
364  QCString(),
366  "functions"
367  },
368  { "interfaceindex",
371  QCString(),
372  QCString(),
373  "interfaces"
374  },
375  { "interfaces",
380  "annotatedinterfaces"
381  },
382  { "interfacelist",
385  QCString(),
387  "annotatedinterfaces"
388  },
389  { "interfacehierarchy",
392  QCString(),
394  hasGraphicalHierarchy ? "interfaceinherits" : "interfacehierarchy"
395  },
396  { "structindex",
399  QCString(),
400  QCString(),
401  "structs"
402  },
403  { "structs",
408  "annotatedstructs"
409  },
410  { "structlist",
413  QCString(),
415  "annotatedstructs"
416  },
417  { "exceptionindex",
420  QCString(),
421  QCString(),
422  "exceptions"
423  },
424  { "exceptions",
429  "annotatedexceptions"
430  },
431  { "exceptionlist",
434  QCString(),
436  "annotatedexceptions"
437  },
438  { "exceptionhierarchy",
441  QCString(),
443  hasGraphicalHierarchy ? "exceptioninherits" : "exceptionhierarchy"
444  },
445  { "files",
450  "files"
451  },
452  { "filelist",
455  QCString(),
457  "files"
458  },
459  { "globals",
462  QCString(),
464  "globals"
465  },
466  //{ "dirs",
467  // LayoutNavEntry::Dirs,
468  // theTranslator->trDirectories(),
469  // QCString(),
470  // theTranslator->trDirDescription(),
471  // "dirs"
472  //},
473  { "examples",
476  QCString(),
478  "examples"
479  },
480  { "user",
482  QCString(),
483  QCString(),
484  QCString(),
485  "user"
486  },
487  { "usergroup",
489  QCString(),
490  QCString(),
491  QCString(),
492  "usergroup"
493  },
494  { 0, // end of list
496  QCString(),
497  QCString(),
498  QCString(),
499  QCString()
500  }
501  };
503  // find type in the table
504  int i=0;
505  QCString type = XMLHandlers::value(attrib,"type");
506  while (mapping[i].typeStr)
507  {
508  if (mapping[i].typeStr==type)
509  {
510  kind = mapping[i].kind;
511  break;
512  }
513  i++;
514  }
515  if (mapping[i].typeStr==0)
516  {
517  std::string fileName = m_locator->fileName();
518  if (type.isEmpty())
519  {
520  ::warn(fileName.c_str(),m_locator->lineNr(),"an entry tag within a navindex has no type attribute! Check your layout file!\n");
521  }
522  else
523  {
524  ::warn(fileName.c_str(),m_locator->lineNr(),"the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n",qPrint(type));
525  }
527  return;
528  }
529  QCString baseFile = mapping[i].baseFile;
530  QCString title = XMLHandlers::value(attrib,"title");
531  bool isVisible = elemIsVisible(attrib);
532  if (title.isEmpty()) // use default title
533  {
534  title = mapping[i].mainName; // use title for main row
535  if (m_rootNav!=LayoutDocManager::instance().rootNavEntry() && !mapping[i].subName.isEmpty())
536  {
537  title = mapping[i].subName; // if this is a child of another row, use the subName if available
538  // this is mainly done to get compatible naming with older versions.
539  }
540  }
541  QCString intro = XMLHandlers::value(attrib,"intro");
542  if (intro.isEmpty()) // use default intro text
543  {
544  intro = mapping[i].intro;
545  }
546  QCString url = XMLHandlers::value(attrib,"url");
547  if (mapping[i].kind==LayoutNavEntry::User && !url.isEmpty())
548  {
549  baseFile=url;
550  }
551  else if (kind==LayoutNavEntry::UserGroup)
552  {
553  if (!url.isEmpty())
554  {
555  baseFile=url;
556  }
557  else
558  {
559  baseFile+=QCString().sprintf("%d",m_userGroupCount++);
560  }
561  }
562  // create new item and make it the new root
563  m_rootNav = new LayoutNavEntry(m_rootNav,kind,isVisible,baseFile,title,intro);
564  }
565 
566  void endNavEntry()
567  {
568  // set the root back to the parent
571  }
572 
574  {
576  m_scope="class/";
578  }
579 
580  void endClass()
581  {
582  m_scope="";
583  m_part = -1;
584  }
585 
587  {
589  m_scope="namespace/";
591  }
592 
594  {
595  m_scope="";
596  m_part = -1;
597  }
598 
600  {
602  m_scope="concept/";
604  }
605 
606  void endConcept()
607  {
608  m_scope="";
609  m_part = -1;
610  }
611 
613  {
615  m_scope="file/";
617  }
618 
619  void endFile()
620  {
621  m_scope="";
622  m_part = -1;
623  }
624 
626  {
628  m_scope="group/";
630  }
631 
632  void endGroup()
633  {
634  m_scope="";
635  m_part = -1;
636  }
637 
639  {
641  m_scope="directory/";
643  }
644 
646  {
647  m_scope="";
648  m_part = -1;
649  }
650 
652  {
653  m_scope+="memberdef/";
654  if (m_part!=-1)
655  {
658  }
659  }
660 
662  {
663  int i=m_scope.findRev("memberdef/");
664  if (i!=-1)
665  {
666  m_scope=m_scope.left(i);
667  if (m_part!=-1)
668  {
671  }
672  }
673  }
674 
676  {
677  m_scope+="memberdecl/";
678  if (m_part!=-1)
679  {
682  }
683  }
684 
686  {
687  int i=m_scope.findRev("memberdecl/");
688  if (i!=-1)
689  {
690  m_scope=m_scope.left(i);
691  if (m_part!=-1)
692  {
695  }
696  }
697  }
698 
699 
700  private:
702  ~LayoutParser() { delete m_rootNav; }
703 
705  int m_part = -1;
707  bool m_invalidEntry = false;
708  static int m_userGroupCount;
709  const XMLLocator *m_locator = nullptr;
710 };
711 
712 //---------------------------------------------------------------------------------
713 
715 {
716  using StartCallback = std::function<void(LayoutParser&,const XMLHandlers::Attributes&)>;
717  using EndCallback = std::function<void(LayoutParser&)>;
718 
721 };
722 
724 {
725  return [fn](LayoutParser &parser,const XMLHandlers::Attributes &attr) { (parser.*fn)(attr); };
726 }
727 
729 {
730  return [fn,kind](LayoutParser &parser,const XMLHandlers::Attributes &attr) { (parser.*fn)(kind,attr); };
731 }
732 
735  std::function<QCString()> title
736  )
737 {
738  return [fn,kind,title](LayoutParser &parser,const XMLHandlers::Attributes &attr) { (parser.*fn)(kind,attr,title()); };
739 }
740 
742  MemberListType type,
743  std::function<QCString()> title
744  )
745 {
746  return [fn,type,title](LayoutParser &parser,const XMLHandlers::Attributes &attr) { (parser.*fn)(attr,type,title(),QCString()); };
747 }
748 
750  MemberListType type,
751  std::function<QCString()> title,
752  std::function<QCString()> subtitle
753  )
754 {
755  return [fn,type,title,subtitle](LayoutParser &parser,const XMLHandlers::Attributes &attr) { (parser.*fn)(attr,type,title(),subtitle()); };
756 }
757 
758 
760 {
761  return [fn](LayoutParser &parser) { (parser.*fn)(); };
762 }
763 
765 {
766  return [](LayoutParser &){};
767 }
768 
769 static const std::map< std::string, ElementCallbacks > g_elementHandlers =
770 {
771  // path/name
772  { "doxygenlayout", { startCb(&LayoutParser::startLayout),
773  endCb()
774  } },
775  { "navindex", { startCb(&LayoutParser::startNavIndex),
777  } },
778  { "navindex/tab", { startCb(&LayoutParser::startNavEntry),
780  } },
781 
782  // class layout handlers
783  { "class", { startCb(&LayoutParser::startClass),
785  } },
786  { "class/briefdescription", { startCb(&LayoutParser::startSimpleEntry,LayoutDocEntry::BriefDesc),
787  endCb()
788  } },
789  { "class/detaileddescription", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::DetailedDesc,
791  endCb()
792  } },
794  endCb()
795  } },
797  endCb()
798  } },
800  endCb()
801  } },
803  endCb()
804  } },
806  endCb()
807  } },
809  endCb()
810  } },
811  { "class/memberdecl", { startCb(&LayoutParser::startMemberDecl),
813  } },
814  { "class/memberdecl/membergroups", { startCb(&LayoutParser::startSimpleEntry,LayoutDocEntry::MemberGroups),
815  endCb()
816  } },
817  { "class/memberdecl/nestedclasses", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::ClassNestedClasses,
818  []() { return compileOptions(/*default*/ theTranslator->trCompounds(),
821  endCb()
822  } },
823  { "class/memberdecl/services", { startCb(&LayoutParser::startMemberDeclEntry,MemberListType_services,
824  []() { return compileOptions(theTranslator->trServices()); }),
825  endCb()
826  } },
827  { "class/memberdecl/interfaces", { startCb(&LayoutParser::startMemberDeclEntry,MemberListType_interfaces,
828  []() { return compileOptions(theTranslator->trInterfaces()); }),
829  endCb()
830  } },
831  { "class/memberdecl/publictypes", { startCb(&LayoutParser::startMemberDeclEntry,MemberListType_pubTypes,
832  []() { return compileOptions(theTranslator->trPublicTypes()); }),
833  endCb()
834  } },
835  { "class/memberdecl/publicslots", { startCb(&LayoutParser::startMemberDeclEntry,MemberListType_pubSlots,
836  []() { return compileOptions(theTranslator->trPublicSlots()); }),
837  endCb()
838  } },
839  { "class/memberdecl/signals", { startCb(&LayoutParser::startMemberDeclEntry,MemberListType_signals,
840  []() { return compileOptions(theTranslator->trSignals()); }),
841  endCb()
842  } },
843  { "class/memberdecl/publicmethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pubMethods,
844  []() { return compileOptions(/* default */ theTranslator->trPublicMembers(),
847  endCb()
848  } },
849  { "class/memberdecl/publicstaticmethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pubStaticMethods,
850  []() { return compileOptions(/* default */ theTranslator->trStaticPublicMembers(),
852  endCb()
853  } },
854  { "class/memberdecl/publicattributes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pubAttribs,
855  []() { return compileOptions(/* default */ theTranslator->trPublicAttribs(),
857  endCb()
858  } },
859  { "class/memberdecl/publicstaticattributes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pubStaticAttribs,
860  []() { return compileOptions(theTranslator->trStaticPublicAttribs()); }),
861  endCb()
862  } },
863  { "class/memberdecl/protectedtypes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_proTypes,
864  []() { return compileOptions(theTranslator->trProtectedTypes()); }),
865  endCb()
866  } },
867  { "class/memberdecl/protectedslots", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_proSlots,
868  []() { return compileOptions(theTranslator->trProtectedSlots()); }),
869  endCb()
870  } },
871  { "class/memberdecl/protectedmethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_proMethods,
872  []() { return compileOptions(theTranslator->trProtectedMembers()); }),
873  endCb()
874  } },
875  { "class/memberdecl/protectedstaticmethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_proStaticMethods,
877  endCb()
878  } },
879  { "class/memberdecl/protectedattributes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_proAttribs,
880  []() { return compileOptions(theTranslator->trProtectedAttribs()); }),
881  endCb()
882  } },
883  { "class/memberdecl/protectedstaticattributes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_proStaticAttribs,
885  endCb()
886  } },
887  { "class/memberdecl/packagetypes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pacTypes,
888  []() { return compileOptions(theTranslator->trPackageTypes()); }),
889  endCb()
890  } },
891  { "class/memberdecl/packagemethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pacMethods,
892  []() { return compileOptions(theTranslator->trPackageMembers()); }),
893  endCb()
894  } },
895  { "class/memberdecl/packagestaticmethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pacStaticMethods,
897  endCb()
898  } },
899  { "class/memberdecl/packageattributes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pacAttribs,
900  []() { return compileOptions(theTranslator->trPackageAttribs()); }),
901  endCb()
902  } },
903  { "class/memberdecl/packagestaticattributes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pacStaticAttribs,
905  endCb()
906  } },
907  { "class/memberdecl/properties", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_properties,
908  []() { return compileOptions(theTranslator->trProperties()); }),
909  endCb()
910  } },
911  { "class/memberdecl/events", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_events,
912  []() { return compileOptions(theTranslator->trEvents()); }),
913  endCb()
914  } },
915  { "class/memberdecl/privatetypes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_priTypes,
916  []() { return compileOptions(theTranslator->trPrivateTypes()); }),
917  endCb()
918  } },
919  { "class/memberdecl/privateslots", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_priSlots,
920  []() { return compileOptions(theTranslator->trPrivateSlots()); }),
921  endCb()
922  } },
923  { "class/memberdecl/privatemethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_priMethods,
924  []() { return compileOptions(theTranslator->trPrivateMembers()); }),
925  endCb()
926  } },
927  { "class/memberdecl/privatestaticmethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_priStaticMethods,
929  endCb()
930  } },
931  { "class/memberdecl/privateattributes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_priAttribs,
932  []() { return compileOptions(theTranslator->trPrivateAttribs()); }),
933  endCb()
934  } },
935  { "class/memberdecl/privatestaticattributes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_priStaticAttribs,
937  endCb()
938  } },
939  { "class/memberdecl/friends", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_friends,
940  []() { return compileOptions(theTranslator->trFriends()); }),
941  endCb()
942  } },
943  { "class/memberdecl/related", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_related,
944  []() { return compileOptions(theTranslator->trRelatedFunctions()); },
945  []() { return compileOptions(theTranslator->trRelatedSubscript()); }),
946  endCb()
947  } },
948  { "class/memberdef", { startCb(&LayoutParser::startMemberDef),
950  } },
951  { "class/memberdef/inlineclasses", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::ClassInlineClasses,
952  []() { return compileOptions(/* default */ theTranslator->trClassDocumentation(),
954  endCb()
955  } },
958  endCb()
959  } },
962  endCb()
963  } },
965  []() { return compileOptions(theTranslator->trInterfaces()); }),
966  endCb()
967  } },
969  []() { return compileOptions(theTranslator->trInterfaces()); }),
970  endCb()
971  } },
972  { "class/memberdef/constructors", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_constructors,
974  endCb()
975  } },
980  endCb()
981  } },
984  endCb()
985  } },
987  []() { return compileOptions(/* default */ theTranslator->trMemberDataDocumentation(),
989  endCb()
990  } },
993  endCb()
994  } },
996  []() { return compileOptions(theTranslator->trEventDocumentation()); }),
997  endCb()
998  } },
999 
1000  // concept layout handlers
1001  { "concept", { startCb(&LayoutParser::startConcept),
1003  } },
1004 
1005  { "concept/briefdescription", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::BriefDesc),
1006  endCb()
1007  } },
1009  []() { return compileOptions(theTranslator->trConceptDefinition()); }),
1010  endCb()
1011  } },
1013  endCb()
1014  } },
1016  endCb()
1017  } },
1018  { "concept/detaileddescription", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::DetailedDesc,
1019  []() { return compileOptions(theTranslator->trDetailedDescription()); }),
1020  endCb()
1021  } },
1023  endCb()
1024  } },
1025  // namespace layout handlers
1026  { "namespace", { startCb(&LayoutParser::startNamespace),
1028  } },
1029 
1030  { "namespace/briefdescription", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::BriefDesc),
1031  endCb()
1032  } },
1033  { "namespace/detaileddescription", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::DetailedDesc,
1034  []() { return compileOptions(theTranslator->trDetailedDescription()); }),
1035  endCb()
1036  } },
1037  { "namespace/authorsection", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::AuthorSection),
1038  endCb()
1039  } },
1040  { "namespace/memberdecl", { startCb(&LayoutParser::startMemberDecl),
1042  } },
1043  { "namespace/memberdecl/nestednamespaces", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::NamespaceNestedNamespaces,
1044  []() { return compileOptions(/* default */ theTranslator->trNamespaces(),
1049  SrcLangExt_Slice,(Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
1051  theTranslator->trNamespaces())); }),
1052  endCb()
1053  } },
1054  { "namespace/memberdecl/constantgroups", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::NamespaceNestedConstantGroups,
1055  []() { return compileOptions(theTranslator->trConstantGroups()); }),
1056  endCb()
1057  } },
1058  { "namespace/memberdecl/interfaces", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::NamespaceInterfaces,
1059  []() { return compileOptions(theTranslator->trSliceInterfaces()); }),
1060  endCb()
1061  } },
1062  { "namespace/memberdecl/classes", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::NamespaceClasses,
1063  []() { return compileOptions(/* default */ theTranslator->trCompounds(),
1066  endCb()
1067  } },
1068  { "namespace/memberdecl/concepts", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::NamespaceConcepts,
1069  []() { return compileOptions(theTranslator->trConcept(true,false)); }),
1070  endCb()
1071  } },
1072  { "namespace/memberdecl/structs", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::NamespaceStructs,
1073  []() { return compileOptions(theTranslator->trStructs()); }),
1074  endCb()
1075  } },
1076  { "namespace/memberdecl/exceptions", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::NamespaceExceptions,
1077  []() { return compileOptions(theTranslator->trExceptions()); }),
1078  endCb()
1079  } },
1080  { "namespace/memberdecl/membergroups", { startCb(&LayoutParser::startSimpleEntry,LayoutDocEntry::MemberGroups),
1081  endCb()
1082  } },
1083  { "namespace/memberdecl/typedefs", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decTypedefMembers,
1084  []() { return compileOptions(theTranslator->trTypedefs()); }),
1085  endCb()
1086  } },
1087  { "namespace/memberdecl/sequences", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decSequenceMembers,
1088  []() { return compileOptions(theTranslator->trSequences()); }),
1089  endCb()
1090  } },
1091  { "namespace/memberdecl/dictionaries", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decDictionaryMembers,
1092  []() { return compileOptions(theTranslator->trDictionaries()); }),
1093  endCb()
1094  } },
1095  { "namespace/memberdecl/enums", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decEnumMembers,
1096  []() { return compileOptions(theTranslator->trEnumerations()); }),
1097  endCb()
1098  } },
1099  { "namespace/memberdecl/functions", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decFuncMembers,
1100  []() { return compileOptions(/* default */ theTranslator->trFunctions(),
1103  endCb()
1104  } },
1105  { "namespace/memberdecl/variables", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decVarMembers,
1106  []() { return compileOptions(Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
1108  theTranslator->trVariables()); }),
1109  endCb()
1110  } },
1111  { "namespace/memberdef", { startCb(&LayoutParser::startMemberDef),
1113  } },
1114  { "namespace/memberdef/inlineclasses", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::NamespaceInlineClasses,
1115  []() { return compileOptions(/* default */ theTranslator->trClassDocumentation(),
1117  endCb()
1118  } },
1119  { "namespace/memberdef/typedefs", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docTypedefMembers,
1120  []() { return compileOptions(theTranslator->trTypedefDocumentation()); }),
1121  endCb()
1122  } },
1123  { "namespace/memberdef/sequences", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docSequenceMembers,
1125  endCb()
1126  } },
1127  { "namespace/memberdef/dictionaries", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docDictionaryMembers,
1129  endCb()
1130  } },
1131  { "namespace/memberdef/enums", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docEnumMembers,
1133  endCb()
1134  } },
1135  { "namespace/memberdef/functions", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docFuncMembers,
1136  []() { return compileOptions(/* default */ theTranslator->trFunctionDocumentation(),
1138  endCb()
1139  } },
1140  { "namespace/memberdef/variables", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docVarMembers,
1141  []() { return compileOptions(Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
1144  endCb()
1145  } },
1146 
1147  // file layout handlers
1148  { "file", { startCb(&LayoutParser::startFile),
1150  } },
1151 
1152  { "file/briefdescription", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::BriefDesc),
1153  endCb()
1154  } },
1155  { "file/detaileddescription", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::DetailedDesc,
1156  []() { return compileOptions(theTranslator->trDetailedDescription()); }),
1157  endCb()
1158  } },
1160  endCb()
1161  } },
1163  endCb()
1164  } },
1166  endCb()
1167  } },
1169  endCb()
1170  } },
1172  endCb()
1173  } },
1174  { "file/memberdecl/membergroups", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::MemberGroups),
1175  endCb()
1176  } },
1177  { "file/memberdecl", { startCb(&LayoutParser::startMemberDecl),
1179  } },
1180 
1181  { "file/memberdecl/interfaces", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::FileInterfaces,
1182  []() { return compileOptions(theTranslator->trSliceInterfaces()); }),
1183  endCb()
1184  } },
1186  []() { return compileOptions(/* default */ theTranslator->trCompounds(),
1189  endCb()
1190  } },
1191  { "file/memberdecl/concepts", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::FileConcepts,
1192  []() { return compileOptions(theTranslator->trConcept(true,false)); }),
1193  endCb()
1194  } },
1196  []() { return compileOptions(theTranslator->trStructs()); }),
1197  endCb()
1198  } },
1199  { "file/memberdecl/exceptions", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::FileExceptions,
1200  []() { return compileOptions(theTranslator->trExceptions()); }),
1201  endCb()
1202  } },
1203  { "file/memberdecl/namespaces", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::FileNamespaces,
1204  []() { return compileOptions(/* default */ theTranslator->trNamespaces(),
1209  endCb()
1210  } },
1211  { "file/memberdecl/constantgroups", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::FileConstantGroups,
1212  []() { return compileOptions(theTranslator->trConstantGroups()); }),
1213  endCb()
1214  } },
1216  []() { return compileOptions(theTranslator->trDefines()); }),
1217  endCb()
1218  } },
1220  []() { return compileOptions(theTranslator->trTypedefs()); }),
1221  endCb()
1222  } },
1224  []() { return compileOptions(theTranslator->trSequences()); }),
1225  endCb()
1226  } },
1228  []() { return compileOptions(theTranslator->trDictionaries()); }),
1229  endCb()
1230  } },
1232  []() { return compileOptions(theTranslator->trEnumerations()); }),
1233  endCb()
1234  } },
1236  []() { return compileOptions(/* default */ theTranslator->trFunctions(),
1239  endCb()
1240  } },
1241  { "file/memberdecl/variables", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decVarMembers,
1242  []() { return compileOptions(Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
1244  theTranslator->trVariables()); }),
1245  endCb()
1246  } },
1247  { "file/memberdef", { startCb(&LayoutParser::startMemberDef),
1249  } },
1250 
1251  { "file/memberdef/inlineclasses", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::FileInlineClasses,
1252  []() { return compileOptions(/* default */ theTranslator->trClassDocumentation(),
1254  endCb()
1255  } },
1257  []() { return compileOptions(theTranslator->trDefineDocumentation()); }),
1258  endCb()
1259  } },
1261  []() { return compileOptions(theTranslator->trTypedefDocumentation()); }),
1262  endCb()
1263  } },
1266  endCb()
1267  } },
1270  endCb()
1271  } },
1274  endCb()
1275  } },
1277  []() { return compileOptions(/* default */ theTranslator->trFunctionDocumentation(),
1279  endCb()
1280  } },
1283  endCb()
1284  } },
1285 
1286  // group layout handlers
1287  { "group", { startCb(&LayoutParser::startGroup),
1289  } },
1290  { "group/briefdescription", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::BriefDesc),
1291  endCb()
1292  } },
1293  { "group/detaileddescription", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::DetailedDesc,
1294  []() { return compileOptions(theTranslator->trDetailedDescription()); }),
1295  endCb()
1296  } },
1298  endCb()
1299  } },
1301  endCb()
1302  } },
1303  { "group/memberdecl/membergroups", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::MemberGroups),
1304  endCb()
1305  } },
1306 
1307  { "group/memberdecl", { startCb(&LayoutParser::startMemberDecl),
1309  } },
1310 
1311  { "group/memberdecl/classes", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::GroupClasses,
1312  []() { return compileOptions(/* default */ theTranslator->trCompounds(),
1315  endCb()
1316  } },
1317  { "group/memberdecl/concepts", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::GroupConcepts,
1318  []() { return compileOptions(theTranslator->trConcept(true,false)); }),
1319  endCb()
1320  } },
1321  { "group/memberdecl/namespaces", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::GroupNamespaces,
1322  []() { return compileOptions(/* default */ theTranslator->trNamespaces(),
1325  endCb()
1326  } },
1327  { "group/memberdecl/dirs", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::GroupDirs,
1328  []() { return compileOptions(theTranslator->trDirectories()); }),
1329  endCb()
1330  } },
1331  { "group/memberdecl/nestedgroups", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::GroupNestedGroups,
1332  []() { return compileOptions(theTranslator->trModules()); }),
1333  endCb()
1334  } },
1335  { "group/memberdecl/files", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::GroupFiles,
1336  []() { return compileOptions(theTranslator->trFile(TRUE,FALSE)); }),
1337  endCb()
1338  } },
1340  []() { return compileOptions(theTranslator->trDefines()); }),
1341  endCb()
1342  } },
1344  []() { return compileOptions(theTranslator->trTypedefs()); }),
1345  endCb()
1346  } },
1348  []() { return compileOptions(theTranslator->trSequences()); }),
1349  endCb()
1350  } },
1352  []() { return compileOptions(theTranslator->trDictionaries()); }),
1353  endCb()
1354  } },
1356  []() { return compileOptions(theTranslator->trEnumerations()); }),
1357  endCb()
1358  } },
1360  []() { return compileOptions(theTranslator->trEnumerationValues()); }),
1361  endCb()
1362  } },
1363  { "group/memberdecl/functions", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decFuncMembers,
1364  []() { return compileOptions(/* default */ theTranslator->trFunctions(),
1367  endCb()
1368  } },
1369  { "group/memberdecl/variables", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decVarMembers,
1370  []() { return compileOptions(theTranslator->trVariables()); }),
1371  endCb()
1372  } },
1374  []() { return compileOptions(theTranslator->trSignals()); }),
1375  endCb()
1376  } },
1377  { "group/memberdecl/publicslots", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decPubSlotMembers,
1378  []() { return compileOptions(theTranslator->trPublicSlots()); }),
1379  endCb()
1380  } },
1381  { "group/memberdecl/protectedslots", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decProSlotMembers,
1382  []() { return compileOptions(theTranslator->trProtectedSlots()); }),
1383  endCb()
1384  } },
1385  { "group/memberdecl/privateslots", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decPriSlotMembers,
1386  []() { return compileOptions(theTranslator->trPrivateSlots()); }),
1387  endCb()
1388  } },
1390  []() { return compileOptions(theTranslator->trEvents()); }),
1391  endCb()
1392  } },
1393  { "group/memberdecl/properties", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_decPropMembers,
1394  []() { return compileOptions(theTranslator->trProperties()); }),
1395  endCb()
1396  } },
1398  []() { return compileOptions(theTranslator->trFriends()); }),
1399  endCb()
1400  } },
1401  { "group/memberdef", { startCb(&LayoutParser::startMemberDef),
1403  } },
1404 
1405  { "group/memberdef/pagedocs", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::GroupPageDocs),
1406  endCb()
1407  } },
1408  { "group/memberdef/inlineclasses", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::GroupInlineClasses,
1409  []() { return compileOptions(/* default */ theTranslator->trClassDocumentation(),
1411  endCb()
1412  } },
1414  []() { return compileOptions(theTranslator->trDefineDocumentation()); }),
1415  endCb()
1416  } },
1418  []() { return compileOptions(theTranslator->trTypedefDocumentation()); }),
1419  endCb()
1420  } },
1423  endCb()
1424  } },
1427  endCb()
1428  } },
1431  endCb()
1432  } },
1435  endCb()
1436  } },
1437  { "group/memberdef/functions", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docFuncMembers,
1438  []() { return compileOptions(/* default */ theTranslator->trFunctionDocumentation(),
1440  endCb()
1441  } },
1442  { "group/memberdef/variables", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docVarMembers,
1444  endCb()
1445  } },
1447  []() { return compileOptions(theTranslator->trSignals()); }),
1448  endCb()
1449  } },
1450  { "group/memberdef/publicslots", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docPubSlotMembers,
1451  []() { return compileOptions(theTranslator->trPublicSlots()); }),
1452  endCb()
1453  } },
1454  { "group/memberdef/protectedslots", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docProSlotMembers,
1455  []() { return compileOptions(theTranslator->trProtectedSlots()); }),
1456  endCb()
1457  } },
1458  { "group/memberdef/privateslots", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docPriSlotMembers,
1459  []() { return compileOptions(theTranslator->trPrivateSlots()); }),
1460  endCb()
1461  } },
1463  []() { return compileOptions(theTranslator->trEvents()); }),
1464  endCb()
1465  } },
1466  { "group/memberdef/properties", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docPropMembers,
1467  []() { return compileOptions(theTranslator->trProperties()); }),
1468  endCb()
1469  } }, { "group/memberdef/friends", { startCb(&LayoutParser::startMemberDefEntry, MemberListType_docFriendMembers,
1470  []() { return compileOptions(theTranslator->trFriends()); }),
1471  endCb()
1472  } },
1473 
1474  // directory layout handlers
1475  { "directory", { startCb(&LayoutParser::startDirectory),
1477  } },
1478 
1479  { "directory/briefdescription", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::BriefDesc),
1480  endCb()
1481  } },
1482  { "directory/detaileddescription", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::DetailedDesc,
1483  []() { return compileOptions(theTranslator->trDetailedDescription()); }),
1484  endCb()
1485  } },
1486  { "directory/directorygraph", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::DirGraph),
1487  endCb()
1488  } },
1489  { "directory/memberdecl", { startCb(&LayoutParser::startMemberDecl),
1491  } },
1492 
1493  { "directory/memberdecl/dirs", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::DirSubDirs),
1494  endCb()
1495  } },
1496  { "directory/memberdecl/files", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::DirFiles),
1497  endCb()
1498  } },
1499 
1500 };
1501 
1502 void LayoutParser::startElement( const std::string &name, const XMLHandlers::Attributes& attrib )
1503 {
1504  //printf("startElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
1505  auto it = g_elementHandlers.find(m_scope.str()+name);
1506  if (it!=g_elementHandlers.end())
1507  {
1508  it->second.startCb(*this,attrib);
1509  }
1510  else
1511  {
1512  std::string fileName = m_locator->fileName();
1513  ::warn(fileName.c_str(),m_locator->lineNr(),"Unexpected start tag '%s' found in scope='%s'!\n",
1514  qPrint(name),qPrint(m_scope));
1515  }
1516 }
1517 
1518 void LayoutParser::endElement( const std::string &name )
1519 {
1520  //printf("endElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
1521  auto it=g_elementHandlers.end();
1522 
1523  if (!m_scope.isEmpty() && m_scope.right(static_cast<uint>(name.length())+1)==name+"/")
1524  { // element ends current scope
1525  it = g_elementHandlers.find(m_scope.left(m_scope.length()-1).str());
1526  }
1527  else // continue with current scope
1528  {
1529  it = g_elementHandlers.find(m_scope.str()+name);
1530  }
1531  if (it!=g_elementHandlers.end())
1532  {
1533  it->second.endCb(*this);
1534  }
1535 }
1536 
1537 //---------------------------------------------------------------------------------
1538 
1540 
1541 //---------------------------------------------------------------------------------
1542 
1544 {
1545  public:
1546  std::array<LayoutDocEntryList,LayoutDocManager::NrParts> docEntries;
1548 };
1549 
1551 {
1552  d->rootNav = new LayoutNavEntry;
1553 }
1554 
1555 
1557 {
1558  LayoutParser &layoutParser = LayoutParser::instance();
1559  XMLHandlers handlers;
1560  handlers.startElement = [&layoutParser](const std::string &name,const XMLHandlers::Attributes &attrs) { layoutParser.startElement(name,attrs); };
1561  handlers.endElement = [&layoutParser](const std::string &name) { layoutParser.endElement(name); };
1562  handlers.error = [&layoutParser](const std::string &fileName,int lineNr,const std::string &msg) { layoutParser.error(fileName,lineNr,msg); };
1563  XMLParser parser(handlers);
1564  layoutParser.setDocumentLocator(&parser);
1565  QCString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
1566  parser.parse("layout_default.xml",layout_default.data(),Debug::isFlagSet(Debug::Lex));
1567 }
1568 
1570 {
1571  delete d->rootNav;
1572 }
1573 
1575 {
1576  static LayoutDocManager *theInstance = new LayoutDocManager;
1577  return *theInstance;
1578 }
1579 
1581 {
1582  return d->docEntries[(int)part];
1583 }
1584 
1586 {
1587  return d->rootNav;
1588 }
1589 
1591 {
1592  d->docEntries[(int)p].push_back(std::unique_ptr<LayoutDocEntry>(e));
1593 }
1594 
1596 {
1597  d->docEntries[(int)p].clear();
1598 }
1599 
1600 void LayoutDocManager::parse(const QCString &fileName)
1601 {
1602  LayoutParser &layoutParser = LayoutParser::instance();
1603  XMLHandlers handlers;
1604  handlers.startElement = [&layoutParser](const std::string &name,const XMLHandlers::Attributes &attrs) { layoutParser.startElement(name,attrs); };
1605  handlers.endElement = [&layoutParser](const std::string &name) { layoutParser.endElement(name); };
1606  handlers.error = [&layoutParser](const std::string &fn,int lineNr,const std::string &msg) { layoutParser.error(fn,lineNr,msg); };
1607  XMLParser parser(handlers);
1608  layoutParser.setDocumentLocator(&parser);
1609  parser.parse(fileName.data(),fileToString(fileName).data(),Debug::isFlagSet(Debug::Lex));
1610 }
1611 
1612 //---------------------------------------------------------------------------------
1613 
1614 void writeDefaultLayoutFile(const QCString &fileName)
1615 {
1616  std::ofstream f;
1617  if (openOutputFile(fileName,f))
1618  {
1619  TextStream t(&f);
1620  QCString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
1621  t << substitute(layout_default,"$doxygenversion",getDoxygenVersion());
1622  }
1623  else
1624  {
1625  err("Failed to open file %s for writing!\n",qPrint(fileName));
1626  return;
1627  }
1628  f.close();
1629 }
1630 
1631 //----------------------------------------------------------------------------------
1632 
1633 // Convert input to a title.
1634 // The format of input can be a simple title "A title" or in case there are different
1635 // titles for some programming languages they can take the following form:
1636 // "A title|16=Another title|8=Yet Another title"
1637 // where the number is a value of SrcLangExt in decimal notation (i.e. 16=Java, 8=IDL).
1639 {
1640  int i,s=0,e=input.find('|');
1641  if (e==-1) return input; // simple title case
1642  int e1=e;
1643  while (e!=-1) // look for 'number=title' pattern separated by '|'
1644  {
1645  s=e+1;
1646  e=input.find('|',s);
1647  i=input.find('=',s);
1648  assert(i>s);
1649  int key=input.mid(s,i-s).toInt();
1650  if (key==(int)lang) // found matching key
1651  {
1652  if (e==-1) e=input.length();
1653  return input.mid(i+1,e-i-1);
1654  }
1655  }
1656  return input.left(e1); // fallback, no explicit language key found
1657 }
1658 
1659 //----------------------------------------------------------------------------------
1660 
1662 {
1664 }
1665 
1666 //----------------------------------------------------------------------------------
1667 
1669 {
1671 }
1672 
1674 {
1676 }
1677 
1678 //----------------------------------------------------------------------------------
1679 
1681 {
1683 }
1684 
1685 
1686 
1687 
LayoutDocEntry::GroupPageDocs
@ GroupPageDocs
Definition: layout.h:65
Translator::trDataMembers
virtual QCString trDataMembers()=0
LayoutParser::startNavEntry
void startNavEntry(const XMLHandlers::Attributes &attrib)
Definition: layout.cpp:265
ElementCallbacks::endCb
EndCallback endCb
Definition: layout.cpp:720
LayoutNavEntry::Interfaces
@ Interfaces
Definition: layout.h:142
Translator::trConstants
virtual QCString trConstants()=0
LayoutParser::m_locator
const XMLLocator * m_locator
Definition: layout.cpp:709
LayoutDocEntry::Kind
Kind
Definition: layout.h:34
Translator::trClassMethods
virtual QCString trClassMethods()=0
Translator::trDetailedDescription
virtual QCString trDetailedDescription()=0
MemberListType_typedefMembers
@ MemberListType_typedefMembers
Definition: types.h:137
Translator::trInstanceMethods
virtual QCString trInstanceMethods()=0
XMLParser
Definition: xml.h:64
LayoutDocEntryMemberDecl::m_subscript
QCString m_subscript
Definition: layout.h:106
MemberListType_decEnumValMembers
@ MemberListType_decEnumValMembers
Definition: types.h:155
ResourceMgr::instance
static ResourceMgr & instance()
Returns the one and only instance of this class
Definition: resourcemgr.cpp:32
Translator::trMethodDocumentation
virtual QCString trMethodDocumentation()=0
LayoutNavEntry
Base class for the layout of a navigation item at the top of the HTML pages.
Definition: layout.h:125
LayoutDocEntryMemberDecl
Represents of a member declaration list with configurable title and subtitle.
Definition: layout.h:94
LayoutDocEntry::NamespaceNestedNamespaces
@ NamespaceNestedNamespaces
Definition: layout.h:52
XMLHandlers::startElement
std::function< StartElementType > startElement
handler invoked when an opening tag has been found
Definition: xml.h:52
Translator::trClassHierarchyDescription
virtual QCString trClassHierarchyDescription()=0
Translator::trCompoundMembers
virtual QCString trCompoundMembers()=0
Translator::trModulesDescription
virtual QCString trModulesDescription()=0
Translator::trSubprograms
virtual QCString trSubprograms()=0
LayoutDocManager::Directory
@ Directory
Definition: layout.h:203
MemberListType_docDictionaryMembers
@ MemberListType_docDictionaryMembers
Definition: types.h:193
MemberListType_priStaticMethods
@ MemberListType_priStaticMethods
Definition: types.h:114
resolveLink
bool resolveLink(const QCString &scName, const QCString &lr, bool, const Definition **resContext, QCString &resAnchor)
Definition: util.cpp:3037
MemberListType_decEventMembers
@ MemberListType_decEventMembers
Definition: types.h:160
MemberListType_priStaticAttribs
@ MemberListType_priStaticAttribs
Definition: types.h:125
LayoutNavEntry::kind
Kind kind() const
Definition: layout.h:170
LayoutDocManager::rootNavEntry
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition: layout.cpp:1585
MemberListType_signals
@ MemberListType_signals
Definition: types.h:131
extractLanguageSpecificTitle
QCString extractLanguageSpecificTitle(const QCString &input, SrcLangExt lang)
Definition: layout.cpp:1638
XMLHandlers::Attributes
std::unordered_map< std::string, std::string > Attributes
Definition: xml.h:42
LayoutParser::startFile
void startFile(const XMLHandlers::Attributes &)
Definition: layout.cpp:612
LayoutDocEntry::GroupConcepts
@ GroupConcepts
Definition: layout.h:63
LayoutNavEntry::ExceptionList
@ ExceptionList
Definition: layout.h:150
MemberListType_functionMembers
@ MemberListType_functionMembers
Definition: types.h:140
Translator::trFileMembersDescription
virtual QCString trFileMembersDescription(bool extractAll)=0
MemberListType
MemberListType
Definition: types.h:100
MemberListType_docProSlotMembers
@ MemberListType_docProSlotMembers
Definition: types.h:172
ResourceMgr::getAsString
QCString getAsString(const QCString &name) const
Gets the resource data as a C string
Definition: resourcemgr.cpp:192
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
Translator::trFunctionAndProc
virtual QCString trFunctionAndProc()=0
MemberListType_docEnumMembers
@ MemberListType_docEnumMembers
Definition: types.h:167
LayoutDocEntry::GroupFiles
@ GroupFiles
Definition: layout.h:64
LayoutDocEntry::NamespaceInlineClasses
@ NamespaceInlineClasses
Definition: layout.h:54
MemberListType_pacStaticAttribs
@ MemberListType_pacStaticAttribs
Definition: types.h:124
MemberListType_services
@ MemberListType_services
Definition: types.h:187
Translator::trFileList
virtual QCString trFileList()=0
MemberListType_constructors
@ MemberListType_constructors
Definition: types.h:145
LayoutNavEntry::Kind
Kind
Definition: layout.h:128
Definition::isLinkable
virtual bool isLinkable() const =0
LayoutDocEntry::FileClasses
@ FileClasses
Definition: layout.h:57
Translator::trClassDocumentation
virtual QCString trClassDocumentation()=0
MemberListType_decProSlotMembers
@ MemberListType_decProSlotMembers
Definition: types.h:157
Translator::trDictionaryDocumentation
virtual QCString trDictionaryDocumentation()=0
LayoutDocEntry::ConceptDefinition
@ ConceptDefinition
Definition: layout.h:49
LayoutParser::startElement
void startElement(const std::string &name, const XMLHandlers::Attributes &attrib)
Definition: layout.cpp:1502
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
LayoutParser::startMemberDef
void startMemberDef(const XMLHandlers::Attributes &)
Definition: layout.cpp:651
XMLLocator::fileName
virtual std::string fileName() const =0
LayoutDocManager::File
@ File
Definition: layout.h:203
LayoutParser::endClass
void endClass()
Definition: layout.cpp:580
VhdlDocGen::ENTITY
@ ENTITY
Definition: vhdldocgen.h:83
LayoutDocManager::d
std::unique_ptr< Private > d
Definition: layout.h:223
Translator::trSequences
virtual QCString trSequences()=0
QCString::findRev
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:86
Translator::trStaticPublicMembers
virtual QCString trStaticPublicMembers()=0
MemberListType_priAttribs
@ MemberListType_priAttribs
Definition: types.h:121
Translator::trExceptions
virtual QCString trExceptions()=0
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
LayoutNavEntry::FileList
@ FileList
Definition: layout.h:154
LayoutParser::startMemberDecl
void startMemberDecl(const XMLHandlers::Attributes &)
Definition: layout.cpp:675
LayoutNavEntry::User
@ User
Definition: layout.h:157
Translator::trCompoundListDescriptionFortran
virtual QCString trCompoundListDescriptionFortran()=0
Translator::trModules
virtual QCString trModules()=0
Translator::trPackageAttribs
virtual QCString trPackageAttribs()=0
Translator::trCompounds
virtual QCString trCompounds()=0
LayoutParser
Definition: layout.cpp:163
Translator::trPublicMembers
virtual QCString trPublicMembers()=0
LayoutDocEntryMemberDef::m_title
QCString m_title
Definition: layout.h:119
Translator::trPrivateAttribs
virtual QCString trPrivateAttribs()=0
Translator::trSequenceDocumentation
virtual QCString trSequenceDocumentation()=0
LayoutDocEntryMemberDef::title
QCString title(SrcLangExt lang) const
Definition: layout.cpp:1680
LayoutDocEntry::ClassInheritanceGraph
@ ClassInheritanceGraph
Definition: layout.h:44
LayoutParser::m_rootNav
LayoutNavEntry * m_rootNav
Definition: layout.cpp:706
LayoutParser::endNamespace
void endNamespace()
Definition: layout.cpp:593
LayoutDocEntryList
std::vector< std::unique_ptr< LayoutDocEntry > > LayoutDocEntryList
Definition: layout.h:194
Translator::trMemberFunctionDocumentation
virtual QCString trMemberFunctionDocumentation()=0
MemberListType_pubTypes
@ MemberListType_pubTypes
Definition: types.h:126
Translator::trConstantGroups
virtual QCString trConstantGroups()=0
SrcLangExt
SrcLangExt
Language as given by extension
Definition: types.h:41
LayoutDocEntry::MemberDeclStart
@ MemberDeclStart
Definition: layout.h:37
LayoutNavEntry::StructList
@ StructList
Definition: layout.h:147
MemberListType_priSlots
@ MemberListType_priSlots
Definition: types.h:117
Translator::trTypeDocumentation
virtual QCString trTypeDocumentation()=0
Translator::trOperations
virtual QCString trOperations()=0
MemberListType_docSequenceMembers
@ MemberListType_docSequenceMembers
Definition: types.h:191
LayoutParser::endConcept
void endConcept()
Definition: layout.cpp:606
Translator::trProtectedTypes
virtual QCString trProtectedTypes()=0
Translator::trPackageListDescription
virtual QCString trPackageListDescription()=0
Translator::trExceptionHierarchyDescription
virtual QCString trExceptionHierarchyDescription()=0
Debug::Lex
@ Lex
Definition: debug.h:39
QCString::str
std::string str() const
Definition: qcstring.h:442
Translator::trStaticPublicAttribs
virtual QCString trStaticPublicAttribs()=0
LayoutNavEntry::url
QCString url() const
Definition: layout.cpp:127
Translator::trPrivateTypes
virtual QCString trPrivateTypes()=0
Translator::trNamespaceMemberDescription
virtual QCString trNamespaceMemberDescription(bool extractAll)=0
LayoutNavEntry::UserGroup
@ UserGroup
Definition: layout.h:158
LayoutNavEntry::m_children
LayoutNavEntryList m_children
Definition: layout.h:190
Translator::trRelatedPages
virtual QCString trRelatedPages()=0
LayoutDocEntry::NamespaceClasses
@ NamespaceClasses
Definition: layout.h:53
MemberListType_docDefineMembers
@ MemberListType_docDefineMembers
Definition: types.h:164
LayoutDocEntry::GroupClasses
@ GroupClasses
Definition: layout.h:63
LayoutParser::startNavIndex
void startNavIndex(const XMLHandlers::Attributes &)
Definition: layout.cpp:246
Translator::trEnumerationValues
virtual QCString trEnumerationValues()=0
MemberListType_decDictionaryMembers
@ MemberListType_decDictionaryMembers
Definition: types.h:192
Translator::trEvents
virtual QCString trEvents()=0
Translator::trEnumerations
virtual QCString trEnumerations()=0
elemIsVisible
static bool elemIsVisible(const XMLHandlers::Attributes &attrib, bool defVal=TRUE)
Definition: layout.cpp:80
LayoutParser::startNamespace
void startNamespace(const XMLHandlers::Attributes &)
Definition: layout.cpp:586
err
void err(const char *fmt,...)
Definition: message.cpp:203
SrcLangExt_Java
@ SrcLangExt_Java
Definition: types.h:45
MemberListType_friends
@ MemberListType_friends
Definition: types.h:132
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
LayoutNavEntry::Exceptions
@ Exceptions
Definition: layout.h:149
LayoutDocManager::Concept
@ Concept
Definition: layout.h:203
Translator::trDirectories
virtual QCString trDirectories()=0
LayoutDocManager::Class
@ Class
Definition: layout.h:203
QCString::find
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:38
LayoutDocEntry::ClassIncludes
@ ClassIncludes
Definition: layout.h:43
LayoutDocEntry::FileNamespaces
@ FileNamespaces
Definition: layout.h:57
LayoutParser::startDirectory
void startDirectory(const XMLHandlers::Attributes &)
Definition: layout.cpp:638
Translator::trRelatedPagesDescription
virtual QCString trRelatedPagesDescription()=0
MemberListType_proAttribs
@ MemberListType_proAttribs
Definition: types.h:119
Translator::trPrivateSlots
virtual QCString trPrivateSlots()=0
MemberListType_pubMethods
@ MemberListType_pubMethods
Definition: types.h:107
LayoutDocEntry::FileConcepts
@ FileConcepts
Definition: layout.h:57
ElementCallbacks::EndCallback
std::function< void(LayoutParser &)> EndCallback
Definition: layout.cpp:717
LayoutDocManager::docEntries
const LayoutDocEntryList & docEntries(LayoutPart part) const
Returns the list of LayoutDocEntry's in representation order for a given page identified by part.
Definition: layout.cpp:1580
xml.h
Translator::trConcept
virtual QCString trConcept(bool first_capital, bool singular)=0
LayoutDocEntry::MemberDefEnd
@ MemberDefEnd
Definition: layout.h:38
LayoutDocEntry::DirSubDirs
@ DirSubDirs
Definition: layout.h:68
Translator::trStaticPackageMembers
virtual QCString trStaticPackageMembers()=0
warn
void warn(const QCString &file, int line, const char *fmt,...)
Definition: message.cpp:151
LayoutDocManager::init
void init()
Definition: layout.cpp:1556
Translator::trPackageTypes
virtual QCString trPackageTypes()=0
Translator::trFunctionDocumentation
virtual QCString trFunctionDocumentation()=0
Debug::isFlagSet
static bool isFlagSet(DebugMask mask)
Definition: debug.cpp:99
MemberListType_interfaces
@ MemberListType_interfaces
Definition: types.h:184
LayoutParser::endNavEntry
void endNavEntry()
Definition: layout.cpp:566
LayoutDocEntry::NamespaceNestedConstantGroups
@ NamespaceNestedConstantGroups
Definition: layout.h:52
Translator::trDesignUnitMembers
virtual QCString trDesignUnitMembers()=0
LayoutDocEntry::GroupInlineClasses
@ GroupInlineClasses
Definition: layout.h:63
LayoutNavEntry::StructIndex
@ StructIndex
Definition: layout.h:148
LayoutDocManager::LayoutPart
LayoutPart
Definition: layout.h:201
MemberListType_decFriendMembers
@ MemberListType_decFriendMembers
Definition: types.h:161
MemberListType_decSequenceMembers
@ MemberListType_decSequenceMembers
Definition: types.h:190
LayoutDocManager::Group
@ Group
Definition: layout.h:203
Translator::trServices
virtual QCString trServices()=0
XMLLocator::lineNr
virtual int lineNr() const =0
Translator::trExceptionList
virtual QCString trExceptionList()=0
LayoutDocEntry::ClassCollaborationGraph
@ ClassCollaborationGraph
Definition: layout.h:45
LayoutDocEntryMemberDecl::title
QCString title(SrcLangExt lang) const
Definition: layout.cpp:1668
LayoutNavEntry::ExceptionHierarchy
@ ExceptionHierarchy
Definition: layout.h:152
XMLHandlers::error
std::function< ErrorType > error
handler invoked when the parser encounters an error
Definition: xml.h:55
LayoutDocManager::Namespace
@ Namespace
Definition: layout.h:203
LayoutParser::~LayoutParser
~LayoutParser()
Definition: layout.cpp:702
Translator::trCompoundMembersFortran
virtual QCString trCompoundMembersFortran()=0
Translator::trConceptDefinition
virtual QCString trConceptDefinition()=0
uint
unsigned uint
Definition: qcstring.h:40
LayoutParser::endMemberDecl
void endMemberDecl()
Definition: layout.cpp:685
Translator::trNamespaces
virtual QCString trNamespaces()=0
LayoutNavEntry::NamespaceMembers
@ NamespaceMembers
Definition: layout.h:135
SrcLangExt_ObjC
@ SrcLangExt_ObjC
Definition: types.h:49
LayoutDocManager
Singleton providing access to the (user configurable) layout of the documentation
Definition: layout.h:197
LayoutParser::m_userGroupCount
static int m_userGroupCount
Definition: layout.cpp:708
LayoutDocEntry::FileStructs
@ FileStructs
Definition: layout.h:57
XMLHandlers::endElement
std::function< EndElementType > endElement
handler invoked when a closing tag has been found
Definition: xml.h:53
MemberListType_docFriendMembers
@ MemberListType_docFriendMembers
Definition: types.h:176
LayoutDocEntryMemberDef
Represents of a member definition list with configurable title.
Definition: layout.h:110
Translator::trSubprogramDocumentation
virtual QCString trSubprogramDocumentation()=0
XMLLocator
Definition: xml.h:55
addHtmlExtensionIfMissing
QCString addHtmlExtensionIfMissing(const QCString &fName)
Definition: util.cpp:5275
XMLParser::parse
void parse(const char *fileName, const char *inputString, bool debugEnabled)
LayoutNavEntry::Files
@ Files
Definition: layout.h:153
LayoutDocEntry::FileIncludes
@ FileIncludes
Definition: layout.h:58
LayoutDocEntrySimple
Represents of a piece of a documentation page without configurable parts
Definition: layout.h:75
MemberListType_decPropMembers
@ MemberListType_decPropMembers
Definition: types.h:162
LayoutDocManager::~LayoutDocManager
~LayoutDocManager()
Definition: layout.cpp:1569
g_elementHandlers
static const std::map< std::string, ElementCallbacks > g_elementHandlers
Definition: layout.cpp:769
Translator::trExceptionHierarchy
virtual QCString trExceptionHierarchy()=0
MemberListType_pubSlots
@ MemberListType_pubSlots
Definition: types.h:115
LayoutParser::startGroup
void startGroup(const XMLHandlers::Attributes &)
Definition: layout.cpp:625
MemberListType_decVarMembers
@ MemberListType_decVarMembers
Definition: types.h:154
LayoutParser::startLayout
void startLayout(const XMLHandlers::Attributes &)
Definition: layout.cpp:242
Translator::trPackageMembers
virtual QCString trPackageMembers()=0
QCString::stripWhiteSpace
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition: qcstring.h:243
MemberListType_proStaticMethods
@ MemberListType_proStaticMethods
Definition: types.h:112
QCString::left
QCString left(size_t len) const
Definition: qcstring.h:212
Translator::trVariables
virtual QCString trVariables()=0
LayoutNavEntry::Modules
@ Modules
Definition: layout.h:132
message.h
Translator::trStructListDescription
virtual QCString trStructListDescription()=0
LayoutDocEntrySection
Definition: layout.h:84
Translator::trMemberEnumerationDocumentation
virtual QCString trMemberEnumerationDocumentation()=0
LayoutDocEntry::MemberDeclEnd
@ MemberDeclEnd
Definition: layout.h:37
Translator::trMemberFunctionDocumentationFortran
virtual QCString trMemberFunctionDocumentationFortran()=0
Translator::trExamplesDescription
virtual QCString trExamplesDescription()=0
MemberListType_decPriSlotMembers
@ MemberListType_decPriSlotMembers
Definition: types.h:158
LayoutParser::instance
static LayoutParser & instance()
Definition: layout.cpp:166
Translator::trClassHierarchy
virtual QCString trClassHierarchy()=0
LayoutParser::startMemberDefEntry
void startMemberDefEntry(const XMLHandlers::Attributes &attrib, MemberListType type, const QCString &title, const QCString &)
Definition: layout.cpp:229
LayoutDocEntry::MemberDefStart
@ MemberDefStart
Definition: layout.h:38
LayoutParser::endMemberDef
void endMemberDef()
Definition: layout.cpp:661
LayoutParser::m_scope
QCString m_scope
Definition: layout.cpp:704
Translator::trDataMemberDocumentation
virtual QCString trDataMemberDocumentation()=0
Translator::trFriends
virtual QCString trFriends()=0
LayoutDocEntry::DirFiles
@ DirFiles
Definition: layout.h:68
Translator::trPublicAttribs
virtual QCString trPublicAttribs()=0
theTranslator
Translator * theTranslator
Definition: language.cpp:156
resourcemgr.h
MemberListType_events
@ MemberListType_events
Definition: types.h:135
Translator::trInterfaceList
virtual QCString trInterfaceList()=0
MemberListType_decPubSlotMembers
@ MemberListType_decPubSlotMembers
Definition: types.h:156
Translator::trFileListDescription
virtual QCString trFileListDescription(bool extractAll)=0
doxygen.h
Translator::trVariableDocumentation
virtual QCString trVariableDocumentation()=0
LayoutDocEntry::NamespaceExceptions
@ NamespaceExceptions
Definition: layout.h:53
writeDefaultLayoutFile
void writeDefaultLayoutFile(const QCString &fileName)
Definition: layout.cpp:1614
LayoutNavEntry::Pages
@ Pages
Definition: layout.h:131
LayoutDocEntry::FileConstantGroups
@ FileConstantGroups
Definition: layout.h:57
MemberListType_docSignalMembers
@ MemberListType_docSignalMembers
Definition: types.h:174
Translator::trInterfaceHierarchyDescription
virtual QCString trInterfaceHierarchyDescription()=0
Translator::trConstructorDocumentation
virtual QCString trConstructorDocumentation()=0
language.h
Translator::trEventDocumentation
virtual QCString trEventDocumentation()=0
LayoutNavEntry::Examples
@ Examples
Definition: layout.h:156
LayoutNavEntry::FileGlobals
@ FileGlobals
Definition: layout.h:155
Translator::trVhdlType
virtual QCString trVhdlType(uint64 type, bool single)=0
MemberListType_docFuncMembers
@ MemberListType_docFuncMembers
Definition: types.h:168
LayoutDocEntry::GroupGraph
@ GroupGraph
Definition: layout.h:65
Translator::trMainPage
virtual QCString trMainPage()=0
LayoutParser::startClass
void startClass(const XMLHandlers::Attributes &)
Definition: layout.cpp:573
LayoutDocEntry::NamespaceStructs
@ NamespaceStructs
Definition: layout.h:53
ElementCallbacks
Definition: layout.cpp:714
fileToString
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
Definition: util.cpp:1394
compileOptions
QCString compileOptions(const QCString &def)
Definition: layout.cpp:35
TRUE
#define TRUE
Definition: qcstring.h:36
LayoutDocEntry
Base class representing a piece of a documentation page
Definition: layout.h:31
Translator::trPrivateMembers
virtual QCString trPrivateMembers()=0
Definition::getOutputFileBase
virtual QCString getOutputFileBase() const =0
LayoutNavEntry::InterfaceList
@ InterfaceList
Definition: layout.h:143
MemberListType_variableMembers
@ MemberListType_variableMembers
Definition: types.h:142
SrcLangExt_Fortran
@ SrcLangExt_Fortran
Definition: types.h:53
LayoutDocEntry::GroupNestedGroups
@ GroupNestedGroups
Definition: layout.h:64
QCString::toInt
int toInt(bool *ok=0, int base=10) const
Definition: qcstring.cpp:244
LayoutParser::endFile
void endFile()
Definition: layout.cpp:619
MemberListType_pacAttribs
@ MemberListType_pacAttribs
Definition: types.h:120
Translator::trConceptList
virtual QCString trConceptList()=0
Translator::trModulesMembers
virtual QCString trModulesMembers()=0
Translator::trStaticPrivateAttribs
virtual QCString trStaticPrivateAttribs()=0
Translator::trModulesListDescription
virtual QCString trModulesListDescription(bool extractAll)=0
ElementCallbacks::startCb
StartCallback startCb
Definition: layout.cpp:719
MemberListType_enumMembers
@ MemberListType_enumMembers
Definition: types.h:138
Translator::trTypedefs
virtual QCString trTypedefs()=0
MemberListType_decEnumMembers
@ MemberListType_decEnumMembers
Definition: types.h:152
Translator::trDesignUnitList
virtual QCString trDesignUnitList()=0
Translator::trDataTypes
virtual QCString trDataTypes()=0
MemberListType_pacTypes
@ MemberListType_pacTypes
Definition: types.h:128
LayoutDocManager::LayoutDocManager
LayoutDocManager()
Definition: layout.cpp:1550
MemberListType_priTypes
@ MemberListType_priTypes
Definition: types.h:129
Translator::trConceptListDescription
virtual QCString trConceptListDescription(bool extractAll)=0
Translator::trMemberTypedefDocumentation
virtual QCString trMemberTypedefDocumentation()=0
MemberListType_pubStaticAttribs
@ MemberListType_pubStaticAttribs
Definition: types.h:122
Translator::trInterfaces
virtual QCString trInterfaces()=0
Translator::trDesignUnitListDescription
virtual QCString trDesignUnitListDescription()=0
MemberListType_decDefineMembers
@ MemberListType_decDefineMembers
Definition: types.h:149
LayoutParser::startSimpleEntry
void startSimpleEntry(LayoutDocEntry::Kind k, const XMLHandlers::Attributes &attrib)
Definition: layout.cpp:184
LayoutDocManager::addEntry
void addEntry(LayoutPart p, LayoutDocEntry *e)
Definition: layout.cpp:1590
LayoutNavEntry::Structs
@ Structs
Definition: layout.h:146
LayoutParser::error
void error(const std::string &fileName, int lineNr, const std::string &msg)
Definition: layout.cpp:177
Translator::trExceptionListDescription
virtual QCString trExceptionListDescription()=0
Translator::trSliceInterfaces
virtual QCString trSliceInterfaces()=0
Translator::trConstantDocumentation
virtual QCString trConstantDocumentation()=0
QCString::setNum
QCString & setNum(short n)
Definition: qcstring.h:372
Translator::trStaticPackageAttribs
virtual QCString trStaticPackageAttribs()=0
Translator::trCompoundListDescription
virtual QCString trCompoundListDescription()=0
MemberListType_proMethods
@ MemberListType_proMethods
Definition: types.h:108
LayoutParser::m_invalidEntry
bool m_invalidEntry
Definition: layout.cpp:707
MemberListType_decFuncMembers
@ MemberListType_decFuncMembers
Definition: types.h:153
MemberListType_proTypes
@ MemberListType_proTypes
Definition: types.h:127
Translator::trProperties
virtual QCString trProperties()=0
LayoutDocEntryMemberDecl::subtitle
QCString subtitle(SrcLangExt lang) const
Definition: layout.cpp:1673
MemberListType_docPubSlotMembers
@ MemberListType_docPubSlotMembers
Definition: types.h:171
LayoutDocManager::Private::docEntries
std::array< LayoutDocEntryList, LayoutDocManager::NrParts > docEntries
Definition: layout.cpp:1546
Translator::trEnumerationTypeDocumentation
virtual QCString trEnumerationTypeDocumentation()=0
QCString::mid
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition: qcstring.h:224
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
MemberListType_pacMethods
@ MemberListType_pacMethods
Definition: types.h:109
MemberListType_interfaceMembers
@ MemberListType_interfaceMembers
Definition: types.h:186
LayoutDocManager::Private
Definition: layout.cpp:1543
LayoutNavEntry::ClassIndex
@ ClassIndex
Definition: layout.h:139
Translator::trExceptionIndex
virtual QCString trExceptionIndex()=0
MemberListType_proStaticAttribs
@ MemberListType_proStaticAttribs
Definition: types.h:123
Translator::trEnumerationValueDocumentation
virtual QCString trEnumerationValueDocumentation()=0
Translator::trCompoundMembersDescriptionFortran
virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)=0
XMLHandlers
Event handlers that can installed by the client and called while parsing a XML document.
Definition: xml.h:26
LayoutNavEntry::Concepts
@ Concepts
Definition: layout.h:136
Translator::trModulesMemberDescription
virtual QCString trModulesMemberDescription(bool extractAll)=0
LayoutDocEntry::ClassAllMembersLink
@ ClassAllMembersLink
Definition: layout.h:45
Translator::trModulesList
virtual QCString trModulesList()=0
LayoutParser::endDirectory
void endDirectory()
Definition: layout.cpp:645
Translator::trDesignUnitHierarchy
virtual QCString trDesignUnitHierarchy()=0
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
LayoutDocEntry::GroupDirs
@ GroupDirs
Definition: layout.h:64
MemberListType_related
@ MemberListType_related
Definition: types.h:130
layout.h
Translator::trTypedefDocumentation
virtual QCString trTypedefDocumentation()=0
Translator::trDefines
virtual QCString trDefines()=0
Translator::trSignals
virtual QCString trSignals()=0
Translator::trFile
virtual QCString trFile(bool first_capital, bool singular)=0
LayoutParser::endGroup
void endGroup()
Definition: layout.cpp:632
LayoutDocManager::clear
void clear(LayoutPart p)
Definition: layout.cpp:1595
Translator::trDefineDocumentation
virtual QCString trDefineDocumentation()=0
MemberListType_serviceMembers
@ MemberListType_serviceMembers
Definition: types.h:188
LayoutDocEntry::DetailedDesc
@ DetailedDesc
Definition: layout.h:39
MemberListType_priMethods
@ MemberListType_priMethods
Definition: types.h:110
msg
void msg(const char *fmt,...)
Definition: message.cpp:53
LayoutParser::setDocumentLocator
void setDocumentLocator(const XMLLocator *locator)
Definition: layout.cpp:173
MemberListType_docVarMembers
@ MemberListType_docVarMembers
Definition: types.h:169
LayoutDocManager::instance
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition: layout.cpp:1574
Translator::trNamespaceList
virtual QCString trNamespaceList()=0
LayoutDocEntry::FileInterfaces
@ FileInterfaces
Definition: layout.h:57
Translator::trCompoundList
virtual QCString trCompoundList()=0
MemberListType_proSlots
@ MemberListType_proSlots
Definition: types.h:116
MemberListType_decTypedefMembers
@ MemberListType_decTypedefMembers
Definition: types.h:151
LayoutDocManager::Private::rootNav
LayoutNavEntry * rootNav
Definition: layout.cpp:1547
Translator::trProtectedSlots
virtual QCString trProtectedSlots()=0
Translator::trProtectedMembers
virtual QCString trProtectedMembers()=0
Translator::trDesignUnits
virtual QCString trDesignUnits()=0
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
SrcLangExt_IDL
@ SrcLangExt_IDL
Definition: types.h:44
LayoutParser::startConcept
void startConcept(const XMLHandlers::Attributes &)
Definition: layout.cpp:599
LayoutNavEntry::ClassList
@ ClassList
Definition: layout.h:138
Translator::trNamespaceListDescription
virtual QCString trNamespaceListDescription(bool extractAll)=0
LayoutNavEntry::Classes
@ Classes
Definition: layout.h:137
LayoutDocEntry::MemberGroups
@ MemberGroups
Definition: layout.h:36
Config_getString
#define Config_getString(name)
Definition: config.h:32
LayoutDocEntry::ClassInlineClasses
@ ClassInlineClasses
Definition: layout.h:43
startCb
static ElementCallbacks::StartCallback startCb(void(LayoutParser::*fn)(const XMLHandlers::Attributes &))
Definition: layout.cpp:723
Translator::trMemberDataDocumentation
virtual QCString trMemberDataDocumentation()=0
LayoutDocEntrySection::m_title
QCString m_title
Definition: layout.h:90
Translator::trPublicSlots
virtual QCString trPublicSlots()=0
LayoutNavEntry::NamespaceList
@ NamespaceList
Definition: layout.h:134
LayoutNavEntry::Namespaces
@ Namespaces
Definition: layout.h:133
config.h
LayoutParser::endNavIndex
void endNavIndex()
Definition: layout.cpp:253
MemberListType_decSignalMembers
@ MemberListType_decSignalMembers
Definition: types.h:159
Translator::trOperationDocumentation
virtual QCString trOperationDocumentation()=0
MemberListType_docPriSlotMembers
@ MemberListType_docPriSlotMembers
Definition: types.h:173
MemberListType_pubAttribs
@ MemberListType_pubAttribs
Definition: types.h:118
Translator::trCompoundMembersDescription
virtual QCString trCompoundMembersDescription(bool extractAll)=0
Translator::trStructIndex
virtual QCString trStructIndex()=0
Translator::trClasses
virtual QCString trClasses()=0
LayoutParser::endElement
void endElement(const std::string &name)
Definition: layout.cpp:1518
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
Translator::trStaticProtectedMembers
virtual QCString trStaticProtectedMembers()=0
Translator::trStaticPrivateMembers
virtual QCString trStaticPrivateMembers()=0
MemberListType_docEnumValMembers
@ MemberListType_docEnumValMembers
Definition: types.h:170
LayoutDocEntryMemberDecl::m_title
QCString m_title
Definition: layout.h:105
Translator::trNamespaceMembers
virtual QCString trNamespaceMembers()=0
Translator::trFunctions
virtual QCString trFunctions()=0
LayoutDocEntry::BriefDesc
@ BriefDesc
Definition: layout.h:39
SrcLangExt_VHDL
@ SrcLangExt_VHDL
Definition: types.h:54
LayoutParser::m_part
int m_part
Definition: layout.cpp:705
Translator::trDictionaries
virtual QCString trDictionaries()=0
Translator::trPackages
virtual QCString trPackages()=0
LayoutDocEntry::NamespaceConcepts
@ NamespaceConcepts
Definition: layout.h:53
LayoutParser::startMemberDeclEntry
void startMemberDeclEntry(const XMLHandlers::Attributes &attrib, MemberListType type, const QCString &title, const QCString &subscript)
Definition: layout.cpp:212
Translator::trCompoundListFortran
virtual QCString trCompoundListFortran()=0
LayoutDocEntry::DirGraph
@ DirGraph
Definition: layout.h:68
Translator::trStructList
virtual QCString trStructList()=0
LayoutDocEntry::FileIncludeGraph
@ FileIncludeGraph
Definition: layout.h:58
MemberListType_eventMembers
@ MemberListType_eventMembers
Definition: types.h:144
Translator::trRelatedSubscript
virtual QCString trRelatedSubscript()=0
LayoutDocEntry::FileIncludedByGraph
@ FileIncludedByGraph
Definition: layout.h:59
MemberListType_pacStaticMethods
@ MemberListType_pacStaticMethods
Definition: types.h:113
LayoutNavEntry::ClassHierarchy
@ ClassHierarchy
Definition: layout.h:140
LayoutParser::LayoutParser
LayoutParser()
Definition: layout.cpp:701
LayoutDocEntry::ClassUsedFiles
@ ClassUsedFiles
Definition: layout.h:46
LayoutDocEntry::FileSourceLink
@ FileSourceLink
Definition: layout.h:59
Translator::trRelatedFunctionDocumentation
virtual QCString trRelatedFunctionDocumentation()=0
Translator::trStructs
virtual QCString trStructs()=0
MemberListType_properties
@ MemberListType_properties
Definition: types.h:134
Translator::trInterfaceListDescription
virtual QCString trInterfaceListDescription()=0
LayoutNavEntry::InterfaceIndex
@ InterfaceIndex
Definition: layout.h:144
endCb
static ElementCallbacks::EndCallback endCb(void(LayoutParser::*fn)())
Definition: layout.cpp:759
Translator::trInterfaceIndex
virtual QCString trInterfaceIndex()=0
Translator::trExamples
virtual QCString trExamples()=0
LayoutDocEntry::ClassNestedClasses
@ ClassNestedClasses
Definition: layout.h:44
LayoutNavEntry::ClassMembers
@ ClassMembers
Definition: layout.h:141
Translator::trStaticProtectedAttribs
virtual QCString trStaticProtectedAttribs()=0
LayoutDocManager::parse
void parse(const QCString &fileName)
Parses a user provided layout
Definition: layout.cpp:1600
LayoutNavEntry::clear
void clear()
Definition: layout.h:176
util.h
A bunch of utility functions.
MemberListType_relatedMembers
@ MemberListType_relatedMembers
Definition: types.h:141
LayoutNavEntry::baseFile
QCString baseFile() const
Definition: layout.h:171
Translator::trProtectedAttribs
virtual QCString trProtectedAttribs()=0
MemberListType_pubStaticMethods
@ MemberListType_pubStaticMethods
Definition: types.h:111
LayoutDocEntry::FileExceptions
@ FileExceptions
Definition: layout.h:57
LayoutNavEntry::ExceptionIndex
@ ExceptionIndex
Definition: layout.h:151
LayoutNavEntry::MainPage
@ MainPage
Definition: layout.h:130
LayoutNavEntry::InterfaceHierarchy
@ InterfaceHierarchy
Definition: layout.h:145
LayoutDocEntry::NamespaceInterfaces
@ NamespaceInterfaces
Definition: layout.h:53
Translator::trFileMembers
virtual QCString trFileMembers()=0
Translator::trRelatedFunctions
virtual QCString trRelatedFunctions()=0
LayoutDocEntry::FileInlineClasses
@ FileInlineClasses
Definition: layout.h:60
LayoutDocEntry::GroupNamespaces
@ GroupNamespaces
Definition: layout.h:63
Translator::trPublicTypes
virtual QCString trPublicTypes()=0
LayoutParser::startSectionEntry
void startSectionEntry(LayoutDocEntry::Kind k, const XMLHandlers::Attributes &attrib, const QCString &title)
Definition: layout.cpp:196
MemberListType_docEventMembers
@ MemberListType_docEventMembers
Definition: types.h:175
QCString::right
QCString right(size_t len) const
Definition: qcstring.h:217
Translator::trCompoundIndex
virtual QCString trCompoundIndex()=0
MemberListType_docTypedefMembers
@ MemberListType_docTypedefMembers
Definition: types.h:166
MemberListType_docPropMembers
@ MemberListType_docPropMembers
Definition: types.h:177
Translator::trPropertyDocumentation
virtual QCString trPropertyDocumentation()=0
openOutputFile
bool openOutputFile(const QCString &outFile, std::ofstream &f)
Definition: util.cpp:7039
ElementCallbacks::StartCallback
std::function< void(LayoutParser &, const XMLHandlers::Attributes &)> StartCallback
Definition: layout.cpp:716
QCString::sprintf
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:24
MemberListType_propertyMembers
@ MemberListType_propertyMembers
Definition: types.h:143
debug.h
vhdldocgen.h
LayoutDocEntrySection::title
QCString title(SrcLangExt lang) const
Definition: layout.cpp:1661
LayoutDocEntry::AuthorSection
@ AuthorSection
Definition: layout.h:40
XMLHandlers::value
static std::string value(const Attributes &attrib, const std::string &key)
Definition: xml.h:57
LayoutNavEntry::parent
LayoutNavEntry * parent() const
Definition: layout.h:169
FALSE
#define FALSE
Definition: qcstring.h:33
SrcLangExt_Slice
@ SrcLangExt_Slice
Definition: types.h:59
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108