Doxygen
xmlgen.cpp
浏览该文件的文档.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 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 #include <stdlib.h>
17 
18 #include "textstream.h"
19 #include "xmlgen.h"
20 #include "doxygen.h"
21 #include "message.h"
22 #include "config.h"
23 #include "classlist.h"
24 #include "util.h"
25 #include "defargs.h"
26 #include "outputgen.h"
27 #include "dot.h"
28 #include "dotclassgraph.h"
29 #include "dotincldepgraph.h"
30 #include "pagedef.h"
31 #include "filename.h"
32 #include "version.h"
33 #include "xmldocvisitor.h"
34 #include "docparser.h"
35 #include "language.h"
36 #include "parserintf.h"
37 #include "arguments.h"
38 #include "memberlist.h"
39 #include "groupdef.h"
40 #include "memberdef.h"
41 #include "namespacedef.h"
42 #include "membername.h"
43 #include "membergroup.h"
44 #include "dirdef.h"
45 #include "section.h"
46 #include "htmlentity.h"
47 #include "resourcemgr.h"
48 #include "dir.h"
49 #include "utf8.h"
50 
51 // no debug info
52 #define XML_DB(x) do {} while(0)
53 // debug to stdout
54 //#define XML_DB(x) printf x
55 // debug inside output
56 //#define XML_DB(x) QCString __t;__t.sprintf x;m_t << __t
57 
58 //------------------
59 
60 static std::map<MemberListType,std::string> g_xmlSectionMap =
61 {
62  { MemberListType_pubTypes,"public-type" },
63  { MemberListType_pubMethods,"public-func" },
64  { MemberListType_pubAttribs,"public-attrib" },
65  { MemberListType_pubSlots,"public-slot" },
66  { MemberListType_signals,"signal" },
67  { MemberListType_dcopMethods,"dcop-func" },
68  { MemberListType_properties,"property" },
69  { MemberListType_events,"event" },
70  { MemberListType_interfaces,"interfaces" },
71  { MemberListType_services,"services" },
72  { MemberListType_pubStaticMethods,"public-static-func" },
73  { MemberListType_pubStaticAttribs,"public-static-attrib" },
74  { MemberListType_proTypes,"protected-type" },
75  { MemberListType_proMethods,"protected-func" },
76  { MemberListType_proAttribs,"protected-attrib" },
77  { MemberListType_proSlots,"protected-slot" },
78  { MemberListType_proStaticMethods,"protected-static-func" },
79  { MemberListType_proStaticAttribs,"protected-static-attrib" },
80  { MemberListType_pacTypes,"package-type" },
81  { MemberListType_pacMethods,"package-func" },
82  { MemberListType_pacAttribs,"package-attrib" },
83  { MemberListType_pacStaticMethods,"package-static-func" },
84  { MemberListType_pacStaticAttribs,"package-static-attrib" },
85  { MemberListType_priTypes,"private-type" },
86  { MemberListType_priMethods,"private-func" },
87  { MemberListType_priAttribs,"private-attrib" },
88  { MemberListType_priSlots,"private-slot" },
89  { MemberListType_priStaticMethods,"private-static-func" },
90  { MemberListType_priStaticAttribs,"private-static-attrib" },
91  { MemberListType_friends,"friend" },
92  { MemberListType_related,"related" },
94  { MemberListType_decProtoMembers,"prototype" },
96  { MemberListType_decSequenceMembers,"sequence" },
97  { MemberListType_decDictionaryMembers,"dictionary" },
101 };
102 
103 static const char *xmlSectionMapper(MemberListType ml)
104 {
105  auto it = g_xmlSectionMap.find(ml);
106  return it!=g_xmlSectionMap.end() ? it->second.c_str() : "";
107 }
108 
109 
110 inline void writeXMLString(TextStream &t,const QCString &s)
111 {
112  t << convertToXML(s);
113 }
114 
115 inline void writeXMLCodeString(TextStream &t,const QCString &str, int &col)
116 {
117  if (str.isEmpty()) return;
118  const char *s = str.data();
119  char c;
120  while ((c=*s++))
121  {
122  switch(c)
123  {
124  case '\t':
125  {
126  static int tabSize = Config_getInt(TAB_SIZE);
127  int spacesToNextTabStop = tabSize - (col%tabSize);
128  col+=spacesToNextTabStop;
129  while (spacesToNextTabStop--) t << "<sp/>";
130  break;
131  }
132  case ' ': t << "<sp/>"; col++; break;
133  case '<': t << "&lt;"; col++; break;
134  case '>': t << "&gt;"; col++; break;
135  case '&': t << "&amp;"; col++; break;
136  case '\'': t << "&apos;"; col++; break;
137  case '"': t << "&quot;"; col++; break;
138  case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:
139  case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18:
140  case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26:
141  case 27: case 28: case 29: case 30: case 31:
142  // encode invalid XML characters (see http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char)
143  t << "<sp value=\"" << int(c) << "\"/>";
144  break;
145  default: s=writeUTF8Char(t,s-1); col++; break;
146  }
147  }
148 }
149 
150 
151 static void writeXMLHeader(TextStream &t)
152 {
153  t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";;
154  t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
155  t << "xsi:noNamespaceSchemaLocation=\"compound.xsd\" ";
156  t << "version=\"" << getDoxygenVersion() << "\" ";
157  t << "xml:lang=\"" << theTranslator->trISOLang() << "\"";
158  t << ">\n";
159 }
160 
161 static void writeCombineScript()
162 {
163  QCString outputDirectory = Config_getString(XML_OUTPUT);
164  QCString fileName=outputDirectory+"/combine.xslt";
165  std::ofstream t(fileName.str(),std::ofstream::out | std::ofstream::binary);
166  if (!t.is_open())
167  {
168  err("Cannot open file %s for writing!\n",qPrint(fileName));
169  return;
170  }
171 
172  t <<
173  "<!-- XSLT script to combine the generated output into a single file. \n"
174  " If you have xsltproc you could use:\n"
175  " xsltproc combine.xslt index.xml >all.xml\n"
176  "-->\n"
177  "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n"
178  " <xsl:output method=\"xml\" version=\"1.0\" indent=\"no\" standalone=\"yes\" />\n"
179  " <xsl:template match=\"/\">\n"
180  " <doxygen version=\"{doxygenindex/@version}\" xml:lang=\"{doxygenindex/@xml:lang}\">\n"
181  " <!-- Load all doxygen generated xml files -->\n"
182  " <xsl:for-each select=\"doxygenindex/compound\">\n"
183  " <xsl:copy-of select=\"document( concat( @refid, '.xml' ) )/doxygen/*\" />\n"
184  " </xsl:for-each>\n"
185  " </doxygen>\n"
186  " </xsl:template>\n"
187  "</xsl:stylesheet>\n";
188 
189 }
190 
191 void writeXMLLink(TextStream &t,const QCString &extRef,const QCString &compoundId,
192  const QCString &anchorId,const QCString &text,const QCString &tooltip)
193 {
194  t << "<ref refid=\"" << compoundId;
195  if (!anchorId.isEmpty()) t << "_1" << anchorId;
196  t << "\" kindref=\"";
197  if (!anchorId.isEmpty()) t << "member"; else t << "compound";
198  t << "\"";
199  if (!extRef.isEmpty()) t << " external=\"" << extRef << "\"";
200  if (!tooltip.isEmpty()) t << " tooltip=\"" << convertToXML(tooltip) << "\"";
201  t << ">";
202  writeXMLString(t,text);
203  t << "</ref>";
204 }
205 
206 /** Implements TextGeneratorIntf for an XML stream. */
208 {
209  public:
211  void writeString(const QCString &s,bool /*keepSpaces*/) const
212  {
213  writeXMLString(m_t,s);
214  }
215  void writeBreak(int) const {}
216  void writeLink(const QCString &extRef,const QCString &file,
217  const QCString &anchor,const QCString &text
218  ) const
219  {
220  writeXMLLink(m_t,extRef,file,anchor,text,QCString());
221  }
222  private:
224 };
225 
226 //-------------------------------------------------------------------------------------------
227 
228 XMLCodeGenerator::XMLCodeGenerator(TextStream &t) : m_t(t), m_lineNumber(-1), m_isMemberRef(FALSE), m_col(0),
229  m_insideCodeLine(FALSE), m_normalHLNeedStartTag(TRUE), m_insideSpecialHL(FALSE)
230 {
231 }
232 
233 /** Generator for producing XML formatted source code. */
235 {
236  XML_DB(("(codify \"%s\")\n",text));
238  {
239  m_t << "<highlight class=\"normal\">";
241  }
243 }
245  const QCString &ref,const QCString &file,
246  const QCString &anchor,const QCString &name,
247  const QCString &tooltip)
248 {
249  XML_DB(("(writeCodeLink)\n"));
251  {
252  m_t << "<highlight class=\"normal\">";
254  }
255  writeXMLLink(m_t,ref,file,anchor,name,tooltip);
256  m_col+=name.length();
257 }
259  const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
260  )
261 {
262  XML_DB(("(writeToolTip)\n"));
263 }
265 {
266  XML_DB(("(startCodeLine)\n"));
267  m_t << "<codeline";
268  if (m_lineNumber!=-1)
269  {
270  m_t << " lineno=\"" << m_lineNumber << "\"";
271  if (!m_refId.isEmpty())
272  {
273  m_t << " refid=\"" << m_refId << "\"";
274  if (m_isMemberRef)
275  {
276  m_t << " refkind=\"member\"";
277  }
278  else
279  {
280  m_t << " refkind=\"compound\"";
281  }
282  }
283  if (!m_external.isEmpty())
284  {
285  m_t << " external=\"" << m_external << "\"";
286  }
287  }
288  m_t << ">";
290  m_col=0;
291 }
293 {
294  XML_DB(("(endCodeLine)\n"));
296  {
297  m_t << "</highlight>";
299  }
300  m_t << "</codeline>\n"; // non DocBook
301  m_lineNumber = -1;
302  m_refId.resize(0);
303  m_external.resize(0);
305 }
307 {
308  XML_DB(("(startFontClass)\n"));
310  {
311  m_t << "</highlight>";
313  }
314  m_t << "<highlight class=\"" << colorClass << "\">"; // non DocBook
316 }
318 {
319  XML_DB(("(endFontClass)\n"));
320  m_t << "</highlight>"; // non DocBook
322 }
324 {
325  XML_DB(("(writeCodeAnchor)\n"));
326 }
327 void XMLCodeGenerator::writeLineNumber(const QCString &extRef,const QCString &compId,
328  const QCString &anchorId,int l,bool)
329 {
330  XML_DB(("(writeLineNumber)\n"));
331  // we remember the information provided here to use it
332  // at the <codeline> start tag.
333  m_lineNumber = l;
334  if (!compId.isEmpty())
335  {
336  m_refId=compId;
337  if (!anchorId.isEmpty()) m_refId+=(QCString)"_1"+anchorId;
338  m_isMemberRef = anchorId!=0;
339  if (!extRef.isEmpty()) m_external=extRef;
340  }
341 }
343 {
345 }
346 
348 {
349  m_t << " <programlisting>\n";
350 }
351 
353 {
354  m_t << " </programlisting>\n";
355 }
356 
357 //-------------------------------------------------------------------------------------------
358 
360  const ArgumentList &al,
361  const Definition *scope,
362  const FileDef *fileScope,
363  int indent)
364 {
365  QCString indentStr;
366  indentStr.fill(' ',indent);
367  if (al.hasParameters())
368  {
369  t << indentStr << "<templateparamlist>\n";
370  for (const Argument &a : al)
371  {
372  t << indentStr << " <param>\n";
373  if (!a.type.isEmpty())
374  {
375  t << indentStr << " <type>";
376  linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a.type);
377  t << "</type>\n";
378  }
379  if (!a.name.isEmpty())
380  {
381  t << indentStr << " <declname>" << convertToXML(a.name) << "</declname>\n";
382  t << indentStr << " <defname>" << convertToXML(a.name) << "</defname>\n";
383  }
384  if (!a.defval.isEmpty())
385  {
386  t << indentStr << " <defval>";
387  linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a.defval);
388  t << "</defval>\n";
389  }
390  if (!a.typeConstraint.isEmpty())
391  {
392  t << indentStr << " <typeconstraint>";
393  linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a.typeConstraint);
394  t << "</typeconstraint>\n";
395  }
396  t << indentStr << " </param>\n";
397  }
398  t << indentStr << "</templateparamlist>\n";
399  }
400 }
401 
403 {
405 }
406 
407 static void writeTemplateList(const ClassDef *cd,TextStream &t)
408 {
410 }
411 
412 static void writeTemplateList(const ConceptDef *cd,TextStream &t)
413 {
415 }
416 
418  const QCString &fileName,
419  int lineNr,
420  const Definition *scope,
421  const MemberDef * md,
422  const QCString &text)
423 {
424  QCString stext = text.stripWhiteSpace();
425  if (stext.isEmpty()) return;
426  // convert the documentation string into an abstract syntax tree
427  std::unique_ptr<IDocParser> parser { createDocParser() };
428  std::unique_ptr<DocNode> root { validatingParseDoc(*parser.get(),
429  fileName,lineNr,scope,md,text,FALSE,FALSE,
430  QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
431  // create a code generator
432  auto xmlCodeGen = std::make_unique<XMLCodeGenerator>(t);
433  // create a parse tree visitor for XML
434  auto visitor = std::make_unique<XmlDocVisitor>(t,*xmlCodeGen,scope?scope->getDefFileExtension():QCString(""));
435  // visit all nodes
436  root->accept(visitor.get());
437  // clean up
438 }
439 
441 {
444  intf->resetCodeParserState();
445  XMLCodeGenerator *xmlGen = new XMLCodeGenerator(t);
446  xmlGen->startCodeFragment("DoxyCode");
447  intf->parseCode(*xmlGen, // codeOutIntf
448  QCString(), // scopeName
449  fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES)),
450  langExt, // lang
451  FALSE, // isExampleBlock
452  QCString(), // exampleName
453  fd, // fileDef
454  -1, // startLine
455  -1, // endLine
456  FALSE, // inlineFragment
457  0, // memberDef
458  TRUE // showLineNumbers
459  );
460  xmlGen->endCodeFragment("DoxyCode");
461  xmlGen->finish();
462  delete xmlGen;
463 }
464 
465 static void writeMemberReference(TextStream &t,const Definition *def,const MemberDef *rmd,const QCString &tagName)
466 {
467  QCString scope = rmd->getScopeString();
468  QCString name = rmd->name();
469  if (!scope.isEmpty() && scope!=def->name())
470  {
472  }
473  t << " <" << tagName << " refid=\"";
474  t << rmd->getOutputFileBase() << "_1" << rmd->anchor() << "\"";
475  if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
476  {
477  t << " compoundref=\"" << rmd->getBodyDef()->getOutputFileBase() << "\"";
478  t << " startline=\"" << rmd->getStartBodyLine() << "\"";
479  if (rmd->getEndBodyLine()!=-1)
480  {
481  t << " endline=\"" << rmd->getEndBodyLine() << "\"";
482  }
483  }
484  t << ">" << convertToXML(name) << "</" << tagName << ">\n";
485 
486 }
487 
488 static void stripQualifiers(QCString &typeStr)
489 {
490  bool done=FALSE;
491  typeStr.stripPrefix("friend ");
492  while (!done)
493  {
494  if (typeStr.stripPrefix("static "));
495  else if (typeStr.stripPrefix("virtual "));
496  else if (typeStr=="virtual") typeStr="";
497  else done=TRUE;
498  }
499 }
500 
502 {
503  //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
504  //if (inlineGroupedClasses && cd->partOfGroups()!=0)
505  return cd->getOutputFileBase();
506  //else
507  // return cd->getOutputFileBase();
508 }
509 
511 {
512  //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
513  //if (inlineGroupedClasses && md->getClassDef() && md->getClassDef()->partOfGroups()!=0)
514  // return md->getClassDef()->getXmlOutputFileBase();
515  //else
516  // return md->getOutputFileBase();
517  return md->getOutputFileBase();
518 }
519 
520 
521 static void generateXMLForMember(const MemberDef *md,TextStream &ti,TextStream &t,const Definition *def)
522 {
523 
524  // + declaration/definition arg lists
525  // + reimplements
526  // + reimplementedBy
527  // + exceptions
528  // + const/volatile specifiers
529  // - examples
530  // + source definition
531  // + source references
532  // + source referenced by
533  // - body code
534  // + template arguments
535  // (templateArguments(), definitionTemplateParameterLists())
536  // - call graph
537 
538  // enum values are written as part of the enum
539  if (md->memberType()==MemberType_EnumValue) return;
540  if (md->isHidden()) return;
541 
542  // group members are only visible in their group
543  //if (def->definitionType()!=Definition::TypeGroup && md->getGroupDef()) return;
544 
545  QCString memType;
546  bool isFunc=FALSE;
547  switch (md->memberType())
548  {
549  case MemberType_Define: memType="define"; break;
550  case MemberType_Function: memType="function"; isFunc=TRUE; break;
551  case MemberType_Variable: memType="variable"; break;
552  case MemberType_Typedef: memType="typedef"; break;
553  case MemberType_Enumeration: memType="enum"; break;
554  case MemberType_EnumValue: ASSERT(0); break;
555  case MemberType_Signal: memType="signal"; isFunc=TRUE; break;
556  case MemberType_Slot: memType="slot"; isFunc=TRUE; break;
557  case MemberType_Friend: memType="friend"; isFunc=TRUE; break;
558  case MemberType_DCOP: memType="dcop"; isFunc=TRUE; break;
559  case MemberType_Property: memType="property"; break;
560  case MemberType_Event: memType="event"; break;
561  case MemberType_Interface: memType="interface"; break;
562  case MemberType_Service: memType="service"; break;
563  case MemberType_Sequence: memType="sequence"; break;
564  case MemberType_Dictionary: memType="dictionary"; break;
565  }
566 
567  ti << " <member refid=\"" << memberOutputFileBase(md)
568  << "_1" << md->anchor() << "\" kind=\"" << memType << "\"><name>"
569  << convertToXML(md->name()) << "</name></member>\n";
570 
571  QCString scopeName;
572  if (md->getClassDef())
573  scopeName=md->getClassDef()->name();
574  else if (md->getNamespaceDef())
575  scopeName=md->getNamespaceDef()->name();
576 
577  t << " <memberdef kind=\"";
578  //enum { define_t,variable_t,typedef_t,enum_t,function_t } xmlType = function_t;
579  t << memType << "\" id=\"";
580  if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
581  {
582  t << md->getGroupDef()->getOutputFileBase();
583  }
584  else
585  {
586  t << memberOutputFileBase(md);
587  }
588  t << "_1" // encoded ':' character (see util.cpp:convertNameToFile)
589  << md->anchor();
590  t << "\" prot=\"";
591  switch(md->protection())
592  {
593  case Public: t << "public"; break;
594  case Protected: t << "protected"; break;
595  case Private: t << "private"; break;
596  case Package: t << "package"; break;
597  }
598  t << "\"";
599 
600  t << " static=\"";
601  if (md->isStatic()) t << "yes"; else t << "no";
602  t << "\"";
603 
604  if (md->isConstExpr())
605  {
606  t << " constexpr=\"yes\"";
607  }
608 
609  if (isFunc)
610  {
611  const ArgumentList &al = md->argumentList();
612  t << " const=\"";
613  if (al.constSpecifier()) t << "yes"; else t << "no";
614  t << "\"";
615 
616  t << " explicit=\"";
617  if (md->isExplicit()) t << "yes"; else t << "no";
618  t << "\"";
619 
620  t << " inline=\"";
621  if (md->isInline()) t << "yes"; else t << "no";
622  t << "\"";
623 
624  if (al.refQualifier()!=RefQualifierNone)
625  {
626  t << " refqual=\"";
627  if (al.refQualifier()==RefQualifierLValue) t << "lvalue"; else t << "rvalue";
628  t << "\"";
629  }
630 
631  if (md->isFinal())
632  {
633  t << " final=\"yes\"";
634  }
635 
636  if (md->isSealed())
637  {
638  t << " sealed=\"yes\"";
639  }
640 
641  if (md->isNew())
642  {
643  t << " new=\"yes\"";
644  }
645 
646  if (md->isOptional())
647  {
648  t << " optional=\"yes\"";
649  }
650 
651  if (md->isRequired())
652  {
653  t << " required=\"yes\"";
654  }
655 
656  if (md->isNoExcept())
657  {
658  t << " noexcept=\"yes\"";
659  }
660 
661  if (al.volatileSpecifier())
662  {
663  t << " volatile=\"yes\"";
664  }
665 
666  t << " virt=\"";
667  switch (md->virtualness())
668  {
669  case Normal: t << "non-virtual"; break;
670  case Virtual: t << "virtual"; break;
671  case Pure: t << "pure-virtual"; break;
672  default: ASSERT(0);
673  }
674  t << "\"";
675  }
676 
677  if (md->memberType() == MemberType_Enumeration)
678  {
679  t << " strong=\"";
680  if (md->isStrong()) t << "yes"; else t << "no";
681  t << "\"";
682  }
683 
684  if (md->memberType() == MemberType_Variable)
685  {
686  //ArgumentList *al = md->argumentList();
687  //t << " volatile=\"";
688  //if (al && al->volatileSpecifier) t << "yes"; else t << "no";
689 
690  t << " mutable=\"";
691  if (md->isMutable()) t << "yes"; else t << "no";
692  t << "\"";
693 
694  if (md->isInitonly())
695  {
696  t << " initonly=\"yes\"";
697  }
698  if (md->isAttribute())
699  {
700  t << " attribute=\"yes\"";
701  }
702  if (md->isUNOProperty())
703  {
704  t << " property=\"yes\"";
705  }
706  if (md->isReadonly())
707  {
708  t << " readonly=\"yes\"";
709  }
710  if (md->isBound())
711  {
712  t << " bound=\"yes\"";
713  }
714  if (md->isRemovable())
715  {
716  t << " removable=\"yes\"";
717  }
718  if (md->isConstrained())
719  {
720  t << " constrained=\"yes\"";
721  }
722  if (md->isTransient())
723  {
724  t << " transient=\"yes\"";
725  }
726  if (md->isMaybeVoid())
727  {
728  t << " maybevoid=\"yes\"";
729  }
730  if (md->isMaybeDefault())
731  {
732  t << " maybedefault=\"yes\"";
733  }
734  if (md->isMaybeAmbiguous())
735  {
736  t << " maybeambiguous=\"yes\"";
737  }
738  }
739  else if (md->memberType() == MemberType_Property)
740  {
741  t << " readable=\"";
742  if (md->isReadable()) t << "yes"; else t << "no";
743  t << "\"";
744 
745  t << " writable=\"";
746  if (md->isWritable()) t << "yes"; else t << "no";
747  t << "\"";
748 
749  t << " gettable=\"";
750  if (md->isGettable()) t << "yes"; else t << "no";
751  t << "\"";
752 
753  t << " privategettable=\"";
754  if (md->isPrivateGettable()) t << "yes"; else t << "no";
755  t << "\"";
756 
757  t << " protectedgettable=\"";
758  if (md->isProtectedGettable()) t << "yes"; else t << "no";
759  t << "\"";
760 
761  t << " settable=\"";
762  if (md->isSettable()) t << "yes"; else t << "no";
763  t << "\"";
764 
765  t << " privatesettable=\"";
766  if (md->isPrivateSettable()) t << "yes"; else t << "no";
767  t << "\"";
768 
769  t << " protectedsettable=\"";
770  if (md->isProtectedSettable()) t << "yes"; else t << "no";
771  t << "\"";
772 
773  if (md->isAssign() || md->isCopy() || md->isRetain() || md->isStrong() || md->isWeak())
774  {
775  t << " accessor=\"";
776  if (md->isAssign()) t << "assign";
777  else if (md->isCopy()) t << "copy";
778  else if (md->isRetain()) t << "retain";
779  else if (md->isStrong()) t << "strong";
780  else if (md->isWeak()) t << "weak";
781  t << "\"";
782  }
783  }
784  else if (md->memberType() == MemberType_Event)
785  {
786  t << " add=\"";
787  if (md->isAddable()) t << "yes"; else t << "no";
788  t << "\"";
789 
790  t << " remove=\"";
791  if (md->isRemovable()) t << "yes"; else t << "no";
792  t << "\"";
793 
794  t << " raise=\"";
795  if (md->isRaisable()) t << "yes"; else t << "no";
796  t << "\"";
797  }
798 
799  t << ">\n";
800 
801  if (md->memberType()!=MemberType_Define &&
803  )
804  {
806  QCString typeStr = md->typeString();
807  stripQualifiers(typeStr);
808  t << " <type>";
809  linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,typeStr);
810  t << "</type>\n";
811  t << " <definition>" << convertToXML(md->definition()) << "</definition>\n";
812  t << " <argsstring>" << convertToXML(md->argsString()) << "</argsstring>\n";
813  }
814 
815  if (md->memberType() == MemberType_Enumeration)
816  {
817  t << " <type>";
819  t << "</type>\n";
820  }
821 
822  t << " <name>" << convertToXML(md->name()) << "</name>\n";
823 
824  if (md->memberType() == MemberType_Property)
825  {
826  if (md->isReadable())
827  t << " <read>" << convertToXML(md->getReadAccessor()) << "</read>\n";
828  if (md->isWritable())
829  t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>\n";
830  }
831 
832  if (md->memberType()==MemberType_Variable && !md->bitfieldString().isEmpty())
833  {
834  QCString bitfield = md->bitfieldString();
835  if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
836  t << " <bitfield>" << convertToXML(bitfield) << "</bitfield>\n";
837  }
838 
839  const MemberDef *rmd = md->reimplements();
840  if (rmd)
841  {
842  t << " <reimplements refid=\""
843  << memberOutputFileBase(rmd) << "_1" << rmd->anchor() << "\">"
844  << convertToXML(rmd->name()) << "</reimplements>\n";
845  }
846  for (const auto &rbmd : md->reimplementedBy())
847  {
848  t << " <reimplementedby refid=\""
849  << memberOutputFileBase(rbmd) << "_1" << rbmd->anchor() << "\">"
850  << convertToXML(rbmd->name()) << "</reimplementedby>\n";
851  }
852 
853  if (md->isFriendClass()) // for friend classes we show a link to the class as a "parameter"
854  {
855  t << " <param>\n";
856  t << " <type>";
857  linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,md->name());
858  t << "</type>\n";
859  t << " </param>\n";
860  }
861  else if (isFunc) //function
862  {
863  const ArgumentList &declAl = md->declArgumentList();
864  const ArgumentList &defAl = md->argumentList();
865  if (declAl.hasParameters())
866  {
867  auto defIt = defAl.begin();
868  for (const Argument &a : declAl)
869  {
870  //const Argument *defArg = defAli.current();
871  const Argument *defArg = 0;
872  if (defIt!=defAl.end())
873  {
874  defArg = &(*defIt);
875  ++defIt;
876  }
877  t << " <param>\n";
878  if (!a.attrib.isEmpty())
879  {
880  t << " <attributes>";
881  writeXMLString(t,a.attrib);
882  t << "</attributes>\n";
883  }
884  if (!a.type.isEmpty())
885  {
886  t << " <type>";
887  linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,a.type);
888  t << "</type>\n";
889  }
890  if (!a.name.isEmpty())
891  {
892  t << " <declname>";
893  writeXMLString(t,a.name);
894  t << "</declname>\n";
895  }
896  if (defArg && !defArg->name.isEmpty() && defArg->name!=a.name)
897  {
898  t << " <defname>";
899  writeXMLString(t,defArg->name);
900  t << "</defname>\n";
901  }
902  if (!a.array.isEmpty())
903  {
904  t << " <array>";
905  writeXMLString(t,a.array);
906  t << "</array>\n";
907  }
908  if (!a.defval.isEmpty())
909  {
910  t << " <defval>";
911  linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,a.defval);
912  t << "</defval>\n";
913  }
914  if (defArg && defArg->hasDocumentation())
915  {
916  t << " <briefdescription>";
918  md->getOuterScope(),md,defArg->docs);
919  t << "</briefdescription>\n";
920  }
921  t << " </param>\n";
922  }
923  }
924  }
925  else if (md->memberType()==MemberType_Define &&
926  !md->argsString().isEmpty()) // define
927  {
928  if (md->argumentList().empty()) // special case for "foo()" to
929  // distinguish it from "foo".
930  {
931  t << " <param></param>\n";
932  }
933  else
934  {
935  for (const Argument &a : md->argumentList())
936  {
937  t << " <param><defname>" << a.type << "</defname></param>\n";
938  }
939  }
940  }
941  if (!md->requiresClause().isEmpty())
942  {
943  t << " <requiresclause>";
945  t << " </requiresclause>\n";
946  }
947 
949  {
950  t << " <initializer>";
952  t << "</initializer>\n";
953  }
954 
955  if (!md->excpString().isEmpty())
956  {
957  t << " <exceptions>";
958  linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,md->excpString());
959  t << "</exceptions>\n";
960  }
961 
962  if (md->memberType()==MemberType_Enumeration) // enum
963  {
964  for (const auto &emd : md->enumFieldList())
965  {
966  ti << " <member refid=\"" << memberOutputFileBase(md)
967  << "_1" << emd->anchor() << "\" kind=\"enumvalue\"><name>"
968  << convertToXML(emd->name()) << "</name></member>\n";
969 
970  t << " <enumvalue id=\"" << memberOutputFileBase(md) << "_1"
971  << emd->anchor() << "\" prot=\"";
972  switch (emd->protection())
973  {
974  case Public: t << "public"; break;
975  case Protected: t << "protected"; break;
976  case Private: t << "private"; break;
977  case Package: t << "package"; break;
978  }
979  t << "\">\n";
980  t << " <name>";
981  writeXMLString(t,emd->name());
982  t << "</name>\n";
983  if (!emd->initializer().isEmpty())
984  {
985  t << " <initializer>";
986  writeXMLString(t,emd->initializer());
987  t << "</initializer>\n";
988  }
989  t << " <briefdescription>\n";
990  writeXMLDocBlock(t,emd->briefFile(),emd->briefLine(),emd->getOuterScope(),emd,emd->briefDescription());
991  t << " </briefdescription>\n";
992  t << " <detaileddescription>\n";
993  writeXMLDocBlock(t,emd->docFile(),emd->docLine(),emd->getOuterScope(),emd,emd->documentation());
994  t << " </detaileddescription>\n";
995  t << " </enumvalue>\n";
996  }
997  }
998  t << " <briefdescription>\n";
999  writeXMLDocBlock(t,md->briefFile(),md->briefLine(),md->getOuterScope(),md,md->briefDescription());
1000  t << " </briefdescription>\n";
1001  t << " <detaileddescription>\n";
1002  writeXMLDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation());
1003  t << " </detaileddescription>\n";
1004  t << " <inbodydescription>\n";
1006  t << " </inbodydescription>\n";
1007  if (md->getDefLine()!=-1)
1008  {
1009  t << " <location file=\""
1010  << convertToXML(stripFromPath(md->getDefFileName())) << "\" line=\""
1011  << md->getDefLine() << "\" column=\""
1012  << md->getDefColumn() << "\"" ;
1013  if (md->getStartBodyLine()!=-1)
1014  {
1015  const FileDef *bodyDef = md->getBodyDef();
1016  if (bodyDef)
1017  {
1018  t << " bodyfile=\"" << convertToXML(stripFromPath(bodyDef->absFilePath())) << "\"";
1019  }
1020  t << " bodystart=\"" << md->getStartBodyLine() << "\" bodyend=\""
1021  << md->getEndBodyLine() << "\"";
1022  }
1023  if (md->getDeclLine()!=-1)
1024  {
1025  t << " declfile=\"" << convertToXML(stripFromPath(md->getDeclFileName())) << "\" declline=\""
1026  << md->getDeclLine() << "\" declcolumn=\""
1027  << md->getDeclColumn() << "\"";
1028  }
1029  t << "/>\n";
1030  }
1031 
1032  //printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
1033  auto refList = md->getReferencesMembers();
1034  for (const auto &refmd : refList)
1035  {
1036  writeMemberReference(t,def,refmd,"references");
1037  }
1038  auto refByList = md->getReferencedByMembers();
1039  for (const auto &refmd : refByList)
1040  {
1041  writeMemberReference(t,def,refmd,"referencedby");
1042  }
1043 
1044  t << " </memberdef>\n";
1045 }
1046 
1047 // namespace members are also inserted in the file scope, but
1048 // to prevent this duplication in the XML output, we optionally filter those here.
1049 static bool memberVisible(const Definition *d,const MemberDef *md)
1050 {
1051  return Config_getBool(XML_NS_MEMB_FILE_SCOPE) ||
1053  md->getNamespaceDef()==0;
1054 }
1055 
1057  const MemberList *ml,const QCString &kind,const QCString &header=QCString(),
1058  const QCString &documentation=QCString())
1059 {
1060  if (ml==0) return;
1061  int count=0;
1062  for (const auto &md : *ml)
1063  {
1064  if (memberVisible(d,md) && (md->memberType()!=MemberType_EnumValue) &&
1065  !md->isHidden())
1066  {
1067  count++;
1068  }
1069  }
1070  if (count==0) return; // empty list
1071 
1072  t << " <sectiondef kind=\"" << kind << "\">\n";
1073  if (!header.isEmpty())
1074  {
1075  t << " <header>" << convertToXML(header) << "</header>\n";
1076  }
1077  if (!documentation.isEmpty())
1078  {
1079  t << " <description>";
1080  writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
1081  t << "</description>\n";
1082  }
1083  for (const auto &md : *ml)
1084  {
1085  if (memberVisible(d,md))
1086  {
1087  generateXMLForMember(md,ti,t,d);
1088  }
1089  }
1090  t << " </sectiondef>\n";
1091 }
1092 
1093 static void writeListOfAllMembers(const ClassDef *cd,TextStream &t)
1094 {
1095  t << " <listofallmembers>\n";
1096  for (auto &mni : cd->memberNameInfoLinkedMap())
1097  {
1098  for (auto &mi : *mni)
1099  {
1100  const MemberDef *md=mi->memberDef();
1101  if (!md->isAnonymous())
1102  {
1103  Protection prot = mi->prot();
1104  Specifier virt=md->virtualness();
1105  t << " <member refid=\"" << memberOutputFileBase(md) << "_1" <<
1106  md->anchor() << "\" prot=\"";
1107  switch (prot)
1108  {
1109  case Public: t << "public"; break;
1110  case Protected: t << "protected"; break;
1111  case Private: t << "private"; break;
1112  case Package: t << "package"; break;
1113  }
1114  t << "\" virt=\"";
1115  switch(virt)
1116  {
1117  case Normal: t << "non-virtual"; break;
1118  case Virtual: t << "virtual"; break;
1119  case Pure: t << "pure-virtual"; break;
1120  }
1121  t << "\"";
1122  if (!mi->ambiguityResolutionScope().isEmpty())
1123  {
1124  t << " ambiguityscope=\"" << convertToXML(mi->ambiguityResolutionScope()) << "\"";
1125  }
1126  t << "><scope>" << convertToXML(cd->name()) << "</scope><name>" <<
1127  convertToXML(md->name()) << "</name></member>\n";
1128  }
1129  }
1130  }
1131  t << " </listofallmembers>\n";
1132 }
1133 
1135 {
1136  for (const auto &cd : cl)
1137  {
1138  if (!cd->isHidden() && !cd->isAnonymous())
1139  {
1140  t << " <innerclass refid=\"" << classOutputFileBase(cd)
1141  << "\" prot=\"";
1142  switch(cd->protection())
1143  {
1144  case Public: t << "public"; break;
1145  case Protected: t << "protected"; break;
1146  case Private: t << "private"; break;
1147  case Package: t << "package"; break;
1148  }
1149  t << "\">" << convertToXML(cd->name()) << "</innerclass>\n";
1150  }
1151  }
1152 }
1153 
1155 {
1156  for (const auto &nd : nl)
1157  {
1158  if (!nd->isHidden() && !nd->isAnonymous())
1159  {
1160  t << " <innernamespace refid=\"" << nd->getOutputFileBase()
1161  << "\"" << (nd->isInline() ? " inline=\"yes\"" : "")
1162  << ">" << convertToXML(nd->name()) << "</innernamespace>\n";
1163  }
1164  }
1165 }
1166 
1167 static void writeInnerFiles(const FileList &fl,TextStream &t)
1168 {
1169  for (const auto &fd : fl)
1170  {
1171  t << " <innerfile refid=\"" << fd->getOutputFileBase()
1172  << "\">" << convertToXML(fd->name()) << "</innerfile>\n";
1173  }
1174 }
1175 
1177 {
1178  for (const auto &pd : pl)
1179  {
1180  t << " <innerpage refid=\"" << pd->getOutputFileBase();
1181  if (pd->getGroupDef())
1182  {
1183  t << "_" << pd->name();
1184  }
1185  t << "\">" << convertToXML(pd->title()) << "</innerpage>\n";
1186  }
1187 }
1188 
1189 static void writeInnerGroups(const GroupList &gl,TextStream &t)
1190 {
1191  for (const auto &sgd : gl)
1192  {
1193  t << " <innergroup refid=\"" << sgd->getOutputFileBase()
1194  << "\">" << convertToXML(sgd->groupTitle())
1195  << "</innergroup>\n";
1196  }
1197 }
1198 
1199 static void writeInnerDirs(const DirList *dl,TextStream &t)
1200 {
1201  if (dl)
1202  {
1203  for(const auto subdir : *dl)
1204  {
1205  t << " <innerdir refid=\"" << subdir->getOutputFileBase()
1206  << "\">" << convertToXML(subdir->displayName()) << "</innerdir>\n";
1207  }
1208  }
1209 }
1210 
1211 static void writeIncludeInfo(const IncludeInfo *ii,TextStream &t)
1212 {
1213  if (ii)
1214  {
1215  QCString nm = ii->includeName;
1216  if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
1217  if (!nm.isEmpty())
1218  {
1219  t << " <includes";
1220  if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
1221  {
1222  t << " refid=\"" << ii->fileDef->getOutputFileBase() << "\"";
1223  }
1224  t << " local=\"" << (ii->local ? "yes" : "no") << "\">";
1225  t << nm;
1226  t << "</includes>\n";
1227  }
1228  }
1229 }
1230 
1231 static void generateXMLForClass(const ClassDef *cd,TextStream &ti)
1232 {
1233  // + brief description
1234  // + detailed description
1235  // + template argument list(s)
1236  // - include file
1237  // + member groups
1238  // + inheritance diagram
1239  // + list of direct super classes
1240  // + list of direct sub classes
1241  // + list of inner classes
1242  // + collaboration diagram
1243  // + list of all members
1244  // + user defined member sections
1245  // + standard member sections
1246  // + detailed member documentation
1247  // - examples using the class
1248 
1249  if (cd->isReference()) return; // skip external references.
1250  if (cd->isHidden()) return; // skip hidden classes.
1251  if (cd->isAnonymous()) return; // skip anonymous compounds.
1252  if (cd->templateMaster()!=0) return; // skip generated template instances.
1253  if (cd->isArtificial()) return; // skip artificially created classes
1254 
1255  msg("Generating XML output for class %s\n",qPrint(cd->name()));
1256 
1257  ti << " <compound refid=\"" << classOutputFileBase(cd)
1258  << "\" kind=\"" << cd->compoundTypeString()
1259  << "\"><name>" << convertToXML(cd->name()) << "</name>\n";
1260 
1261  QCString outputDirectory = Config_getString(XML_OUTPUT);
1262  QCString fileName=outputDirectory+"/"+ classOutputFileBase(cd)+".xml";
1263  std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
1264  if (!f.is_open())
1265  {
1266  err("Cannot open file %s for writing!\n",qPrint(fileName));
1267  return;
1268  }
1269  TextStream t(&f);
1270 
1271  writeXMLHeader(t);
1272  t << " <compounddef id=\""
1273  << classOutputFileBase(cd) << "\" kind=\""
1274  << cd->compoundTypeString() << "\" language=\""
1275  << langToString(cd->getLanguage()) << "\" prot=\"";
1276  switch (cd->protection())
1277  {
1278  case Public: t << "public"; break;
1279  case Protected: t << "protected"; break;
1280  case Private: t << "private"; break;
1281  case Package: t << "package"; break;
1282  }
1283  if (cd->isFinal()) t << "\" final=\"yes";
1284  if (cd->isSealed()) t << "\" sealed=\"yes";
1285  if (cd->isAbstract()) t << "\" abstract=\"yes";
1286  t << "\">\n";
1287  t << " <compoundname>";
1288  writeXMLString(t,cd->name());
1289  t << "</compoundname>\n";
1290  for (const auto &bcd : cd->baseClasses())
1291  {
1292  t << " <basecompoundref ";
1293  if (bcd.classDef->isLinkable())
1294  {
1295  t << "refid=\"" << classOutputFileBase(bcd.classDef) << "\" ";
1296  }
1297  t << "prot=\"";
1298  switch (bcd.prot)
1299  {
1300  case Public: t << "public"; break;
1301  case Protected: t << "protected"; break;
1302  case Private: t << "private"; break;
1303  case Package: ASSERT(0); break;
1304  }
1305  t << "\" virt=\"";
1306  switch(bcd.virt)
1307  {
1308  case Normal: t << "non-virtual"; break;
1309  case Virtual: t << "virtual"; break;
1310  case Pure: t <<"pure-virtual"; break;
1311  }
1312  t << "\">";
1313  if (!bcd.templSpecifiers.isEmpty())
1314  {
1315  t << convertToXML(
1317  bcd.classDef->name(),bcd.templSpecifiers)
1318  );
1319  }
1320  else
1321  {
1322  t << convertToXML(bcd.classDef->displayName());
1323  }
1324  t << "</basecompoundref>\n";
1325  }
1326  for (const auto &bcd : cd->subClasses())
1327  {
1328  t << " <derivedcompoundref refid=\""
1329  << classOutputFileBase(bcd.classDef)
1330  << "\" prot=\"";
1331  switch (bcd.prot)
1332  {
1333  case Public: t << "public"; break;
1334  case Protected: t << "protected"; break;
1335  case Private: t << "private"; break;
1336  case Package: ASSERT(0); break;
1337  }
1338  t << "\" virt=\"";
1339  switch (bcd.virt)
1340  {
1341  case Normal: t << "non-virtual"; break;
1342  case Virtual: t << "virtual"; break;
1343  case Pure: t << "pure-virtual"; break;
1344  }
1345  t << "\">" << convertToXML(bcd.classDef->displayName())
1346  << "</derivedcompoundref>\n";
1347  }
1348 
1349  writeIncludeInfo(cd->includeInfo(),t);
1350 
1351  writeInnerClasses(cd->getClasses(),t);
1352 
1353  writeTemplateList(cd,t);
1354  for (const auto &mg : cd->getMemberGroups())
1355  {
1356  generateXMLSection(cd,ti,t,&mg->members(),"user-defined",mg->header(),
1357  mg->documentation());
1358  }
1359 
1360  for (const auto &ml : cd->getMemberLists())
1361  {
1362  if ((ml->listType()&MemberListType_detailedLists)==0)
1363  {
1364  generateXMLSection(cd,ti,t,ml.get(),xmlSectionMapper(ml->listType()));
1365  }
1366  }
1367 
1368  if (!cd->requiresClause().isEmpty())
1369  {
1370  t << " <requiresclause>";
1372  t << " </requiresclause>\n";
1373  }
1374 
1375  t << " <briefdescription>\n";
1376  writeXMLDocBlock(t,cd->briefFile(),cd->briefLine(),cd,0,cd->briefDescription());
1377  t << " </briefdescription>\n";
1378  t << " <detaileddescription>\n";
1379  writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd,0,cd->documentation());
1380  t << " </detaileddescription>\n";
1381  DotClassGraph inheritanceGraph(cd,Inheritance);
1382  if (!inheritanceGraph.isTrivial())
1383  {
1384  t << " <inheritancegraph>\n";
1385  inheritanceGraph.writeXML(t);
1386  t << " </inheritancegraph>\n";
1387  }
1388  DotClassGraph collaborationGraph(cd,Collaboration);
1389  if (!collaborationGraph.isTrivial())
1390  {
1391  t << " <collaborationgraph>\n";
1392  collaborationGraph.writeXML(t);
1393  t << " </collaborationgraph>\n";
1394  }
1395  t << " <location file=\""
1396  << convertToXML(stripFromPath(cd->getDefFileName())) << "\" line=\""
1397  << cd->getDefLine() << "\"" << " column=\""
1398  << cd->getDefColumn() << "\"" ;
1399  if (cd->getStartBodyLine()!=-1)
1400  {
1401  const FileDef *bodyDef = cd->getBodyDef();
1402  if (bodyDef)
1403  {
1404  t << " bodyfile=\"" << convertToXML(stripFromPath(bodyDef->absFilePath())) << "\"";
1405  }
1406  t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
1407  << cd->getEndBodyLine() << "\"";
1408  }
1409  t << "/>\n";
1410  writeListOfAllMembers(cd,t);
1411  t << " </compounddef>\n";
1412  t << "</doxygen>\n";
1413 
1414  ti << " </compound>\n";
1415 }
1416 
1417 static void generateXMLForConcept(const ConceptDef *cd,TextStream &ti)
1418 {
1419  if (cd->isReference() || cd->isHidden()) return; // skip external references.
1420 
1421  ti << " <compound refid=\"" << cd->getOutputFileBase()
1422  << "\" kind=\"concept\"" << "><name>"
1423  << convertToXML(cd->name()) << "</name>\n";
1424 
1425  QCString outputDirectory = Config_getString(XML_OUTPUT);
1426  QCString fileName=outputDirectory+"/"+cd->getOutputFileBase()+".xml";
1427  std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
1428  if (!f.is_open())
1429  {
1430  err("Cannot open file %s for writing!\n",qPrint(fileName));
1431  return;
1432  }
1433  TextStream t(&f);
1434  writeXMLHeader(t);
1435  t << " <compounddef id=\"" << cd->getOutputFileBase()
1436  << "\" kind=\"concept\">\n";
1437  t << " <compoundname>";
1438  writeXMLString(t,cd->name());
1439  t << "</compoundname>\n";
1440  writeIncludeInfo(cd->includeInfo(),t);
1441  writeTemplateList(cd,t);
1442  t << " <initializer>";
1444  t << " </initializer>\n";
1445  t << " <briefdescription>\n";
1446  writeXMLDocBlock(t,cd->briefFile(),cd->briefLine(),cd,0,cd->briefDescription());
1447  t << " </briefdescription>\n";
1448  t << " <detaileddescription>\n";
1449  writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd,0,cd->documentation());
1450  t << " </detaileddescription>\n";
1451  t << " <location file=\""
1452  << convertToXML(stripFromPath(cd->getDefFileName())) << "\" line=\""
1453  << cd->getDefLine() << "\"" << " column=\""
1454  << cd->getDefColumn() << "\"/>\n" ;
1455  t << " </compounddef>\n";
1456  t << "</doxygen>\n";
1457 
1458  ti << " </compound>\n";
1459 }
1460 
1462 {
1463  // + contained class definitions
1464  // + contained namespace definitions
1465  // + member groups
1466  // + normal members
1467  // + brief desc
1468  // + detailed desc
1469  // + location
1470  // - files containing (parts of) the namespace definition
1471 
1472  if (nd->isReference() || nd->isHidden()) return; // skip external references
1473 
1474  ti << " <compound refid=\"" << nd->getOutputFileBase()
1475  << "\" kind=\"namespace\"" << "><name>"
1476  << convertToXML(nd->name()) << "</name>\n";
1477 
1478  QCString outputDirectory = Config_getString(XML_OUTPUT);
1479  QCString fileName=outputDirectory+"/"+nd->getOutputFileBase()+".xml";
1480  std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
1481  if (!f.is_open())
1482  {
1483  err("Cannot open file %s for writing!\n",qPrint(fileName));
1484  return;
1485  }
1486  TextStream t(&f);
1487 
1488  writeXMLHeader(t);
1489  t << " <compounddef id=\"" << nd->getOutputFileBase()
1490  << "\" kind=\"namespace\" "
1491  << (nd->isInline()?"inline=\"yes\" ":"")
1492  << "language=\""
1493  << langToString(nd->getLanguage()) << "\">\n";
1494  t << " <compoundname>";
1495  writeXMLString(t,nd->name());
1496  t << "</compoundname>\n";
1497 
1498  writeInnerClasses(nd->getClasses(),t);
1500 
1501  for (const auto &mg : nd->getMemberGroups())
1502  {
1503  generateXMLSection(nd,ti,t,&mg->members(),"user-defined",mg->header(),
1504  mg->documentation());
1505  }
1506 
1507  for (const auto &ml : nd->getMemberLists())
1508  {
1510  {
1511  generateXMLSection(nd,ti,t,ml.get(),xmlSectionMapper(ml->listType()));
1512  }
1513  }
1514 
1515  t << " <briefdescription>\n";
1516  writeXMLDocBlock(t,nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription());
1517  t << " </briefdescription>\n";
1518  t << " <detaileddescription>\n";
1519  writeXMLDocBlock(t,nd->docFile(),nd->docLine(),nd,0,nd->documentation());
1520  t << " </detaileddescription>\n";
1521  t << " <location file=\""
1522  << convertToXML(stripFromPath(nd->getDefFileName())) << "\" line=\""
1523  << nd->getDefLine() << "\"" << " column=\""
1524  << nd->getDefColumn() << "\"/>\n" ;
1525  t << " </compounddef>\n";
1526  t << "</doxygen>\n";
1527 
1528  ti << " </compound>\n";
1529 }
1530 
1532 {
1533  // + includes files
1534  // + includedby files
1535  // + include graph
1536  // + included by graph
1537  // + contained class definitions
1538  // + contained namespace definitions
1539  // + member groups
1540  // + normal members
1541  // + brief desc
1542  // + detailed desc
1543  // + source code
1544  // + location
1545  // - number of lines
1546 
1547  if (fd->isReference()) return; // skip external references
1548 
1549  ti << " <compound refid=\"" << fd->getOutputFileBase()
1550  << "\" kind=\"file\"><name>" << convertToXML(fd->name())
1551  << "</name>\n";
1552 
1553  QCString outputDirectory = Config_getString(XML_OUTPUT);
1554  QCString fileName=outputDirectory+"/"+fd->getOutputFileBase()+".xml";
1555  std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
1556  if (!f.is_open())
1557  {
1558  err("Cannot open file %s for writing!\n",qPrint(fileName));
1559  return;
1560  }
1561  TextStream t(&f);
1562 
1563  writeXMLHeader(t);
1564  t << " <compounddef id=\"" << fd->getOutputFileBase()
1565  << "\" kind=\"file\" language=\""
1566  << langToString(fd->getLanguage()) << "\">\n";
1567  t << " <compoundname>";
1568  writeXMLString(t,fd->name());
1569  t << "</compoundname>\n";
1570 
1571  for (const auto &inc : fd->includeFileList())
1572  {
1573  t << " <includes";
1574  if (inc.fileDef && !inc.fileDef->isReference()) // TODO: support external references
1575  {
1576  t << " refid=\"" << inc.fileDef->getOutputFileBase() << "\"";
1577  }
1578  t << " local=\"" << (inc.local ? "yes" : "no") << "\">";
1579  t << inc.includeName;
1580  t << "</includes>\n";
1581  }
1582 
1583  for (const auto &inc : fd->includedByFileList())
1584  {
1585  t << " <includedby";
1586  if (inc.fileDef && !inc.fileDef->isReference()) // TODO: support external references
1587  {
1588  t << " refid=\"" << inc.fileDef->getOutputFileBase() << "\"";
1589  }
1590  t << " local=\"" << (inc.local ? "yes" : "no") << "\">";
1591  t << inc.includeName;
1592  t << "</includedby>\n";
1593  }
1594 
1595  DotInclDepGraph incDepGraph(fd,FALSE);
1596  if (!incDepGraph.isTrivial())
1597  {
1598  t << " <incdepgraph>\n";
1599  incDepGraph.writeXML(t);
1600  t << " </incdepgraph>\n";
1601  }
1602 
1603  DotInclDepGraph invIncDepGraph(fd,TRUE);
1604  if (!invIncDepGraph.isTrivial())
1605  {
1606  t << " <invincdepgraph>\n";
1607  invIncDepGraph.writeXML(t);
1608  t << " </invincdepgraph>\n";
1609  }
1610 
1611  writeInnerClasses(fd->getClasses(),t);
1613 
1614  for (const auto &mg : fd->getMemberGroups())
1615  {
1616  generateXMLSection(fd,ti,t,&mg->members(),"user-defined",mg->header(),
1617  mg->documentation());
1618  }
1619 
1620  for (const auto &ml : fd->getMemberLists())
1621  {
1623  {
1624  generateXMLSection(fd,ti,t,ml.get(),xmlSectionMapper(ml->listType()));
1625  }
1626  }
1627 
1628  t << " <briefdescription>\n";
1629  writeXMLDocBlock(t,fd->briefFile(),fd->briefLine(),fd,0,fd->briefDescription());
1630  t << " </briefdescription>\n";
1631  t << " <detaileddescription>\n";
1632  writeXMLDocBlock(t,fd->docFile(),fd->docLine(),fd,0,fd->documentation());
1633  t << " </detaileddescription>\n";
1634  if (Config_getBool(XML_PROGRAMLISTING))
1635  {
1636  writeXMLCodeBlock(t,fd);
1637  }
1638  t << " <location file=\"" << convertToXML(stripFromPath(fd->getDefFileName())) << "\"/>\n";
1639  t << " </compounddef>\n";
1640  t << "</doxygen>\n";
1641 
1642  ti << " </compound>\n";
1643 }
1644 
1645 static void generateXMLForGroup(const GroupDef *gd,TextStream &ti)
1646 {
1647  // + members
1648  // + member groups
1649  // + files
1650  // + classes
1651  // + namespaces
1652  // - packages
1653  // + pages
1654  // + child groups
1655  // - examples
1656  // + brief description
1657  // + detailed description
1658 
1659  if (gd->isReference()) return; // skip external references
1660 
1661  ti << " <compound refid=\"" << gd->getOutputFileBase()
1662  << "\" kind=\"group\"><name>" << convertToXML(gd->name()) << "</name>\n";
1663 
1664  QCString outputDirectory = Config_getString(XML_OUTPUT);
1665  QCString fileName=outputDirectory+"/"+gd->getOutputFileBase()+".xml";
1666  std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
1667  if (!f.is_open())
1668  {
1669  err("Cannot open file %s for writing!\n",qPrint(fileName));
1670  return;
1671  }
1672  TextStream t(&f);
1673 
1674  writeXMLHeader(t);
1675  t << " <compounddef id=\""
1676  << gd->getOutputFileBase() << "\" kind=\"group\">\n";
1677  t << " <compoundname>" << convertToXML(gd->name()) << "</compoundname>\n";
1678  t << " <title>" << convertToXML(gd->groupTitle()) << "</title>\n";
1679 
1680  writeInnerFiles(gd->getFiles(),t);
1681  writeInnerClasses(gd->getClasses(),t);
1683  writeInnerPages(gd->getPages(),t);
1684  writeInnerGroups(gd->getSubGroups(),t);
1685 
1686  for (const auto &mg : gd->getMemberGroups())
1687  {
1688  generateXMLSection(gd,ti,t,&mg->members(),"user-defined",mg->header(),
1689  mg->documentation());
1690  }
1691 
1692  for (const auto &ml : gd->getMemberLists())
1693  {
1695  {
1696  generateXMLSection(gd,ti,t,ml.get(),xmlSectionMapper(ml->listType()));
1697  }
1698  }
1699 
1700  t << " <briefdescription>\n";
1701  writeXMLDocBlock(t,gd->briefFile(),gd->briefLine(),gd,0,gd->briefDescription());
1702  t << " </briefdescription>\n";
1703  t << " <detaileddescription>\n";
1704  writeXMLDocBlock(t,gd->docFile(),gd->docLine(),gd,0,gd->documentation());
1705  t << " </detaileddescription>\n";
1706  t << " </compounddef>\n";
1707  t << "</doxygen>\n";
1708 
1709  ti << " </compound>\n";
1710 }
1711 
1713 {
1714  if (dd->isReference()) return; // skip external references
1715  ti << " <compound refid=\"" << dd->getOutputFileBase()
1716  << "\" kind=\"dir\"><name>" << convertToXML(dd->displayName())
1717  << "</name>\n";
1718 
1719  QCString outputDirectory = Config_getString(XML_OUTPUT);
1720  QCString fileName=outputDirectory+"/"+dd->getOutputFileBase()+".xml";
1721  std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
1722  if (!f.is_open())
1723  {
1724  err("Cannot open file %s for writing!\n",qPrint(fileName));
1725  return;
1726  }
1727  TextStream t(&f);
1728 
1729  writeXMLHeader(t);
1730  t << " <compounddef id=\""
1731  << dd->getOutputFileBase() << "\" kind=\"dir\">\n";
1732  t << " <compoundname>" << convertToXML(dd->displayName()) << "</compoundname>\n";
1733 
1734  writeInnerDirs(&dd->subDirs(),t);
1735  writeInnerFiles(dd->getFiles(),t);
1736 
1737  t << " <briefdescription>\n";
1738  writeXMLDocBlock(t,dd->briefFile(),dd->briefLine(),dd,0,dd->briefDescription());
1739  t << " </briefdescription>\n";
1740  t << " <detaileddescription>\n";
1741  writeXMLDocBlock(t,dd->docFile(),dd->docLine(),dd,0,dd->documentation());
1742  t << " </detaileddescription>\n";
1743  t << " <location file=\"" << convertToXML(stripFromPath(dd->name())) << "\"/>\n";
1744  t << " </compounddef>\n";
1745  t << "</doxygen>\n";
1746 
1747  ti << " </compound>\n";
1748 }
1749 
1750 static void generateXMLForPage(PageDef *pd,TextStream &ti,bool isExample)
1751 {
1752  // + name
1753  // + title
1754  // + documentation
1755  // + location
1756 
1757  const char *kindName = isExample ? "example" : "page";
1758 
1759  if (pd->isReference()) return;
1760 
1761  QCString pageName = pd->getOutputFileBase();
1762  if (pd->getGroupDef())
1763  {
1764  pageName+=(QCString)"_"+pd->name();
1765  }
1766  if (pageName=="index") pageName="indexpage"; // to prevent overwriting the generated index page.
1767 
1768  ti << " <compound refid=\"" << pageName
1769  << "\" kind=\"" << kindName << "\"><name>" << convertToXML(pd->name())
1770  << "</name>\n";
1771 
1772  QCString outputDirectory = Config_getString(XML_OUTPUT);
1773  QCString fileName=outputDirectory+"/"+pageName+".xml";
1774  std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
1775  if (!f.is_open())
1776  {
1777  err("Cannot open file %s for writing!\n",qPrint(fileName));
1778  return;
1779  }
1780  TextStream t(&f);
1781 
1782  writeXMLHeader(t);
1783  t << " <compounddef id=\"" << pageName;
1784  t << "\" kind=\"" << kindName << "\">\n";
1785  t << " <compoundname>" << convertToXML(pd->name())
1786  << "</compoundname>\n";
1787 
1788  if (pd==Doxygen::mainPage.get()) // main page is special
1789  {
1790  QCString title;
1791  if (mainPageHasTitle())
1792  {
1793  title = filterTitle(convertCharEntitiesToUTF8(Doxygen::mainPage->title()).str());
1794  }
1795  else
1796  {
1797  title = Config_getString(PROJECT_NAME);
1798  }
1799  t << " <title>" << convertToXML(convertCharEntitiesToUTF8(title))
1800  << "</title>\n";
1801  }
1802  else
1803  {
1804  const SectionInfo *si = SectionManager::instance().find(pd->name());
1805  if (si)
1806  {
1807  t << " <title>" << convertToXML(filterTitle(convertCharEntitiesToUTF8(si->title()).str()))
1808  << "</title>\n";
1809  }
1810  }
1811  writeInnerPages(pd->getSubPages(),t);
1812  const SectionRefs &sectionRefs = pd->getSectionRefs();
1813  if (pd->localToc().isXmlEnabled() && !sectionRefs.empty())
1814  {
1815  t << " <tableofcontents>\n";
1816  int level=1,l;
1817  bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE };
1818  int maxLevel = pd->localToc().xmlLevel();
1819  for (const SectionInfo *si : sectionRefs)
1820  {
1821  if (isSection(si->type()))
1822  {
1823  //printf(" level=%d title=%s\n",level,qPrint(si->title));
1824  int nextLevel = (int)si->type();
1825  if (nextLevel>level)
1826  {
1827  for (l=level;l<nextLevel;l++)
1828  {
1829  if (l < maxLevel) t << " <tableofcontents>\n";
1830  }
1831  }
1832  else if (nextLevel<level)
1833  {
1834  for (l=level;l>nextLevel;l--)
1835  {
1836  if (l <= maxLevel && inLi[l]) t << " </tocsect>\n";
1837  inLi[l]=FALSE;
1838  if (l <= maxLevel) t << " </tableofcontents>\n";
1839  }
1840  }
1841  if (nextLevel <= maxLevel)
1842  {
1843  if (inLi[nextLevel]) t << " </tocsect>\n";
1844  QCString titleDoc = convertToXML(si->title());
1845  t << " <tocsect>\n";
1846  t << " <name>" << (si->title().isEmpty()?si->label():titleDoc) << "</name>\n";
1847  t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si->label()) << "</reference>\n";
1848  inLi[nextLevel]=TRUE;
1849  level = nextLevel;
1850  }
1851  }
1852  }
1853  while (level>1 && level <= maxLevel)
1854  {
1855  if (inLi[level]) t << " </tocsect>\n";
1856  inLi[level]=FALSE;
1857  t << " </tableofcontents>\n";
1858  level--;
1859  }
1860  if (level <= maxLevel && inLi[level]) t << " </tocsect>\n";
1861  inLi[level]=FALSE;
1862  t << " </tableofcontents>\n";
1863  }
1864  t << " <briefdescription>\n";
1865  writeXMLDocBlock(t,pd->briefFile(),pd->briefLine(),pd,0,pd->briefDescription());
1866  t << " </briefdescription>\n";
1867  t << " <detaileddescription>\n";
1868  if (isExample)
1869  {
1870  writeXMLDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
1871  pd->documentation()+"\n\\include "+pd->name());
1872  }
1873  else
1874  {
1875  writeXMLDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
1876  pd->documentation());
1877  }
1878  t << " </detaileddescription>\n";
1879 
1880  t << " <location file=\"" << convertToXML(stripFromPath(pd->getDefFileName())) << "\"/>\n";
1881 
1882  t << " </compounddef>\n";
1883  t << "</doxygen>\n";
1884 
1885  ti << " </compound>\n";
1886 }
1887 
1889 {
1890  // + classes
1891  // + concepts
1892  // + namespaces
1893  // + files
1894  // + groups
1895  // + related pages
1896  // - examples
1897 
1898  QCString outputDirectory = Config_getString(XML_OUTPUT);
1899  Dir xmlDir(outputDirectory.str());
1900  createSubDirs(xmlDir);
1901 
1902  ResourceMgr::instance().copyResource("xml.xsd",outputDirectory);
1903  ResourceMgr::instance().copyResource("index.xsd",outputDirectory);
1904  ResourceMgr::instance().copyResource("doxyfile.xsd",outputDirectory);
1905 
1906  QCString fileName=outputDirectory+"/compound.xsd";
1907  std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
1908  if (!f.is_open())
1909  {
1910  err("Cannot open file %s for writing!\n",qPrint(fileName));
1911  return;
1912  }
1913  {
1914  TextStream t(&f);
1915 
1916  // write compound.xsd, but replace special marker with the entities
1917  QCString compound_xsd = ResourceMgr::instance().getAsString("compound.xsd");
1918  const char *startLine = compound_xsd.data();
1919  while (*startLine)
1920  {
1921  // find end of the line
1922  const char *endLine = startLine+1;
1923  while (*endLine && *(endLine-1)!='\n') endLine++; // skip to end of the line including \n
1924  int len=static_cast<int>(endLine-startLine);
1925  if (len>0)
1926  {
1927  QCString s(startLine,len);
1928  if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
1929  {
1931  }
1932  else
1933  {
1934  t.write(startLine,len);
1935  }
1936  }
1937  startLine=endLine;
1938  }
1939  }
1940  f.close();
1941 
1942  fileName=outputDirectory+"/Doxyfile.xml";
1943  f.open(fileName.str(),std::ofstream::out | std::ofstream::binary);
1944  if (!f.is_open())
1945  {
1946  err("Cannot open file %s for writing\n",fileName.data());
1947  return;
1948  }
1949  else
1950  {
1951  TextStream t(&f);
1953  }
1954  f.close();
1955 
1956  fileName=outputDirectory+"/index.xml";
1957  f.open(fileName.str(),std::ofstream::out | std::ofstream::binary);
1958  if (!f.is_open())
1959  {
1960  err("Cannot open file %s for writing!\n",qPrint(fileName));
1961  return;
1962  }
1963  else
1964  {
1965  TextStream t(&f);
1966 
1967  // write index header
1968  t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";;
1969  t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
1970  t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
1971  t << "version=\"" << getDoxygenVersion() << "\" ";
1972  t << "xml:lang=\"" << theTranslator->trISOLang() << "\"";
1973  t << ">\n";
1974 
1975  for (const auto &cd : *Doxygen::classLinkedMap)
1976  {
1977  generateXMLForClass(cd.get(),t);
1978  }
1979  for (const auto &cd : *Doxygen::conceptLinkedMap)
1980  {
1981  msg("Generating XML output for concept %s\n",qPrint(cd->name()));
1982  generateXMLForConcept(cd.get(),t);
1983  }
1984  for (const auto &nd : *Doxygen::namespaceLinkedMap)
1985  {
1986  msg("Generating XML output for namespace %s\n",qPrint(nd->name()));
1987  generateXMLForNamespace(nd.get(),t);
1988  }
1989  for (const auto &fn : *Doxygen::inputNameLinkedMap)
1990  {
1991  for (const auto &fd : *fn)
1992  {
1993  msg("Generating XML output for file %s\n",qPrint(fd->name()));
1994  generateXMLForFile(fd.get(),t);
1995  }
1996  }
1997  for (const auto &gd : *Doxygen::groupLinkedMap)
1998  {
1999  msg("Generating XML output for group %s\n",qPrint(gd->name()));
2000  generateXMLForGroup(gd.get(),t);
2001  }
2002  for (const auto &pd : *Doxygen::pageLinkedMap)
2003  {
2004  msg("Generating XML output for page %s\n",qPrint(pd->name()));
2005  generateXMLForPage(pd.get(),t,FALSE);
2006  }
2007  for (const auto &dd : *Doxygen::dirLinkedMap)
2008  {
2009  msg("Generate XML output for dir %s\n",qPrint(dd->name()));
2010  generateXMLForDir(dd.get(),t);
2011  }
2012  for (const auto &pd : *Doxygen::exampleLinkedMap)
2013  {
2014  msg("Generating XML output for example %s\n",qPrint(pd->name()));
2015  generateXMLForPage(pd.get(),t,TRUE);
2016  }
2017  if (Doxygen::mainPage)
2018  {
2019  msg("Generating XML output for the main page\n");
2021  }
2022 
2023  //t << " </compoundlist>\n";
2024  t << "</doxygenindex>\n";
2025  }
2026 
2028  clearSubDirs(xmlDir);
2029 }
2030 
2031 
ClassDef::requiresClause
virtual QCString requiresClause() const =0
writeTemplateArgumentList
static void writeTemplateArgumentList(TextStream &t, const ArgumentList &al, const Definition *scope, const FileDef *fileScope, int indent)
Definition: xmlgen.cpp:359
Definition::getDefFileExtension
virtual QCString getDefFileExtension() const =0
ArgumentList::refQualifier
RefQualifierType refQualifier() const
Definition: arguments.h:109
ResourceMgr::copyResource
bool copyResource(const QCString &name, const QCString &targetDir) const
Copies a registered resource to a given target directory
Definition: resourcemgr.cpp:180
XMLCodeGenerator::writeCodeLink
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip) override
Definition: xmlgen.cpp:244
PageDef::localToc
virtual LocalToc localToc() const =0
FileDef::getMemberLists
virtual const MemberLists & getMemberLists() const =0
dotincldepgraph.h
xmlgen.h
writeInnerNamespaces
static void writeInnerNamespaces(const NamespaceLinkedRefMap &nl, TextStream &t)
Definition: xmlgen.cpp:1154
ConceptDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
ResourceMgr::instance
static ResourceMgr & instance()
Returns the one and only instance of this class
Definition: resourcemgr.cpp:32
HtmlEntityMapper::writeXMLSchema
void writeXMLSchema(TextStream &t)
Definition: htmlentity.cpp:477
MemberDef::getDeclColumn
virtual int getDeclColumn() const =0
NamespaceDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
generateXMLForGroup
static void generateXMLForGroup(const GroupDef *gd, TextStream &ti)
Definition: xmlgen.cpp:1645
generateXMLSection
static void generateXMLSection(const Definition *d, TextStream &ti, TextStream &t, const MemberList *ml, const QCString &kind, const QCString &header=QCString(), const QCString &documentation=QCString())
Definition: xmlgen.cpp:1056
generateXMLForFile
static void generateXMLForFile(FileDef *fd, TextStream &ti)
Definition: xmlgen.cpp:1531
langToString
QCString langToString(SrcLangExt lang)
Returns a string representation of lang.
Definition: util.cpp:6519
RefQualifierNone
@ RefQualifierNone
Definition: arguments.h:48
Definition::docLine
virtual int docLine() const =0
MemberType_Variable
@ MemberType_Variable
Definition: types.h:278
MemberDef::getDeclLine
virtual int getDeclLine() const =0
writeXMLCodeString
void writeXMLCodeString(TextStream &t, const QCString &str, int &col)
Definition: xmlgen.cpp:115
MemberListType_priStaticMethods
@ MemberListType_priStaticMethods
Definition: types.h:114
ConceptDef
Definition: conceptdef.h:22
IncludeInfo::fileDef
const FileDef * fileDef
Definition: filedef.h:53
MemberDef::isConstrained
virtual bool isConstrained() const =0
MemberListType_priStaticAttribs
@ MemberListType_priStaticAttribs
Definition: types.h:125
Normal
@ Normal
Definition: types.h:29
MemberListType_signals
@ MemberListType_signals
Definition: types.h:131
Doxygen::mainPage
static std::unique_ptr< PageDef > mainPage
Definition: doxygen.h:83
Protection
Protection
Protection level of members
Definition: types.h:26
membergroup.h
XMLCodeGenerator::m_col
int m_col
Definition: xmlgen.h:55
MemberDef::argsString
virtual QCString argsString() const =0
generateXML
void generateXML()
Definition: xmlgen.cpp:1888
generateXMLForDir
static void generateXMLForDir(DirDef *dd, TextStream &ti)
Definition: xmlgen.cpp:1712
MemberListType
MemberListType
Definition: types.h:100
MemberDef::briefDescription
virtual QCString briefDescription(bool abbr=FALSE) const =0
Definition::getDefColumn
virtual int getDefColumn() const =0
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
writeXMLHeader
static void writeXMLHeader(TextStream &t)
Definition: xmlgen.cpp:151
MemberDef::documentation
virtual QCString documentation() const =0
MemberListType_pacStaticAttribs
@ MemberListType_pacStaticAttribs
Definition: types.h:124
MemberDef::isStatic
virtual bool isStatic() const =0
NamespaceDef
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
MemberType_EnumValue
@ MemberType_EnumValue
Definition: types.h:281
MemberListType_services
@ MemberListType_services
Definition: types.h:187
Dir
Class representing a directory in the file system
Definition: dir.h:68
XMLCodeGenerator::startCodeFragment
void startCodeFragment(const QCString &) override
Definition: xmlgen.cpp:347
Private
@ Private
Definition: types.h:26
PageDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
GroupDef::getClasses
virtual const ClassLinkedRefMap & getClasses() const =0
DotInclDepGraph::writeXML
void writeXML(TextStream &t)
Definition: dotincldepgraph.cpp:211
TextGeneratorXMLImpl::writeBreak
void writeBreak(int) const
Definition: xmlgen.cpp:215
DirList
A list of directories.
Definition: dirdef.h:181
MemberType_Signal
@ MemberType_Signal
Definition: types.h:282
MemberDef::isMaybeDefault
virtual bool isMaybeDefault() const =0
pagedef.h
generateXMLForMember
static void generateXMLForMember(const MemberDef *md, TextStream &ti, TextStream &t, const Definition *def)
Definition: xmlgen.cpp:521
writeInnerPages
static void writeInnerPages(const PageLinkedRefMap &pl, TextStream &t)
Definition: xmlgen.cpp:1176
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
MemberDef::isMaybeVoid
virtual bool isMaybeVoid() const =0
generateXMLForPage
static void generateXMLForPage(PageDef *pd, TextStream &ti, bool isExample)
Definition: xmlgen.cpp:1750
ArgumentList
This class represents an function or template argument list.
Definition: arguments.h:59
MemberDef::isAttribute
virtual bool isAttribute() const =0
Doxygen::conceptLinkedMap
static ConceptLinkedMap * conceptLinkedMap
Definition: doxygen.h:80
ClassDef::compoundTypeString
virtual QCString compoundTypeString() const =0
Returns the type of compound as a string
MemberType_Interface
@ MemberType_Interface
Definition: types.h:288
memberdef.h
MemberDef::isInitonly
virtual bool isInitonly() const =0
DirDef
A model of a directory symbol.
Definition: dirdef.h:110
Definition::getDefLine
virtual int getDefLine() const =0
XMLCodeGenerator::writeTooltip
void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &, const QCString &, const SourceLinkInfo &, const SourceLinkInfo &) override
Definition: xmlgen.cpp:258
filterTitle
QCString filterTitle(const QCString &title)
Definition: util.cpp:6254
MemberListType_priAttribs
@ MemberListType_priAttribs
Definition: types.h:121
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
xmlSectionMapper
static const char * xmlSectionMapper(MemberListType ml)
Definition: xmlgen.cpp:103
NamespaceDef::getMemberLists
virtual const MemberLists & getMemberLists() const =0
FileDef::getNamespaces
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
PageDef::getGroupDef
virtual const GroupDef * getGroupDef() const =0
section.h
XMLCodeGenerator::m_isMemberRef
bool m_isMemberRef
Definition: xmlgen.h:54
Doxygen::pageLinkedMap
static PageLinkedMap * pageLinkedMap
Definition: doxygen.h:82
ClassDef::getMemberLists
virtual const MemberLists & getMemberLists() const =0
Returns the list containing the list of members sorted per type
namespacedef.h
GroupDef::groupTitle
virtual QCString groupTitle() const =0
XMLCodeGenerator::endCodeLine
void endCodeLine() override
Definition: xmlgen.cpp:292
stripQualifiers
static void stripQualifiers(QCString &typeStr)
Definition: xmlgen.cpp:488
membername.h
writeXMLString
void writeXMLString(TextStream &t, const QCString &s)
Definition: xmlgen.cpp:110
ConceptDef::includeInfo
virtual const IncludeInfo * includeInfo() const =0
MemberListType_pubTypes
@ MemberListType_pubTypes
Definition: types.h:126
MemberDef::bitfieldString
virtual QCString bitfieldString() const =0
PageDef::getSubPages
virtual const PageLinkedRefMap & getSubPages() const =0
GroupDef::getFiles
virtual const FileList & getFiles() const =0
MemberDef::hasMultiLineInitializer
virtual bool hasMultiLineInitializer() const =0
Definition::getReferencedByMembers
virtual const MemberVector & getReferencedByMembers() const =0
SrcLangExt
SrcLangExt
Language as given by extension
Definition: types.h:41
MemberType_Friend
@ MemberType_Friend
Definition: types.h:284
MemberListType_priSlots
@ MemberListType_priSlots
Definition: types.h:117
PageLinkedRefMap
Definition: pagedef.h:78
MemberType_Enumeration
@ MemberType_Enumeration
Definition: types.h:280
MemberListType_dcopMethods
@ MemberListType_dcopMethods
Definition: types.h:133
Virtual
@ Virtual
Definition: types.h:29
QCString::str
std::string str() const
Definition: qcstring.h:442
MemberDef::isInline
virtual bool isInline() const =0
MemberType_Typedef
@ MemberType_Typedef
Definition: types.h:279
NamespaceDef::isInline
virtual bool isInline() const =0
Specifier
Specifier
Virtualness of a member.
Definition: types.h:29
Definition::isHidden
virtual bool isHidden() const =0
MemberDef::isFriendClass
virtual bool isFriendClass() const =0
Definition::TypeGroup
@ TypeGroup
Definition: definition.h:91
writeXMLDocBlock
static void writeXMLDocBlock(TextStream &t, const QCString &fileName, int lineNr, const Definition *scope, const MemberDef *md, const QCString &text)
Definition: xmlgen.cpp:417
Public
@ Public
Definition: types.h:26
Package
@ Package
Definition: types.h:26
MemberDef::isProtectedGettable
virtual bool isProtectedGettable() const =0
ClassDef::isFinal
virtual bool isFinal() const =0
Returns TRUE if this class is marked as final
MemberListType_decDictionaryMembers
@ MemberListType_decDictionaryMembers
Definition: types.h:192
MemberDef::isRetain
virtual bool isRetain() const =0
textstream.h
FileDef::includedByFileList
virtual const IncludeInfoList & includedByFileList() const =0
err
void err(const char *fmt,...)
Definition: message.cpp:203
Definition::inbodyLine
virtual int inbodyLine() const =0
MemberListType_friends
@ MemberListType_friends
Definition: types.h:132
GroupDef::getSubGroups
virtual const GroupList & getSubGroups() const =0
g_xmlSectionMap
static std::map< MemberListType, std::string > g_xmlSectionMap
Definition: xmlgen.cpp:60
generateXMLForClass
static void generateXMLForClass(const ClassDef *cd, TextStream &ti)
Definition: xmlgen.cpp:1231
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
ClassDef::protection
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
QCString::find
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:38
MemberListType_proAttribs
@ MemberListType_proAttribs
Definition: types.h:119
writeCombineScript
static void writeCombineScript()
Definition: xmlgen.cpp:161
XMLCodeGenerator::writeLineNumber
void writeLineNumber(const QCString &extRef, const QCString &compId, const QCString &anchorId, int l, bool writeLineAnchor) override
Definition: xmlgen.cpp:327
Definition::briefLine
virtual int briefLine() const =0
writeInnerFiles
static void writeInnerFiles(const FileList &fl, TextStream &t)
Definition: xmlgen.cpp:1167
ClassDef::includeInfo
virtual const IncludeInfo * includeInfo() const =0
MemberListType_pubMethods
@ MemberListType_pubMethods
Definition: types.h:107
NamespaceDef::getMemberGroups
virtual const MemberGroupList & getMemberGroups() const =0
filename.h
memberOutputFileBase
static QCString memberOutputFileBase(const MemberDef *md)
Definition: xmlgen.cpp:510
ArgumentList::volatileSpecifier
bool volatileSpecifier() const
Definition: arguments.h:105
MemberDef::isWeak
virtual bool isWeak() const =0
ClassDef::getFileDef
virtual FileDef * getFileDef() const =0
Returns the namespace this compound is in, or 0 if it has a global scope.
ArgumentList::end
iterator end()
Definition: arguments.h:87
FileDef::docName
virtual const QCString & docName() const =0
HtmlEntityMapper::instance
static HtmlEntityMapper * instance()
Returns the one and only instance of the HTML entity mapper
Definition: htmlentity.cpp:341
Definition::docFile
virtual QCString docFile() const =0
generateXMLForNamespace
static void generateXMLForNamespace(const NamespaceDef *nd, TextStream &ti)
Definition: xmlgen.cpp:1461
NamespaceLinkedRefMap
Definition: namespacedef.h:45
Definition::getLanguage
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
mainPageHasTitle
bool mainPageHasTitle()
Definition: util.cpp:7027
TextGeneratorXMLImpl::writeLink
void writeLink(const QCString &extRef, const QCString &file, const QCString &anchor, const QCString &text) const
Definition: xmlgen.cpp:216
ArgumentList::begin
iterator begin()
Definition: arguments.h:86
MemberListType_interfaces
@ MemberListType_interfaces
Definition: types.h:184
ArgumentList::hasParameters
bool hasParameters() const
Definition: arguments.h:69
SectionRefs::empty
bool empty() const
Definition: section.h:121
MemberListType_declarationLists
@ MemberListType_declarationLists
Definition: types.h:104
MemberDef::getReadAccessor
virtual QCString getReadAccessor() const =0
FileDef::getClasses
virtual const ClassLinkedRefMap & getClasses() const =0
MemberDef::isConstExpr
virtual bool isConstExpr() const =0
ClassDef::templateMaster
virtual const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
MemberListType_decSequenceMembers
@ MemberListType_decSequenceMembers
Definition: types.h:190
PageDef
A model of a page symbol.
Definition: pagedef.h:25
GroupDef
A model of a group of symbols.
Definition: groupdef.h:49
MemberDef::isNew
virtual bool isNew() const =0
Doxygen::inputNameLinkedMap
static FileNameLinkedMap * inputNameLinkedMap
Definition: doxygen.h:88
MemberType_Service
@ MemberType_Service
Definition: types.h:289
Translator::trISOLang
virtual QCString trISOLang()=0
MemberDef::anchor
virtual QCString anchor() const =0
MemberDef::isRequired
virtual bool isRequired() const =0
Definition::getBodyDef
virtual const FileDef * getBodyDef() const =0
DirDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
outputgen.h
dot.h
MemberType_Function
@ MemberType_Function
Definition: types.h:277
MemberDef
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
MemberListType_decProtoMembers
@ MemberListType_decProtoMembers
Definition: types.h:150
writeTemplateList
static void writeTemplateList(const ClassDef *cd, TextStream &t)
Definition: xmlgen.cpp:407
MemberListType_pubSlots
@ MemberListType_pubSlots
Definition: types.h:115
ClassDef
A abstract class representing of a compound symbol.
Definition: classdef.h:103
MemberListType_decVarMembers
@ MemberListType_decVarMembers
Definition: types.h:154
classlist.h
MemberType_Slot
@ MemberType_Slot
Definition: types.h:283
XMLCodeGenerator::m_insideSpecialHL
bool m_insideSpecialHL
Definition: xmlgen.h:59
QCString::stripWhiteSpace
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition: qcstring.h:243
writeMemberTemplateLists
static void writeMemberTemplateLists(const MemberDef *md, TextStream &t)
Definition: xmlgen.cpp:402
Config_getInt
#define Config_getInt(name)
Definition: config.h:34
RefQualifierLValue
@ RefQualifierLValue
Definition: arguments.h:49
MemberListType_proStaticMethods
@ MemberListType_proStaticMethods
Definition: types.h:112
XMLCodeGenerator::m_normalHLNeedStartTag
bool m_normalHLNeedStartTag
Definition: xmlgen.h:58
message.h
ConceptDef::initializer
virtual QCString initializer() const =0
MemberDef::excpString
virtual QCString excpString() const =0
FileDef::name
virtual QCString name() const =0
ClassDef::memberNameInfoLinkedMap
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
MemberDef::virtualness
virtual Specifier virtualness(int count=0) const =0
MemberList::listType
MemberListType listType() const
Definition: memberlist.h:86
MemberDef::isRaisable
virtual bool isRaisable() const =0
MemberDef::enumFieldList
virtual const MemberVector & enumFieldList() const =0
Definition::getReferencesMembers
virtual const MemberVector & getReferencesMembers() const =0
Doxygen::parserManager
static ParserManager * parserManager
Definition: doxygen.h:111
Definition::isAnonymous
virtual bool isAnonymous() const =0
ArgumentList::empty
bool empty() const
Definition: arguments.h:92
ConceptDef::getTemplateParameterList
virtual ArgumentList getTemplateParameterList() const =0
IncludeInfo
Class representing the data associated with a #include statement.
Definition: filedef.h:48
ClassDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
Returns the unique base name (without extension) of the class's file on disk
FileList
Definition: filedef.h:205
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
GroupDef::getMemberGroups
virtual const MemberGroupList & getMemberGroups() const =0
NamespaceDef::getClasses
virtual ClassLinkedRefMap getClasses() const =0
arguments.h
memberVisible
static bool memberVisible(const Definition *d, const MemberDef *md)
Definition: xmlgen.cpp:1049
theTranslator
Translator * theTranslator
Definition: language.cpp:156
Definition::isReference
virtual bool isReference() const =0
resourcemgr.h
Definition::inbodyDocumentation
virtual QCString inbodyDocumentation() const =0
Definition::name
virtual QCString name() const =0
TextGeneratorXMLImpl::TextGeneratorXMLImpl
TextGeneratorXMLImpl(TextStream &t)
Definition: xmlgen.cpp:210
Doxygen::groupLinkedMap
static GroupLinkedMap * groupLinkedMap
Definition: doxygen.h:96
MemberListType_events
@ MemberListType_events
Definition: types.h:135
ClassDef::getClasses
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
doxygen.h
MemberType_DCOP
@ MemberType_DCOP
Definition: types.h:285
parserintf.h
Argument
This class contains the information about the argument of a function or template
Definition: arguments.h:26
XMLCodeGenerator::XMLCodeGenerator
XMLCodeGenerator(TextStream &t)
Definition: xmlgen.cpp:228
TextGeneratorIntf
Abstract interface for a hyperlinked text fragment.
Definition: util.h:60
MemberDef::definition
virtual QCString definition() const =0
MemberDef::getClassDef
virtual const ClassDef * getClassDef() const =0
MemberDef::isFinal
virtual bool isFinal() const =0
language.h
validatingParseDoc
DocRoot * validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
Definition: docparser.cpp:7495
MemberDef::isMutable
virtual bool isMutable() const =0
writeIncludeInfo
static void writeIncludeInfo(const IncludeInfo *ii, TextStream &t)
Definition: xmlgen.cpp:1211
getLanguageSpecificSeparator
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang
Definition: util.cpp:6545
defargs.h
fileToString
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
Definition: util.cpp:1394
ParserManager::getCodeParser
std::unique_ptr< CodeParserInterface > getCodeParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
Definition: parserintf.h:217
docparser.h
writeInnerDirs
static void writeInnerDirs(const DirList *dl, TextStream &t)
Definition: xmlgen.cpp:1199
linkifyText
void linkifyText(const TextGeneratorIntf &out, const Definition *scope, const FileDef *fileScope, const Definition *self, const QCString &text, bool autoBreak, bool external, bool keepSpaces, int indentLevel)
Definition: util.cpp:886
getLanguageFromFileName
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition: util.cpp:5574
Definition::briefDescription
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
TRUE
#define TRUE
Definition: qcstring.h:36
XMLCodeGenerator::m_external
QCString m_external
Definition: xmlgen.h:52
GroupDef::getNamespaces
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
Definition::getStartBodyLine
virtual int getStartBodyLine() const =0
Definition::getEndBodyLine
virtual int getEndBodyLine() const =0
MemberDef::getNamespaceDef
virtual const NamespaceDef * getNamespaceDef() const =0
XMLCodeGenerator::codify
void codify(const QCString &text) override
Generator for producing XML formatted source code.
Definition: xmlgen.cpp:234
MemberListType_pacAttribs
@ MemberListType_pacAttribs
Definition: types.h:120
ArgumentList::constSpecifier
bool constSpecifier() const
Definition: arguments.h:104
XMLCodeGenerator::writeCodeAnchor
void writeCodeAnchor(const QCString &) override
Definition: xmlgen.cpp:323
XMLCodeGenerator::m_lineNumber
int m_lineNumber
Definition: xmlgen.h:53
MemberDef::reimplements
virtual const MemberDef * reimplements() const =0
MemberDef::protection
virtual Protection protection() const =0
LinkedMap::find
const T * find(const std::string &key) const
Find an object given the key.
Definition: linkedmap.h:60
XMLCodeGenerator::m_insideCodeLine
bool m_insideCodeLine
Definition: xmlgen.h:57
NamespaceDef::getNamespaces
virtual NamespaceLinkedRefMap getNamespaces() const =0
insertTemplateSpecifierInScope
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition: util.cpp:3782
QCString::fill
bool fill(char c, int len=-1)
Fills a string with a predefined character
Definition: qcstring.h:175
MemberListType_decEnumMembers
@ MemberListType_decEnumMembers
Definition: types.h:152
SectionInfo::title
QCString title() const
Definition: section.h:66
MemberListType_pacTypes
@ MemberListType_pacTypes
Definition: types.h:128
MemberDef::isStrong
virtual bool isStrong() const =0
Collaboration
@ Collaboration
Definition: dotgraph.h:29
MemberDef::isWritable
virtual bool isWritable() const =0
TextGeneratorXMLImpl
Implements TextGeneratorIntf for an XML stream.
Definition: xmlgen.cpp:207
memberlist.h
MemberListType_priTypes
@ MemberListType_priTypes
Definition: types.h:129
DotClassGraph
Representation of a class inheritance or dependency graph
Definition: dotclassgraph.h:28
writeXMLLink
void writeXMLLink(TextStream &t, const QCString &extRef, const QCString &compoundId, const QCString &anchorId, const QCString &text, const QCString &tooltip)
Definition: xmlgen.cpp:191
XMLCodeGenerator::m_refId
QCString m_refId
Definition: xmlgen.h:51
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
MemberListType_pubStaticAttribs
@ MemberListType_pubStaticAttribs
Definition: types.h:122
dirdef.h
dotclassgraph.h
MemberType_Property
@ MemberType_Property
Definition: types.h:286
MemberDef::getDeclFileName
virtual QCString getDeclFileName() const =0
MemberListType_decDefineMembers
@ MemberListType_decDefineMembers
Definition: types.h:149
Definition::briefFile
virtual QCString briefFile() const =0
MemberDef::hasOneLineInitializer
virtual bool hasOneLineInitializer() const =0
GroupList
Definition: groupdef.h:127
MemberType_Dictionary
@ MemberType_Dictionary
Definition: types.h:291
clearSubDirs
void clearSubDirs(const Dir &d)
Definition: util.cpp:3704
Definition::getSectionRefs
virtual const SectionRefs & getSectionRefs() const =0
returns the section dictionary, only of importance for pagedef
GroupDef::getMemberLists
virtual const MemberLists & getMemberLists() const =0
MemberListType_proMethods
@ MemberListType_proMethods
Definition: types.h:108
GroupDef::getPages
virtual const PageLinkedRefMap & getPages() const =0
utf8.h
Various UTF8 related helper functions.
writeUTF8Char
const char * writeUTF8Char(TextStream &t, const char *s)
Writes the UTF8 character pointed to by s to stream t and returns a pointer to the next character.
Definition: utf8.cpp:197
MemberListType_decFuncMembers
@ MemberListType_decFuncMembers
Definition: types.h:153
MemberListType_proTypes
@ MemberListType_proTypes
Definition: types.h:127
writeListOfAllMembers
static void writeListOfAllMembers(const ClassDef *cd, TextStream &t)
Definition: xmlgen.cpp:1093
MemberDef::isSettable
virtual bool isSettable() const =0
DotClassGraph::writeXML
void writeXML(TextStream &t)
Definition: dotclassgraph.cpp:462
MemberDef::reimplementedBy
virtual const MemberVector & reimplementedBy() const =0
Protected
@ Protected
Definition: types.h:26
QCString::mid
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition: qcstring.h:224
MemberListType_pacMethods
@ MemberListType_pacMethods
Definition: types.h:109
MemberDef::isAddable
virtual bool isAddable() const =0
XMLCodeGenerator::startCodeLine
void startCodeLine(bool) override
Definition: xmlgen.cpp:264
xmldocvisitor.h
MemberListType_proStaticAttribs
@ MemberListType_proStaticAttribs
Definition: types.h:123
MemberDef::templateArguments
virtual const ArgumentList & templateArguments() const =0
MemberListType_detailedLists
@ MemberListType_detailedLists
Definition: types.h:103
MemberDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
ClassDef::isAbstract
virtual bool isAbstract() const =0
Returns TRUE if there is at least one pure virtual member in this class.
MemberDef::isPrivateGettable
virtual bool isPrivateGettable() const =0
XMLCodeGenerator
Definition: xmlgen.h:20
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
GroupDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
MemberDef::isRemovable
virtual bool isRemovable() const =0
MemberListType_related
@ MemberListType_related
Definition: types.h:130
MemberDef::getScopeString
virtual QCString getScopeString() const =0
SectionManager::instance
static SectionManager & instance()
returns a reference to the singleton
Definition: section.h:172
writeInnerGroups
static void writeInnerGroups(const GroupList &gl, TextStream &t)
Definition: xmlgen.cpp:1189
MemberDef::isUNOProperty
virtual bool isUNOProperty() const =0
MemberListType_priMethods
@ MemberListType_priMethods
Definition: types.h:110
msg
void msg(const char *fmt,...)
Definition: message.cpp:53
MemberDef::isSealed
virtual bool isSealed() const =0
Definition::documentation
virtual QCString documentation() const =0
MemberDef::declArgumentList
virtual const ArgumentList & declArgumentList() const =0
ClassDef::isReference
virtual bool isReference() const =0
Returns TRUE if this class is imported via a tag file
MemberDef::isReadonly
virtual bool isReadonly() const =0
MemberType_Event
@ MemberType_Event
Definition: types.h:287
MemberDef::isExplicit
virtual bool isExplicit() const =0
Definition::getOuterScope
virtual Definition * getOuterScope() const =0
DotClassGraph::isTrivial
bool isTrivial() const
Definition: dotclassgraph.cpp:351
MemberListType_proSlots
@ MemberListType_proSlots
Definition: types.h:116
MemberListType_decTypedefMembers
@ MemberListType_decTypedefMembers
Definition: types.h:151
XML_DB
#define XML_DB(x)
Definition: xmlgen.cpp:52
Argument::docs
QCString docs
Definition: arguments.h:55
FileDef::absFilePath
virtual QCString absFilePath() const =0
MemberType_Sequence
@ MemberType_Sequence
Definition: types.h:290
Definition::isArtificial
virtual bool isArtificial() const =0
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
SectionRefs
class that represents a list of constant references to sections.
Definition: section.h:98
MemberDef::getFileDef
virtual const FileDef * getFileDef() const =0
Config_getString
#define Config_getString(name)
Definition: config.h:32
isSection
constexpr bool isSection(SectionType type)
return true if type is a section, and false if it is a page, anchor or table.
Definition: section.h:40
LocalToc::xmlLevel
int xmlLevel() const
Definition: types.h:344
Definition::getDefFileName
virtual QCString getDefFileName() const =0
SectionInfo
class that provide information about a section.
Definition: section.h:49
Inheritance
@ Inheritance
Definition: dotgraph.h:29
XMLCodeGenerator::endFontClass
void endFontClass() override
Definition: xmlgen.cpp:317
XMLCodeGenerator::m_t
TextStream & m_t
Definition: xmlgen.h:50
Argument::name
QCString name
Definition: arguments.h:52
MemberDef::argumentList
virtual const ArgumentList & argumentList() const =0
config.h
MemberListType_pubAttribs
@ MemberListType_pubAttribs
Definition: types.h:118
convertCharEntitiesToUTF8
QCString convertCharEntitiesToUTF8(const QCString &str)
Definition: util.cpp:4170
Doxygen::namespaceLinkedMap
static NamespaceLinkedMap * namespaceLinkedMap
Definition: doxygen.h:97
ASSERT
#define ASSERT(x)
Definition: qcstring.h:44
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
DirDef::getFiles
virtual const FileList & getFiles() const =0
convertToXML
QCString convertToXML(const QCString &s, bool keepEntities)
Definition: util.cpp:3948
MemberDef::isGettable
virtual bool isGettable() const =0
FileDef
A model of a file symbol.
Definition: filedef.h:73
XMLCodeGenerator::endCodeFragment
void endCodeFragment(const QCString &) override
Definition: xmlgen.cpp:352
FileDef::getMemberGroups
virtual const MemberGroupList & getMemberGroups() const =0
MemberDef::enumBaseType
virtual QCString enumBaseType() const =0
ConceptDef::getFileDef
virtual const FileDef * getFileDef() const =0
MemberType_Define
@ MemberType_Define
Definition: types.h:276
DotInclDepGraph
Representation of an include dependency graph
Definition: dotincldepgraph.h:30
TextGeneratorXMLImpl::writeString
void writeString(const QCString &s, bool) const
Definition: xmlgen.cpp:211
writeMemberReference
static void writeMemberReference(TextStream &t, const Definition *def, const MemberDef *rmd, const QCString &tagName)
Definition: xmlgen.cpp:465
MemberDef::getWriteAccessor
virtual QCString getWriteAccessor() const =0
stripFromPath
static QCString stripFromPath(const QCString &path, const StringVector &l)
Definition: util.cpp:292
writeXMLCodeBlock
void writeXMLCodeBlock(TextStream &t, FileDef *fd)
Definition: xmlgen.cpp:440
IncludeInfo::includeName
QCString includeName
Definition: filedef.h:54
LocalToc::isXmlEnabled
bool isXmlEnabled() const
Definition: types.h:339
MemberDef::isNoExcept
virtual bool isNoExcept() const =0
MemberListType_pacStaticMethods
@ MemberListType_pacStaticMethods
Definition: types.h:113
DirDef::displayName
virtual QCString displayName(bool=TRUE) const =0
generateXMLForConcept
static void generateXMLForConcept(const ConceptDef *cd, TextStream &ti)
Definition: xmlgen.cpp:1417
ClassDef::isSealed
virtual bool isSealed() const =0
Returns TRUE if this class is marked as sealed
MemberDef::isReadable
virtual bool isReadable() const =0
MemberDef::isMaybeAmbiguous
virtual bool isMaybeAmbiguous() const =0
ClassDef::getMemberGroups
virtual const MemberGroupList & getMemberGroups() const =0
Returns the member groups defined for this class
DirDef::subDirs
virtual const DirList & subDirs() const =0
MemberListType_properties
@ MemberListType_properties
Definition: types.h:134
DotInclDepGraph::isTrivial
bool isTrivial() const
Definition: dotincldepgraph.cpp:196
TextGeneratorXMLImpl::m_t
TextStream & m_t
Definition: xmlgen.cpp:223
htmlentity.h
MemberDef::isCopy
virtual bool isCopy() const =0
dir.h
Config::writeXMLDoxyfile
void writeXMLDoxyfile(TextStream &t)
MemberDef::isOptional
virtual bool isOptional() const =0
Doxygen::classLinkedMap
static ClassLinkedMap * classLinkedMap
Definition: doxygen.h:78
MemberDef::initializer
virtual const QCString & initializer() const =0
FileDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
util.h
A bunch of utility functions.
createSubDirs
void createSubDirs(const Dir &d)
Definition: util.cpp:3677
MemberDef::typeString
virtual QCString typeString() const =0
MemberDef::isPrivateSettable
virtual bool isPrivateSettable() const =0
MemberDef::requiresClause
virtual QCString requiresClause() const =0
MemberListType_pubStaticMethods
@ MemberListType_pubStaticMethods
Definition: types.h:111
CodeSymbolType
CodeSymbolType
Definition: types.h:204
Argument::hasDocumentation
bool hasDocumentation() const
Definition: arguments.h:44
MemberList
A list of MemberDef objects as shown in documentation sections.
Definition: memberlist.h:81
QCString::stripPrefix
bool stripPrefix(const QCString &prefix)
Definition: qcstring.h:197
ClassLinkedRefMap
Definition: classlist.h:30
XMLCodeGenerator::finish
void finish()
Definition: xmlgen.cpp:342
QCString::prepend
QCString & prepend(const char *s)
Definition: qcstring.h:339
QCString::resize
bool resize(size_t newlen)
Resizes the string to hold newlen characters (this value should also count the 0-terminator).
Definition: qcstring.h:164
MemberDef::memberType
virtual MemberType memberType() const =0
writeInnerClasses
static void writeInnerClasses(const ClassLinkedRefMap &cl, TextStream &t)
Definition: xmlgen.cpp:1134
MemberDef::isBound
virtual bool isBound() const =0
ClassDef::templateArguments
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class
MemberDef::isProtectedSettable
virtual bool isProtectedSettable() const =0
MemberDef::getGroupDef
virtual const GroupDef * getGroupDef() const =0
classOutputFileBase
static QCString classOutputFileBase(const ClassDef *cd)
Definition: xmlgen.cpp:501
MemberDef::isTransient
virtual bool isTransient() const =0
MemberDef::isAssign
virtual bool isAssign() const =0
XMLCodeGenerator::startFontClass
void startFontClass(const QCString &colorClass) override
Definition: xmlgen.cpp:306
createDocParser
std::unique_ptr< IDocParser > createDocParser()
Definition: docparser.cpp:179
FALSE
#define FALSE
Definition: qcstring.h:33
Doxygen::exampleLinkedMap
static PageLinkedMap * exampleLinkedMap
Definition: doxygen.h:81
FileDef::includeFileList
virtual const IncludeInfoList & includeFileList() const =0
Pure
@ Pure
Definition: types.h:29
TextStream::write
void write(const char *buf, size_t len)
Adds a array of character to the stream
Definition: textstream.h:180
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108