Classes | Macros | Functions | Variables
xmlgen.cpp File Reference
#include <stdlib.h>
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qintdict.h>
#include "xmlgen.h"
#include "doxygen.h"
#include "message.h"
#include "config.h"
#include "classlist.h"
#include "util.h"
#include "defargs.h"
#include "outputgen.h"
#include "dot.h"
#include "pagedef.h"
#include "filename.h"
#include "version.h"
#include "xmldocvisitor.h"
#include "docparser.h"
#include "language.h"
#include "parserintf.h"
#include "arguments.h"
#include "memberlist.h"
#include "groupdef.h"
#include "memberdef.h"
#include "namespacedef.h"
#include "membername.h"
#include "membergroup.h"
#include "dirdef.h"
#include "section.h"
#include "htmlentity.h"
#include "resourcemgr.h"

Go to the source code of this file.

Classes

class  XmlSectionMapper
 
class  TextGeneratorXMLImpl
 
class  XMLCodeGenerator
 

Macros

#define XML_DB(x)   do {} while(0)
 

Functions

void writeXMLString (FTextStream &t, const char *s)
 
void writeXMLCodeString (FTextStream &t, const char *s, int &col)
 
static void writeXMLHeader (FTextStream &t)
 
static void writeCombineScript ()
 
void writeXMLLink (FTextStream &t, const char *extRef, const char *compoundId, const char *anchorId, const char *text, const char *tooltip)
 
static void writeTemplateArgumentList (ArgumentList *al, FTextStream &t, Definition *scope, FileDef *fileScope, int indent)
 
static void writeMemberTemplateLists (MemberDef *md, FTextStream &t)
 
static void writeTemplateList (ClassDef *cd, FTextStream &t)
 
static void writeXMLDocBlock (FTextStream &t, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
 
void writeXMLCodeBlock (FTextStream &t, FileDef *fd)
 
static void writeMemberReference (FTextStream &t, Definition *def, MemberDef *rmd, const char *tagName)
 
static void stripQualifiers (QCString &typeStr)
 
static QCString classOutputFileBase (ClassDef *cd)
 
static QCString memberOutputFileBase (MemberDef *md)
 
static void generateXMLForMember (MemberDef *md, FTextStream &ti, FTextStream &t, Definition *def)
 
static void generateXMLSection (Definition *d, FTextStream &ti, FTextStream &t, MemberList *ml, const char *kind, const char *header=0, const char *documentation=0)
 
static void writeListOfAllMembers (ClassDef *cd, FTextStream &t)
 
static void writeInnerClasses (const ClassSDict *cl, FTextStream &t)
 
static void writeInnerNamespaces (const NamespaceSDict *nl, FTextStream &t)
 
static void writeInnerFiles (const FileList *fl, FTextStream &t)
 
static void writeInnerPages (const PageSDict *pl, FTextStream &t)
 
static void writeInnerGroups (const GroupList *gl, FTextStream &t)
 
static void writeInnerDirs (const DirList *dl, FTextStream &t)
 
static void generateXMLForClass (ClassDef *cd, FTextStream &ti)
 
static void generateXMLForNamespace (NamespaceDef *nd, FTextStream &ti)
 
static void generateXMLForFile (FileDef *fd, FTextStream &ti)
 
static void generateXMLForGroup (GroupDef *gd, FTextStream &ti)
 
static void generateXMLForDir (DirDef *dd, FTextStream &ti)
 
static void generateXMLForPage (PageDef *pd, FTextStream &ti, bool isExample)
 
void generateXML ()
 

Variables

static XmlSectionMapper g_xmlSectionMapper
 

Macro Definition Documentation

#define XML_DB (   x)    do {} while(0)

Definition at line 52 of file xmlgen.cpp.

Function Documentation

static QCString classOutputFileBase ( ClassDef cd)
static

Definition at line 506 of file xmlgen.cpp.

507 {
508  //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
509  //if (inlineGroupedClasses && cd->partOfGroups()!=0)
510  return cd->getOutputFileBase();
511  //else
512  // return cd->getOutputFileBase();
513 }
QCString getOutputFileBase() const
Definition: classdef.cpp:3533
void generateXML ( )

Definition at line 1839 of file xmlgen.cpp.

1840 {
1841  // + classes
1842  // + namespaces
1843  // + files
1844  // + groups
1845  // + related pages
1846  // - examples
1847 
1848  QCString outputDirectory = Config_getString("XML_OUTPUT");
1849  QDir xmlDir(outputDirectory);
1850  createSubDirs(xmlDir);
1851 
1852  ResourceMgr::instance().copyResource("index.xsd",outputDirectory);
1853 
1854  QCString fileName=outputDirectory+"/compound.xsd";
1855  QFile f(fileName);
1856  if (!f.open(IO_WriteOnly))
1857  {
1858  err("Cannot open file %s for writing!\n",fileName.data());
1859  return;
1860  }
1861 
1862  // write compound.xsd, but replace special marker with the entities
1863  QCString compound_xsd = ResourceMgr::instance().getAsString("compound.xsd");
1864  const char *startLine = compound_xsd.data();
1865  while (*startLine)
1866  {
1867  // find end of the line
1868  const char *endLine = startLine+1;
1869  while (*endLine && *(endLine-1)!='\n') endLine++; // skip to end of the line including \n
1870  int len=endLine-startLine;
1871  if (len>0)
1872  {
1873  QCString s(len+1);
1874  qstrncpy(s.rawData(),startLine,len);
1875  s[len]='\0';
1876  if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
1877  {
1878  FTextStream t(&f);
1880  }
1881  else
1882  {
1883  f.writeBlock(startLine,len);
1884  }
1885  }
1886  startLine=endLine;
1887  }
1888  f.close();
1889 
1890  fileName=outputDirectory+"/index.xml";
1891  f.setName(fileName);
1892  if (!f.open(IO_WriteOnly))
1893  {
1894  err("Cannot open file %s for writing!\n",fileName.data());
1895  return;
1896  }
1897  FTextStream t(&f);
1898  //t.setEncoding(FTextStream::UnicodeUTF8);
1899 
1900  // write index header
1901  t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
1902  t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
1903  t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
1904  t << "version=\"" << versionString << "\">" << endl;
1905 
1906  {
1908  ClassDef *cd;
1909  for (cli.toFirst();(cd=cli.current());++cli)
1910  {
1911  generateXMLForClass(cd,t);
1912  }
1913  }
1914  //{
1915  // ClassSDict::Iterator cli(Doxygen::hiddenClasses);
1916  // ClassDef *cd;
1917  // for (cli.toFirst();(cd=cli.current());++cli)
1918  // {
1919  // msg("Generating XML output for class %s\n",cd->name().data());
1920  // generateXMLForClass(cd,t);
1921  // }
1922  //}
1924  NamespaceDef *nd;
1925  for (nli.toFirst();(nd=nli.current());++nli)
1926  {
1927  msg("Generating XML output for namespace %s\n",nd->name().data());
1929  }
1931  FileName *fn;
1932  for (;(fn=fnli.current());++fnli)
1933  {
1934  FileNameIterator fni(*fn);
1935  FileDef *fd;
1936  for (;(fd=fni.current());++fni)
1937  {
1938  msg("Generating XML output for file %s\n",fd->name().data());
1939  generateXMLForFile(fd,t);
1940  }
1941  }
1943  GroupDef *gd;
1944  for (;(gd=gli.current());++gli)
1945  {
1946  msg("Generating XML output for group %s\n",gd->name().data());
1947  generateXMLForGroup(gd,t);
1948  }
1949  {
1951  PageDef *pd=0;
1952  for (pdi.toFirst();(pd=pdi.current());++pdi)
1953  {
1954  msg("Generating XML output for page %s\n",pd->name().data());
1956  }
1957  }
1958  {
1959  DirDef *dir;
1961  for (sdi.toFirst();(dir=sdi.current());++sdi)
1962  {
1963  msg("Generate XML output for dir %s\n",dir->name().data());
1964  generateXMLForDir(dir,t);
1965  }
1966  }
1967  {
1969  PageDef *pd=0;
1970  for (pdi.toFirst();(pd=pdi.current());++pdi)
1971  {
1972  msg("Generating XML output for example %s\n",pd->name().data());
1974  }
1975  }
1976  if (Doxygen::mainPage)
1977  {
1978  msg("Generating XML output for the main page\n");
1980  }
1981 
1982  //t << " </compoundlist>" << endl;
1983  t << "</doxygenindex>" << endl;
1984 
1986 }
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
static GroupSDict * groupSDict
Definition: doxygen.h:119
char * rawData() const
Definition: qcstring.h:216
QCString getAsString(const char *name) const
char * qstrncpy(char *dst, const char *src, uint len)
Definition: qcstring.cpp:557
void writeXMLSchema(FTextStream &t)
Definition: htmlentity.cpp:477
static PageSDict * exampleSDict
Definition: doxygen.h:101
void msg(const char *fmt,...)
Definition: message.cpp:107
#define IO_WriteOnly
Definition: qiodevice.h:62
const bool FALSE
Definition: qglobal.h:370
static FileNameList * inputNameList
Definition: doxygen.h:109
bool copyResource(const char *name, const char *targetDir) const
static ResourceMgr & instance()
Definition: resourcemgr.cpp:35
static HtmlEntityMapper * instance()
Definition: htmlentity.cpp:341
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
string dir
static void generateXMLForGroup(GroupDef *gd, FTextStream &ti)
Definition: xmlgen.cpp:1644
static void generateXMLForDir(DirDef *dd, FTextStream &ti)
Definition: xmlgen.cpp:1719
static NamespaceSDict * namespaceSDict
Definition: doxygen.h:120
def cli(ctx)
Definition: main.py:7
QAsciiDict< Entry > fn
const QCString & name() const
Definition: definition.h:114
fileName
Definition: dumpTree.py:9
QCString name() const
Definition: filedef.cpp:1193
static DirSDict * directories
Definition: doxygen.h:139
char versionString[]
Definition: version.cpp:1
static PageSDict * pageSDict
Definition: doxygen.h:102
const char * data() const
Definition: qcstring.h:207
Definition: dirdef.h:44
#define Config_getString(val)
Definition: config.cpp:660
void err(const char *fmt,...)
Definition: message.cpp:226
static void generateXMLForNamespace(NamespaceDef *nd, FTextStream &ti)
Definition: xmlgen.cpp:1428
static void generateXMLForClass(ClassDef *cd, FTextStream &ti)
Definition: xmlgen.cpp:1215
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
static void generateXMLForPage(PageDef *pd, FTextStream &ti, bool isExample)
Definition: xmlgen.cpp:1758
static void generateXMLForFile(FileDef *fd, FTextStream &ti)
Definition: xmlgen.cpp:1504
A model of a page symbol.
Definition: pagedef.h:29
void createSubDirs(QDir &d)
Definition: util.cpp:5458
friend class Iterator
Definition: sortdict.h:289
static ClassSDict * classSDict
Definition: doxygen.h:99
static PageDef * mainPage
Definition: doxygen.h:103
static void writeCombineScript()
Definition: xmlgen.cpp:154
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
QTextStream & endl(QTextStream &s)
static void generateXMLForClass ( ClassDef cd,
FTextStream ti 
)
static

Definition at line 1215 of file xmlgen.cpp.

1216 {
1217  // + brief description
1218  // + detailed description
1219  // + template argument list(s)
1220  // - include file
1221  // + member groups
1222  // + inheritance diagram
1223  // + list of direct super classes
1224  // + list of direct sub classes
1225  // + list of inner classes
1226  // + collaboration diagram
1227  // + list of all members
1228  // + user defined member sections
1229  // + standard member sections
1230  // + detailed member documentation
1231  // - examples using the class
1232 
1233  if (cd->isReference()) return; // skip external references.
1234  if (cd->isHidden()) return; // skip hidden classes.
1235  if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
1236  if (cd->templateMaster()!=0) return; // skip generated template instances.
1237  if (cd->isArtificial()) return; // skip artificially created classes
1238 
1239  msg("Generating XML output for class %s\n",cd->name().data());
1240 
1241  ti << " <compound refid=\"" << classOutputFileBase(cd)
1242  << "\" kind=\"" << cd->compoundTypeString()
1243  << "\"><name>" << convertToXML(cd->name()) << "</name>" << endl;
1244 
1245  QCString outputDirectory = Config_getString("XML_OUTPUT");
1246  QCString fileName=outputDirectory+"/"+ classOutputFileBase(cd)+".xml";
1247  QFile f(fileName);
1248  if (!f.open(IO_WriteOnly))
1249  {
1250  err("Cannot open file %s for writing!\n",fileName.data());
1251  return;
1252  }
1253  FTextStream t(&f);
1254  //t.setEncoding(FTextStream::UnicodeUTF8);
1255 
1256  writeXMLHeader(t);
1257  t << " <compounddef id=\""
1258  << classOutputFileBase(cd) << "\" kind=\""
1259  << cd->compoundTypeString() << "\" language=\""
1260  << langToString(cd->getLanguage()) << "\" prot=\"";
1261  switch (cd->protection())
1262  {
1263  case Public: t << "public"; break;
1264  case Protected: t << "protected"; break;
1265  case Private: t << "private"; break;
1266  case Package: t << "package"; break;
1267  }
1268  if (cd->isFinal()) t << "\" final=\"yes";
1269  if (cd->isSealed()) t << "\" sealed=\"yes";
1270  if (cd->isAbstract()) t << "\" abstract=\"yes";
1271  t << "\">" << endl;
1272  t << " <compoundname>";
1273  writeXMLString(t,cd->name());
1274  t << "</compoundname>" << endl;
1275  if (cd->baseClasses())
1276  {
1277  BaseClassListIterator bcli(*cd->baseClasses());
1278  BaseClassDef *bcd;
1279  for (bcli.toFirst();(bcd=bcli.current());++bcli)
1280  {
1281  t << " <basecompoundref ";
1282  if (bcd->classDef->isLinkable())
1283  {
1284  t << "refid=\"" << classOutputFileBase(bcd->classDef) << "\" ";
1285  }
1286  t << "prot=\"";
1287  switch (bcd->prot)
1288  {
1289  case Public: t << "public"; break;
1290  case Protected: t << "protected"; break;
1291  case Private: t << "private"; break;
1292  case Package: ASSERT(0); break;
1293  }
1294  t << "\" virt=\"";
1295  switch(bcd->virt)
1296  {
1297  case Normal: t << "non-virtual"; break;
1298  case Virtual: t << "virtual"; break;
1299  case Pure: t <<"pure-virtual"; break;
1300  }
1301  t << "\">";
1302  if (!bcd->templSpecifiers.isEmpty())
1303  {
1304  t << convertToXML(
1306  bcd->classDef->name(),bcd->templSpecifiers)
1307  );
1308  }
1309  else
1310  {
1311  t << convertToXML(bcd->classDef->displayName());
1312  }
1313  t << "</basecompoundref>" << endl;
1314  }
1315  }
1316  if (cd->subClasses())
1317  {
1318  BaseClassListIterator bcli(*cd->subClasses());
1319  BaseClassDef *bcd;
1320  for (bcli.toFirst();(bcd=bcli.current());++bcli)
1321  {
1322  t << " <derivedcompoundref refid=\""
1323  << classOutputFileBase(bcd->classDef)
1324  << "\" prot=\"";
1325  switch (bcd->prot)
1326  {
1327  case Public: t << "public"; break;
1328  case Protected: t << "protected"; break;
1329  case Private: t << "private"; break;
1330  case Package: ASSERT(0); break;
1331  }
1332  t << "\" virt=\"";
1333  switch(bcd->virt)
1334  {
1335  case Normal: t << "non-virtual"; break;
1336  case Virtual: t << "virtual"; break;
1337  case Pure: t << "pure-virtual"; break;
1338  }
1339  t << "\">" << convertToXML(bcd->classDef->displayName())
1340  << "</derivedcompoundref>" << endl;
1341  }
1342  }
1343 
1344  IncludeInfo *ii=cd->includeInfo();
1345  if (ii)
1346  {
1347  QCString nm = ii->includeName;
1348  if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
1349  if (!nm.isEmpty())
1350  {
1351  t << " <includes";
1352  if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
1353  {
1354  t << " refid=\"" << ii->fileDef->getOutputFileBase() << "\"";
1355  }
1356  t << " local=\"" << (ii->local ? "yes" : "no") << "\">";
1357  t << nm;
1358  t << "</includes>" << endl;
1359  }
1360  }
1361 
1363 
1364  writeTemplateList(cd,t);
1365  if (cd->getMemberGroupSDict())
1366  {
1368  MemberGroup *mg;
1369  for (;(mg=mgli.current());++mgli)
1370  {
1371  generateXMLSection(cd,ti,t,mg->members(),"user-defined",mg->header(),
1372  mg->documentation());
1373  }
1374  }
1375 
1377  MemberList *ml;
1378  for (mli.toFirst();(ml=mli.current());++mli)
1379  {
1380  if ((ml->listType()&MemberListType_detailedLists)==0)
1381  {
1382  generateXMLSection(cd,ti,t,ml,g_xmlSectionMapper.find(ml->listType()));
1383  }
1384  }
1385 
1386  t << " <briefdescription>" << endl;
1387  writeXMLDocBlock(t,cd->briefFile(),cd->briefLine(),cd,0,cd->briefDescription());
1388  t << " </briefdescription>" << endl;
1389  t << " <detaileddescription>" << endl;
1390  writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd,0,cd->documentation());
1391  t << " </detaileddescription>" << endl;
1392  DotClassGraph inheritanceGraph(cd,DotNode::Inheritance);
1393  if (!inheritanceGraph.isTrivial())
1394  {
1395  t << " <inheritancegraph>" << endl;
1396  inheritanceGraph.writeXML(t);
1397  t << " </inheritancegraph>" << endl;
1398  }
1399  DotClassGraph collaborationGraph(cd,DotNode::Collaboration);
1400  if (!collaborationGraph.isTrivial())
1401  {
1402  t << " <collaborationgraph>" << endl;
1403  collaborationGraph.writeXML(t);
1404  t << " </collaborationgraph>" << endl;
1405  }
1406  t << " <location file=\""
1407  << stripFromPath(cd->getDefFileName()) << "\" line=\""
1408  << cd->getDefLine() << "\"" << " column=\""
1409  << cd->getDefColumn() << "\"" ;
1410  if (cd->getStartBodyLine()!=-1)
1411  {
1412  FileDef *bodyDef = cd->getBodyDef();
1413  if (bodyDef)
1414  {
1415  t << " bodyfile=\"" << stripFromPath(bodyDef->absFilePath()) << "\"";
1416  }
1417  t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
1418  << cd->getEndBodyLine() << "\"";
1419  }
1420  t << "/>" << endl;
1422  t << " </compounddef>" << endl;
1423  t << "</doxygen>" << endl;
1424 
1425  ti << " </compound>" << endl;
1426 }
static void writeXMLHeader(FTextStream &t)
Definition: xmlgen.cpp:146
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString docFile() const
bool isArtificial() const
BaseClassList * subClasses() const
Definition: classdef.cpp:4404
IncludeInfo * includeInfo() const
Definition: classdef.cpp:4449
Definition: types.h:29
bool isEmpty() const
Definition: qcstring.h:189
void msg(const char *fmt,...)
Definition: message.cpp:107
Definition: types.h:29
#define IO_WriteOnly
Definition: qiodevice.h:62
Definition: types.h:26
FileDef * getBodyDef() const
static XmlSectionMapper g_xmlSectionMapper
Definition: xmlgen.cpp:106
QCString compoundTypeString() const
Definition: classdef.cpp:3499
friend class Iterator
Definition: sortdict.h:598
bool isReference() const
Definition: classdef.cpp:3826
Definition: types.h:26
static void generateXMLSection(Definition *d, FTextStream &ti, FTextStream &t, MemberList *ml, const char *kind, const char *header=0, const char *documentation=0)
Definition: xmlgen.cpp:1022
bool isAbstract() const
Definition: classdef.cpp:4479
int briefLine() const
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static constexpr double mg
Definition: Units.h:145
Definition: types.h:26
static void writeListOfAllMembers(ClassDef *cd, FTextStream &t)
Definition: xmlgen.cpp:1064
static void writeXMLDocBlock(FTextStream &t, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
Definition: xmlgen.cpp:423
Definition: types.h:29
bool isSealed() const
Definition: classdef.cpp:4489
ClassSDict * getClassSDict()
Definition: classdef.cpp:4389
Protection protection() const
Definition: classdef.cpp:4414
QCString getDefFileName() const
int getDefColumn() const
Definition: definition.h:191
static QCString stripFromPath(const QCString &path, QStrList &l)
Definition: util.cpp:274
ClassDef * templateMaster() const
Definition: classdef.cpp:4439
const QCString & name() const
Definition: definition.h:114
int getDefLine() const
Definition: definition.h:188
static void writeInnerClasses(const ClassSDict *cl, FTextStream &t)
Definition: xmlgen.cpp:1112
fileName
Definition: dumpTree.py:9
SrcLangExt getLanguage() const
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
bool isFinal() const
Definition: classdef.cpp:4484
QCString briefFile() const
void err(const char *fmt,...)
Definition: message.cpp:226
QCString absFilePath() const
Definition: filedef.h:96
virtual QCString briefDescription(bool abbreviate=FALSE) const
static void writeTemplateList(ClassDef *cd, FTextStream &t)
Definition: xmlgen.cpp:418
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
void writeXMLString(FTextStream &t, const char *s)
Definition: xmlgen.cpp:109
MemberGroupSDict * getMemberGroupSDict() const
Definition: classdef.cpp:4524
bool isHidden() const
int getEndBodyLine() const
int getStartBodyLine() const
static QCString classOutputFileBase(ClassDef *cd)
Definition: xmlgen.cpp:506
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition: util.cpp:5527
int docLine() const
virtual QCString documentation() const
const QList< MemberList > & getMemberLists() const
Definition: classdef.cpp:4519
type * find(long k) const
Definition: qintdict.h:63
QTextStream & endl(QTextStream &s)
BaseClassList * baseClasses() const
Definition: classdef.cpp:4399
QCString langToString(SrcLangExt lang)
Definition: util.cpp:8041
#define ASSERT(x)
Definition: qglobal.h:590
static void generateXMLForDir ( DirDef dd,
FTextStream ti 
)
static

Definition at line 1719 of file xmlgen.cpp.

1720 {
1721  if (dd->isReference()) return; // skip external references
1722  ti << " <compound refid=\"" << dd->getOutputFileBase()
1723  << "\" kind=\"dir\"><name>" << convertToXML(dd->displayName())
1724  << "</name>" << endl;
1725 
1726  QCString outputDirectory = Config_getString("XML_OUTPUT");
1727  QCString fileName=outputDirectory+"/"+dd->getOutputFileBase()+".xml";
1728  QFile f(fileName);
1729  if (!f.open(IO_WriteOnly))
1730  {
1731  err("Cannot open file %s for writing!\n",fileName.data());
1732  return;
1733  }
1734 
1735  FTextStream t(&f);
1736  //t.setEncoding(FTextStream::UnicodeUTF8);
1737  writeXMLHeader(t);
1738  t << " <compounddef id=\""
1739  << dd->getOutputFileBase() << "\" kind=\"dir\">" << endl;
1740  t << " <compoundname>" << convertToXML(dd->displayName()) << "</compoundname>" << endl;
1741 
1742  writeInnerDirs(&dd->subDirs(),t);
1743  writeInnerFiles(dd->getFiles(),t);
1744 
1745  t << " <briefdescription>" << endl;
1746  writeXMLDocBlock(t,dd->briefFile(),dd->briefLine(),dd,0,dd->briefDescription());
1747  t << " </briefdescription>" << endl;
1748  t << " <detaileddescription>" << endl;
1749  writeXMLDocBlock(t,dd->docFile(),dd->docLine(),dd,0,dd->documentation());
1750  t << " </detaileddescription>" << endl;
1751  t << " <location file=\"" << stripFromPath(dd->name()) << "\"/>" << endl;
1752  t << " </compounddef>" << endl;
1753  t << "</doxygen>" << endl;
1754 
1755  ti << " </compound>" << endl;
1756 }
static void writeXMLHeader(FTextStream &t)
Definition: xmlgen.cpp:146
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString docFile() const
#define IO_WriteOnly
Definition: qiodevice.h:62
int briefLine() const
virtual bool isReference() const
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
static void writeInnerFiles(const FileList *fl, FTextStream &t)
Definition: xmlgen.cpp:1154
static void writeXMLDocBlock(FTextStream &t, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
Definition: xmlgen.cpp:423
QCString displayName(bool=TRUE) const
Definition: dirdef.h:56
static QCString stripFromPath(const QCString &path, QStrList &l)
Definition: util.cpp:274
const QCString & name() const
Definition: definition.h:114
fileName
Definition: dumpTree.py:9
static void writeInnerDirs(const DirList *dl, FTextStream &t)
Definition: xmlgen.cpp:1201
const DirList & subDirs() const
Definition: dirdef.h:61
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
QCString briefFile() const
void err(const char *fmt,...)
Definition: message.cpp:226
virtual QCString briefDescription(bool abbreviate=FALSE) const
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
QCString getOutputFileBase() const
Definition: dirdef.cpp:113
FileList * getFiles() const
Definition: dirdef.h:59
int docLine() const
virtual QCString documentation() const
QTextStream & endl(QTextStream &s)
static void generateXMLForFile ( FileDef fd,
FTextStream ti 
)
static

Definition at line 1504 of file xmlgen.cpp.

1505 {
1506  // + includes files
1507  // + includedby files
1508  // + include graph
1509  // + included by graph
1510  // + contained class definitions
1511  // + contained namespace definitions
1512  // + member groups
1513  // + normal members
1514  // + brief desc
1515  // + detailed desc
1516  // + source code
1517  // + location
1518  // - number of lines
1519 
1520  if (fd->isReference()) return; // skip external references
1521 
1522  ti << " <compound refid=\"" << fd->getOutputFileBase()
1523  << "\" kind=\"file\"><name>" << convertToXML(fd->name())
1524  << "</name>" << endl;
1525 
1526  QCString outputDirectory = Config_getString("XML_OUTPUT");
1527  QCString fileName=outputDirectory+"/"+fd->getOutputFileBase()+".xml";
1528  QFile f(fileName);
1529  if (!f.open(IO_WriteOnly))
1530  {
1531  err("Cannot open file %s for writing!\n",fileName.data());
1532  return;
1533  }
1534  FTextStream t(&f);
1535  //t.setEncoding(FTextStream::UnicodeUTF8);
1536 
1537  writeXMLHeader(t);
1538  t << " <compounddef id=\"" << fd->getOutputFileBase()
1539  << "\" kind=\"file\" language=\""
1540  << langToString(fd->getLanguage()) << "\">" << endl;
1541  t << " <compoundname>";
1542  writeXMLString(t,fd->name());
1543  t << "</compoundname>" << endl;
1544 
1545  IncludeInfo *inc;
1546 
1547  if (fd->includeFileList())
1548  {
1550  for (ili1.toFirst();(inc=ili1.current());++ili1)
1551  {
1552  t << " <includes";
1553  if (inc->fileDef && !inc->fileDef->isReference()) // TODO: support external references
1554  {
1555  t << " refid=\"" << inc->fileDef->getOutputFileBase() << "\"";
1556  }
1557  t << " local=\"" << (inc->local ? "yes" : "no") << "\">";
1558  t << inc->includeName;
1559  t << "</includes>" << endl;
1560  }
1561  }
1562 
1563  if (fd->includedByFileList())
1564  {
1566  for (ili2.toFirst();(inc=ili2.current());++ili2)
1567  {
1568  t << " <includedby";
1569  if (inc->fileDef && !inc->fileDef->isReference()) // TODO: support external references
1570  {
1571  t << " refid=\"" << inc->fileDef->getOutputFileBase() << "\"";
1572  }
1573  t << " local=\"" << (inc->local ? "yes" : "no") << "\">";
1574  t << inc->includeName;
1575  t << "</includedby>" << endl;
1576  }
1577  }
1578 
1579  DotInclDepGraph incDepGraph(fd,FALSE);
1580  if (!incDepGraph.isTrivial())
1581  {
1582  t << " <incdepgraph>" << endl;
1583  incDepGraph.writeXML(t);
1584  t << " </incdepgraph>" << endl;
1585  }
1586 
1587  DotInclDepGraph invIncDepGraph(fd,TRUE);
1588  if (!invIncDepGraph.isTrivial())
1589  {
1590  t << " <invincdepgraph>" << endl;
1591  invIncDepGraph.writeXML(t);
1592  t << " </invincdepgraph>" << endl;
1593  }
1594 
1595  if (fd->getClassSDict())
1596  {
1598  }
1599  if (fd->getNamespaceSDict())
1600  {
1602  }
1603 
1604  if (fd->getMemberGroupSDict())
1605  {
1607  MemberGroup *mg;
1608  for (;(mg=mgli.current());++mgli)
1609  {
1610  generateXMLSection(fd,ti,t,mg->members(),"user-defined",mg->header(),
1611  mg->documentation());
1612  }
1613  }
1614 
1616  MemberList *ml;
1617  for (mli.toFirst();(ml=mli.current());++mli)
1618  {
1619  if ((ml->listType()&MemberListType_declarationLists)!=0)
1620  {
1621  generateXMLSection(fd,ti,t,ml,g_xmlSectionMapper.find(ml->listType()));
1622  }
1623  }
1624 
1625  t << " <briefdescription>" << endl;
1626  writeXMLDocBlock(t,fd->briefFile(),fd->briefLine(),fd,0,fd->briefDescription());
1627  t << " </briefdescription>" << endl;
1628  t << " <detaileddescription>" << endl;
1629  writeXMLDocBlock(t,fd->docFile(),fd->docLine(),fd,0,fd->documentation());
1630  t << " </detaileddescription>" << endl;
1631  if (Config_getBool("XML_PROGRAMLISTING"))
1632  {
1633  t << " <programlisting>" << endl;
1634  writeXMLCodeBlock(t,fd);
1635  t << " </programlisting>" << endl;
1636  }
1637  t << " <location file=\"" << stripFromPath(fd->getDefFileName()) << "\"/>" << endl;
1638  t << " </compounddef>" << endl;
1639  t << "</doxygen>" << endl;
1640 
1641  ti << " </compound>" << endl;
1642 }
static void writeXMLHeader(FTextStream &t)
Definition: xmlgen.cpp:146
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString docFile() const
ClassSDict * getClassSDict() const
Definition: filedef.h:134
#define IO_WriteOnly
Definition: qiodevice.h:62
static XmlSectionMapper g_xmlSectionMapper
Definition: xmlgen.cpp:106
const bool FALSE
Definition: qglobal.h:370
friend class Iterator
Definition: sortdict.h:598
static void generateXMLSection(Definition *d, FTextStream &ti, FTextStream &t, MemberList *ml, const char *kind, const char *header=0, const char *documentation=0)
Definition: xmlgen.cpp:1022
int briefLine() const
virtual bool isReference() const
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
static constexpr double mg
Definition: Units.h:145
static void writeXMLDocBlock(FTextStream &t, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
Definition: xmlgen.cpp:423
QCString getDefFileName() const
static QCString stripFromPath(const QCString &path, QStrList &l)
Definition: util.cpp:274
NamespaceSDict * getNamespaceSDict() const
Definition: filedef.h:133
static void writeInnerClasses(const ClassSDict *cl, FTextStream &t)
Definition: xmlgen.cpp:1112
fileName
Definition: dumpTree.py:9
void writeXMLCodeBlock(FTextStream &t, FileDef *fd)
Definition: xmlgen.cpp:447
QCString name() const
Definition: filedef.cpp:1193
QList< IncludeInfo > * includeFileList() const
Definition: filedef.h:124
SrcLangExt getLanguage() const
const char * data() const
Definition: qcstring.h:207
const QList< MemberList > & getMemberLists() const
Definition: filedef.h:129
#define Config_getString(val)
Definition: config.cpp:660
QCString includeName
Definition: filedef.h:50
#define Config_getBool(val)
Definition: config.cpp:664
QCString briefFile() const
void err(const char *fmt,...)
Definition: message.cpp:226
virtual QCString briefDescription(bool abbreviate=FALSE) const
QCString getOutputFileBase() const
Definition: filedef.h:83
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
void writeXMLString(FTextStream &t, const char *s)
Definition: xmlgen.cpp:109
bool local
Definition: filedef.h:51
FileDef * fileDef
Definition: filedef.h:49
QList< IncludeInfo > * includedByFileList() const
Definition: filedef.h:125
MemberGroupSDict * getMemberGroupSDict() const
Definition: filedef.h:132
static void writeInnerNamespaces(const NamespaceSDict *nl, FTextStream &t)
Definition: xmlgen.cpp:1137
int docLine() const
virtual QCString documentation() const
const bool TRUE
Definition: qglobal.h:371
type * find(long k) const
Definition: qintdict.h:63
QTextStream & endl(QTextStream &s)
QCString langToString(SrcLangExt lang)
Definition: util.cpp:8041
static void generateXMLForGroup ( GroupDef gd,
FTextStream ti 
)
static

Definition at line 1644 of file xmlgen.cpp.

1645 {
1646  // + members
1647  // + member groups
1648  // + files
1649  // + classes
1650  // + namespaces
1651  // - packages
1652  // + pages
1653  // + child groups
1654  // - examples
1655  // + brief description
1656  // + detailed description
1657 
1658  if (gd->isReference()) return; // skip external references
1659 
1660  ti << " <compound refid=\"" << gd->getOutputFileBase()
1661  << "\" kind=\"group\"><name>" << convertToXML(gd->name()) << "</name>" << endl;
1662 
1663  QCString outputDirectory = Config_getString("XML_OUTPUT");
1664  QCString fileName=outputDirectory+"/"+gd->getOutputFileBase()+".xml";
1665  QFile f(fileName);
1666  if (!f.open(IO_WriteOnly))
1667  {
1668  err("Cannot open file %s for writing!\n",fileName.data());
1669  return;
1670  }
1671 
1672  FTextStream t(&f);
1673  //t.setEncoding(FTextStream::UnicodeUTF8);
1674  writeXMLHeader(t);
1675  t << " <compounddef id=\""
1676  << gd->getOutputFileBase() << "\" kind=\"group\">" << endl;
1677  t << " <compoundname>" << convertToXML(gd->name()) << "</compoundname>" << endl;
1678  t << " <title>" << convertToXML(gd->groupTitle()) << "</title>" << endl;
1679 
1680  writeInnerFiles(gd->getFiles(),t);
1683  writeInnerPages(gd->getPages(),t);
1685 
1686  if (gd->getMemberGroupSDict())
1687  {
1689  MemberGroup *mg;
1690  for (;(mg=mgli.current());++mgli)
1691  {
1692  generateXMLSection(gd,ti,t,mg->members(),"user-defined",mg->header(),
1693  mg->documentation());
1694  }
1695  }
1696 
1698  MemberList *ml;
1699  for (mli.toFirst();(ml=mli.current());++mli)
1700  {
1701  if ((ml->listType()&MemberListType_declarationLists)!=0)
1702  {
1703  generateXMLSection(gd,ti,t,ml,g_xmlSectionMapper.find(ml->listType()));
1704  }
1705  }
1706 
1707  t << " <briefdescription>" << endl;
1708  writeXMLDocBlock(t,gd->briefFile(),gd->briefLine(),gd,0,gd->briefDescription());
1709  t << " </briefdescription>" << endl;
1710  t << " <detaileddescription>" << endl;
1711  writeXMLDocBlock(t,gd->docFile(),gd->docLine(),gd,0,gd->documentation());
1712  t << " </detaileddescription>" << endl;
1713  t << " </compounddef>" << endl;
1714  t << "</doxygen>" << endl;
1715 
1716  ti << " </compound>" << endl;
1717 }
static void writeXMLHeader(FTextStream &t)
Definition: xmlgen.cpp:146
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString docFile() const
static void writeInnerPages(const PageSDict *pl, FTextStream &t)
Definition: xmlgen.cpp:1168
MemberGroupSDict * getMemberGroupSDict() const
Definition: groupdef.h:98
#define IO_WriteOnly
Definition: qiodevice.h:62
static XmlSectionMapper g_xmlSectionMapper
Definition: xmlgen.cpp:106
friend class Iterator
Definition: sortdict.h:598
static void generateXMLSection(Definition *d, FTextStream &ti, FTextStream &t, MemberList *ml, const char *kind, const char *header=0, const char *documentation=0)
Definition: xmlgen.cpp:1022
int briefLine() const
virtual bool isReference() const
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
const char * groupTitle() const
Definition: groupdef.h:54
static constexpr double mg
Definition: Units.h:145
static void writeInnerFiles(const FileList *fl, FTextStream &t)
Definition: xmlgen.cpp:1154
static void writeXMLDocBlock(FTextStream &t, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
Definition: xmlgen.cpp:423
ClassSDict * getClasses() const
Definition: groupdef.h:101
GroupList * getSubGroups() const
Definition: groupdef.h:103
static void writeInnerGroups(const GroupList *gl, FTextStream &t)
Definition: xmlgen.cpp:1186
const QCString & name() const
Definition: definition.h:114
PageSDict * getPages() const
Definition: groupdef.h:104
static void writeInnerClasses(const ClassSDict *cl, FTextStream &t)
Definition: xmlgen.cpp:1112
fileName
Definition: dumpTree.py:9
NamespaceSDict * getNamespaces() const
Definition: groupdef.h:102
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
QCString briefFile() const
void err(const char *fmt,...)
Definition: message.cpp:226
virtual QCString briefDescription(bool abbreviate=FALSE) const
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
FileList * getFiles() const
Definition: groupdef.h:100
static void writeInnerNamespaces(const NamespaceSDict *nl, FTextStream &t)
Definition: xmlgen.cpp:1137
int docLine() const
QCString getOutputFileBase() const
Definition: groupdef.cpp:1512
virtual QCString documentation() const
const QList< MemberList > & getMemberLists() const
Definition: groupdef.h:95
type * find(long k) const
Definition: qintdict.h:63
QTextStream & endl(QTextStream &s)
static void generateXMLForMember ( MemberDef md,
FTextStream ti,
FTextStream t,
Definition def 
)
static

Definition at line 526 of file xmlgen.cpp.

527 {
528 
529  // + declaration/definition arg lists
530  // + reimplements
531  // + reimplementedBy
532  // + exceptions
533  // + const/volatile specifiers
534  // - examples
535  // + source definition
536  // + source references
537  // + source referenced by
538  // - body code
539  // + template arguments
540  // (templateArguments(), definitionTemplateParameterLists())
541  // - call graph
542 
543  // enum values are written as part of the enum
544  if (md->memberType()==MemberType_EnumValue) return;
545  if (md->isHidden()) return;
546  //if (md->name().at(0)=='@') return; // anonymous member
547 
548  // group members are only visible in their group
549  //if (def->definitionType()!=Definition::TypeGroup && md->getGroupDef()) return;
550 
551  QCString memType;
552  bool isFunc=FALSE;
553  switch (md->memberType())
554  {
555  case MemberType_Define: memType="define"; break;
556  case MemberType_Function: memType="function"; isFunc=TRUE; break;
557  case MemberType_Variable: memType="variable"; break;
558  case MemberType_Typedef: memType="typedef"; break;
559  case MemberType_Enumeration: memType="enum"; break;
560  case MemberType_EnumValue: ASSERT(0); break;
561  case MemberType_Signal: memType="signal"; isFunc=TRUE; break;
562  case MemberType_Slot: memType="slot"; isFunc=TRUE; break;
563  case MemberType_Friend: memType="friend"; isFunc=TRUE; break;
564  case MemberType_DCOP: memType="dcop"; isFunc=TRUE; break;
565  case MemberType_Property: memType="property"; break;
566  case MemberType_Event: memType="event"; break;
567  case MemberType_Interface: memType="interface"; break;
568  case MemberType_Service: memType="service"; break;
569  }
570 
571  ti << " <member refid=\"" << memberOutputFileBase(md)
572  << "_1" << md->anchor() << "\" kind=\"" << memType << "\"><name>"
573  << convertToXML(md->name()) << "</name></member>" << endl;
574 
575  QCString scopeName;
576  if (md->getClassDef())
577  scopeName=md->getClassDef()->name();
578  else if (md->getNamespaceDef())
579  scopeName=md->getNamespaceDef()->name();
580 
581  t << " <memberdef kind=\"";
582  //enum { define_t,variable_t,typedef_t,enum_t,function_t } xmlType = function_t;
583  t << memType << "\" id=\"";
584  if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
585  {
586  t << md->getGroupDef()->getOutputFileBase();
587  }
588  else
589  {
590  t << memberOutputFileBase(md);
591  }
592  t << "_1" // encoded `:' character (see util.cpp:convertNameToFile)
593  << md->anchor();
594  t << "\" prot=\"";
595  switch(md->protection())
596  {
597  case Public: t << "public"; break;
598  case Protected: t << "protected"; break;
599  case Private: t << "private"; break;
600  case Package: t << "package"; break;
601  }
602  t << "\"";
603 
604  t << " static=\"";
605  if (md->isStatic()) t << "yes"; else t << "no";
606  t << "\"";
607 
608  if (isFunc)
609  {
610  ArgumentList *al = md->argumentList();
611  t << " const=\"";
612  if (al!=0 && al->constSpecifier) t << "yes"; else t << "no";
613  t << "\"";
614 
615  t << " explicit=\"";
616  if (md->isExplicit()) t << "yes"; else t << "no";
617  t << "\"";
618 
619  t << " inline=\"";
620  if (md->isInline()) t << "yes"; else t << "no";
621  t << "\"";
622 
623  if (md->isFinal())
624  {
625  t << " final=\"yes\"";
626  }
627 
628  if (md->isSealed())
629  {
630  t << " sealed=\"yes\"";
631  }
632 
633  if (md->isNew())
634  {
635  t << " new=\"yes\"";
636  }
637 
638  if (md->isOptional())
639  {
640  t << " optional=\"yes\"";
641  }
642 
643  if (md->isRequired())
644  {
645  t << " required=\"yes\"";
646  }
647 
648  if (al && al->volatileSpecifier)
649  {
650  t << " volatile=\"yes\"";
651  }
652 
653  t << " virt=\"";
654  switch (md->virtualness())
655  {
656  case Normal: t << "non-virtual"; break;
657  case Virtual: t << "virtual"; break;
658  case Pure: t << "pure-virtual"; break;
659  default: ASSERT(0);
660  }
661  t << "\"";
662  }
663 
664  if (md->memberType() == MemberType_Variable)
665  {
666  //ArgumentList *al = md->argumentList();
667  //t << " volatile=\"";
668  //if (al && al->volatileSpecifier) t << "yes"; else t << "no";
669 
670  t << " mutable=\"";
671  if (md->isMutable()) t << "yes"; else t << "no";
672  t << "\"";
673 
674  if (md->isInitonly())
675  {
676  t << " initonly=\"yes\"";
677  }
678  if (md->isAttribute())
679  {
680  t << " attribute=\"yes\"";
681  }
682  if (md->isUNOProperty())
683  {
684  t << " property=\"yes\"";
685  }
686  if (md->isReadonly())
687  {
688  t << " readonly=\"yes\"";
689  }
690  if (md->isBound())
691  {
692  t << " bound=\"yes\"";
693  }
694  if (md->isRemovable())
695  {
696  t << " removable=\"yes\"";
697  }
698  if (md->isConstrained())
699  {
700  t << " constrained=\"yes\"";
701  }
702  if (md->isTransient())
703  {
704  t << " transient=\"yes\"";
705  }
706  if (md->isMaybeVoid())
707  {
708  t << " maybevoid=\"yes\"";
709  }
710  if (md->isMaybeDefault())
711  {
712  t << " maybedefault=\"yes\"";
713  }
714  if (md->isMaybeAmbiguous())
715  {
716  t << " maybeambiguous=\"yes\"";
717  }
718  }
719  else if (md->memberType() == MemberType_Property)
720  {
721  t << " readable=\"";
722  if (md->isReadable()) t << "yes"; else t << "no";
723  t << "\"";
724 
725  t << " writable=\"";
726  if (md->isWritable()) t << "yes"; else t << "no";
727  t << "\"";
728 
729  t << " gettable=\"";
730  if (md->isGettable()) t << "yes"; else t << "no";
731  t << "\"";
732 
733  t << " privategettable=\"";
734  if (md->isPrivateGettable()) t << "yes"; else t << "no";
735  t << "\"";
736 
737  t << " protectedgettable=\"";
738  if (md->isProtectedGettable()) t << "yes"; else t << "no";
739  t << "\"";
740 
741  t << " settable=\"";
742  if (md->isSettable()) t << "yes"; else t << "no";
743  t << "\"";
744 
745  t << " privatesettable=\"";
746  if (md->isPrivateSettable()) t << "yes"; else t << "no";
747  t << "\"";
748 
749  t << " protectedsettable=\"";
750  if (md->isProtectedSettable()) t << "yes"; else t << "no";
751  t << "\"";
752 
753  if (md->isAssign() || md->isCopy() || md->isRetain() || md->isStrong() || md->isWeak())
754  {
755  t << " accessor=\"";
756  if (md->isAssign()) t << "assign";
757  else if (md->isCopy()) t << "copy";
758  else if (md->isRetain()) t << "retain";
759  else if (md->isStrong()) t << "strong";
760  else if (md->isWeak()) t << "weak";
761  t << "\"";
762  }
763  }
764  else if (md->memberType() == MemberType_Event)
765  {
766  t << " add=\"";
767  if (md->isAddable()) t << "yes"; else t << "no";
768  t << "\"";
769 
770  t << " remove=\"";
771  if (md->isRemovable()) t << "yes"; else t << "no";
772  t << "\"";
773 
774  t << " raise=\"";
775  if (md->isRaisable()) t << "yes"; else t << "no";
776  t << "\"";
777  }
778 
779  t << ">" << endl;
780 
781  if (md->memberType()!=MemberType_Define &&
783  )
784  {
785  if (md->memberType()!=MemberType_Typedef)
786  {
788  }
789  QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
790  stripQualifiers(typeStr);
791  t << " <type>";
792  linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,typeStr);
793  t << "</type>" << endl;
794  t << " <definition>" << convertToXML(md->definition()) << "</definition>" << endl;
795  t << " <argsstring>" << convertToXML(md->argsString()) << "</argsstring>" << endl;
796  }
797 
798  t << " <name>" << convertToXML(md->name()) << "</name>" << endl;
799 
800  if (md->memberType() == MemberType_Property)
801  {
802  if (md->isReadable())
803  t << " <read>" << convertToXML(md->getReadAccessor()) << "</read>" << endl;
804  if (md->isWritable())
805  t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>" << endl;
806  }
807  if (md->memberType()==MemberType_Variable && md->bitfieldString())
808  {
809  QCString bitfield = md->bitfieldString();
810  if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
811  t << " <bitfield>" << bitfield << "</bitfield>" << endl;
812  }
813 
814  MemberDef *rmd = md->reimplements();
815  if (rmd)
816  {
817  t << " <reimplements refid=\""
818  << memberOutputFileBase(rmd) << "_1" << rmd->anchor() << "\">"
819  << convertToXML(rmd->name()) << "</reimplements>" << endl;
820  }
821  MemberList *rbml = md->reimplementedBy();
822  if (rbml)
823  {
824  MemberListIterator mli(*rbml);
825  for (mli.toFirst();(rmd=mli.current());++mli)
826  {
827  t << " <reimplementedby refid=\""
828  << memberOutputFileBase(rmd) << "_1" << rmd->anchor() << "\">"
829  << convertToXML(rmd->name()) << "</reimplementedby>" << endl;
830  }
831  }
832 
833  if (isFunc) //function
834  {
835  ArgumentList *declAl = md->declArgumentList();
836  ArgumentList *defAl = md->argumentList();
837  if (declAl && declAl->count()>0)
838  {
839  ArgumentListIterator declAli(*declAl);
840  ArgumentListIterator defAli(*defAl);
841  Argument *a;
842  for (declAli.toFirst();(a=declAli.current());++declAli)
843  {
844  Argument *defArg = defAli.current();
845  t << " <param>" << endl;
846  if (!a->attrib.isEmpty())
847  {
848  t << " <attributes>";
849  writeXMLString(t,a->attrib);
850  t << "</attributes>" << endl;
851  }
852  if (!a->type.isEmpty())
853  {
854  t << " <type>";
856  t << "</type>" << endl;
857  }
858  if (!a->name.isEmpty())
859  {
860  t << " <declname>";
861  writeXMLString(t,a->name);
862  t << "</declname>" << endl;
863  }
864  if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
865  {
866  t << " <defname>";
867  writeXMLString(t,defArg->name);
868  t << "</defname>" << endl;
869  }
870  if (!a->array.isEmpty())
871  {
872  t << " <array>";
873  writeXMLString(t,a->array);
874  t << "</array>" << endl;
875  }
876  if (!a->defval.isEmpty())
877  {
878  t << " <defval>";
880  t << "</defval>" << endl;
881  }
882  if (defArg && defArg->hasDocumentation())
883  {
884  t << " <briefdescription>";
886  md->getOuterScope(),md,defArg->docs);
887  t << "</briefdescription>" << endl;
888  }
889  t << " </param>" << endl;
890  if (defArg) ++defAli;
891  }
892  }
893  }
894  else if (md->memberType()==MemberType_Define &&
895  md->argsString()) // define
896  {
897  if (md->argumentList()->count()==0) // special case for "foo()" to
898  // disguish it from "foo".
899  {
900  t << " <param></param>" << endl;
901  }
902  else
903  {
905  Argument *a;
906  for (ali.toFirst();(a=ali.current());++ali)
907  {
908  t << " <param><defname>" << a->type << "</defname></param>" << endl;
909  }
910  }
911  }
912 
914  {
915  t << " <initializer>";
917  t << "</initializer>" << endl;
918  }
919 
920  if (md->excpString())
921  {
922  t << " <exceptions>";
924  t << "</exceptions>" << endl;
925  }
926 
927  if (md->memberType()==MemberType_Enumeration) // enum
928  {
929  MemberList *enumFields = md->enumFieldList();
930  if (enumFields)
931  {
932  MemberListIterator emli(*enumFields);
933  MemberDef *emd;
934  for (emli.toFirst();(emd=emli.current());++emli)
935  {
936  ti << " <member refid=\"" << memberOutputFileBase(emd)
937  << "_1" << emd->anchor() << "\" kind=\"enumvalue\"><name>"
938  << convertToXML(emd->name()) << "</name></member>" << endl;
939 
940  t << " <enumvalue id=\"" << memberOutputFileBase(emd) << "_1"
941  << emd->anchor() << "\" prot=\"";
942  switch (emd->protection())
943  {
944  case Public: t << "public"; break;
945  case Protected: t << "protected"; break;
946  case Private: t << "private"; break;
947  case Package: t << "package"; break;
948  }
949  t << "\">" << endl;
950  t << " <name>";
951  writeXMLString(t,emd->name());
952  t << "</name>" << endl;
953  if (!emd->initializer().isEmpty())
954  {
955  t << " <initializer>";
956  writeXMLString(t,emd->initializer());
957  t << "</initializer>" << endl;
958  }
959  t << " <briefdescription>" << endl;
960  writeXMLDocBlock(t,emd->briefFile(),emd->briefLine(),emd->getOuterScope(),emd,emd->briefDescription());
961  t << " </briefdescription>" << endl;
962  t << " <detaileddescription>" << endl;
963  writeXMLDocBlock(t,emd->docFile(),emd->docLine(),emd->getOuterScope(),emd,emd->documentation());
964  t << " </detaileddescription>" << endl;
965  t << " </enumvalue>" << endl;
966  }
967  }
968  }
969  t << " <briefdescription>" << endl;
971  t << " </briefdescription>" << endl;
972  t << " <detaileddescription>" << endl;
973  writeXMLDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation());
974  t << " </detaileddescription>" << endl;
975  t << " <inbodydescription>" << endl;
977  t << " </inbodydescription>" << endl;
978  if (md->getDefLine()!=-1)
979  {
980  t << " <location file=\""
981  << stripFromPath(md->getDefFileName()) << "\" line=\""
982  << md->getDefLine() << "\"" << " column=\""
983  << md->getDefColumn() << "\"" ;
984  if (md->getStartBodyLine()!=-1)
985  {
986  FileDef *bodyDef = md->getBodyDef();
987  if (bodyDef)
988  {
989  t << " bodyfile=\"" << stripFromPath(bodyDef->absFilePath()) << "\"";
990  }
991  t << " bodystart=\"" << md->getStartBodyLine() << "\" bodyend=\""
992  << md->getEndBodyLine() << "\"";
993  }
994  t << "/>" << endl;
995  }
996 
997  //printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
998  MemberSDict *mdict = md->getReferencesMembers();
999  if (mdict)
1000  {
1001  MemberSDict::Iterator mdi(*mdict);
1002  MemberDef *rmd;
1003  for (mdi.toFirst();(rmd=mdi.current());++mdi)
1004  {
1005  writeMemberReference(t,def,rmd,"references");
1006  }
1007  }
1008  mdict = md->getReferencedByMembers();
1009  if (mdict)
1010  {
1011  MemberSDict::Iterator mdi(*mdict);
1012  MemberDef *rmd;
1013  for (mdi.toFirst();(rmd=mdi.current());++mdi)
1014  {
1015  writeMemberReference(t,def,rmd,"referencedby");
1016  }
1017  }
1018 
1019  t << " </memberdef>" << endl;
1020 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
bool isFinal() const
Definition: memberdef.cpp:4280
QCString type
Definition: arguments.h:67
bool isMaybeAmbiguous() const
Definition: memberdef.cpp:4422
bool isReadable() const
Definition: memberdef.cpp:4270
bool isAddable() const
Definition: memberdef.cpp:4255
QCString docFile() const
bool isOptional() const
Definition: memberdef.cpp:4310
bool isBound() const
Definition: memberdef.cpp:4397
This class represents an function or template argument list.
Definition: arguments.h:82
bool isMutable() const
Definition: memberdef.cpp:4220
MemberDef * reimplements() const
Definition: memberdef.cpp:878
bool isCopy() const
Definition: memberdef.cpp:4325
bool hasMultiLineInitializer() const
Definition: memberdef.cpp:3460
MemberList * reimplementedBy() const
Definition: memberdef.cpp:883
Definition: types.h:29
bool isWeak() const
Definition: memberdef.cpp:4340
bool isEmpty() const
Definition: qcstring.h:189
bool isUNOProperty() const
Definition: memberdef.cpp:4387
Definition: types.h:29
Protection protection() const
Definition: memberdef.cpp:4120
Definition: types.h:26
QCString inbodyDocumentation() const
QCString defval
Definition: arguments.h:71
const char * bitfieldString() const
Definition: memberdef.cpp:4050
char & at(uint i) const
Definition: qcstring.h:326
FileDef * getBodyDef() const
bool isRequired() const
Definition: memberdef.cpp:4315
const bool FALSE
Definition: qglobal.h:370
Definition: types.h:26
MemberList * enumFieldList() const
Definition: memberdef.cpp:4497
static QCString memberOutputFileBase(MemberDef *md)
Definition: xmlgen.cpp:515
int briefLine() const
static void writeMemberTemplateLists(MemberDef *md, FTextStream &t)
Definition: xmlgen.cpp:409
bool isInline() const
Definition: memberdef.cpp:4210
Definition: types.h:26
static void writeXMLDocBlock(FTextStream &t, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
Definition: xmlgen.cpp:423
Definition: types.h:29
ArgumentList * declArgumentList() const
Definition: memberdef.cpp:4517
MemberSDict * getReferencesMembers() const
QCString getDefFileName() const
bool constSpecifier
Definition: arguments.h:99
int getDefColumn() const
Definition: definition.h:191
static QCString stripFromPath(const QCString &path, QStrList &l)
Definition: util.cpp:274
virtual DefType definitionType() const =0
Specifier virtualness(int count=0) const
Definition: memberdef.cpp:3560
bool isExplicit() const
Definition: memberdef.cpp:4215
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
const char * typeString() const
Definition: memberdef.cpp:4035
uint count() const
Definition: qlist.h:66
MemberSDict * getReferencedByMembers() const
bool isNew() const
Definition: memberdef.cpp:4285
bool volatileSpecifier
Definition: arguments.h:101
const QCString & name() const
Definition: definition.h:114
int getDefLine() const
Definition: definition.h:188
bool isRemovable() const
Definition: memberdef.cpp:4260
static void writeMemberReference(FTextStream &t, Definition *def, MemberDef *rmd, const char *tagName)
Definition: xmlgen.cpp:470
QCString briefDescription(bool abbr=FALSE) const
Definition: memberdef.cpp:5073
const char * getWriteAccessor() const
Definition: memberdef.cpp:4090
const double a
bool isWritable() const
Definition: memberdef.cpp:4275
bool isAssign() const
Definition: memberdef.cpp:4330
bool isSettable() const
Definition: memberdef.cpp:4240
bool isInitonly() const
Definition: memberdef.cpp:4300
bool isConstrained() const
Definition: memberdef.cpp:4402
QCString anchor() const
Definition: memberdef.cpp:1031
bool isGettable() const
Definition: memberdef.cpp:4225
bool isStrong() const
Definition: memberdef.cpp:4345
const char * definition() const
Definition: memberdef.cpp:4025
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
bool isPrivateGettable() const
Definition: memberdef.cpp:4230
QCString briefFile() const
bool isReadonly() const
Definition: memberdef.cpp:4392
MemberType memberType() const
Definition: memberdef.cpp:4125
QCString absFilePath() const
Definition: filedef.h:96
int inbodyLine() const
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
void writeXMLString(FTextStream &t, const char *s)
Definition: xmlgen.cpp:109
bool hasOneLineInitializer() const
Definition: memberdef.cpp:3451
virtual Definition * getOuterScope() const
QCString documentation() const
Definition: memberdef.cpp:5085
bool isMaybeVoid() const
Definition: memberdef.cpp:4412
bool isHidden() const
int getEndBodyLine() const
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
QCString attrib
Definition: arguments.h:66
ArgumentList * argumentList() const
Definition: memberdef.cpp:4512
const char * getReadAccessor() const
Definition: memberdef.cpp:4085
int getStartBodyLine() const
bool isRetain() const
Definition: memberdef.cpp:4335
const QCString & initializer() const
Definition: memberdef.cpp:4055
const char * excpString() const
Definition: memberdef.cpp:4045
QCString name
Definition: arguments.h:69
bool isPrivateSettable() const
Definition: memberdef.cpp:4245
bool isMaybeDefault() const
Definition: memberdef.cpp:4417
NamespaceDef * getNamespaceDef() const
Definition: memberdef.cpp:4080
friend class Iterator
Definition: sortdict.h:289
int docLine() const
const char * argsString() const
Definition: memberdef.cpp:4040
bool isSealed() const
Definition: memberdef.cpp:4290
QCString getOutputFileBase() const
Definition: groupdef.cpp:1512
bool isStatic() const
Definition: memberdef.cpp:4205
void linkifyText(const TextGeneratorIntf &out, Definition *scope, FileDef *fileScope, Definition *self, const char *text, bool autoBreak, bool external, bool keepSpaces, int indentLevel)
Definition: util.cpp:1916
bool isRaisable() const
Definition: memberdef.cpp:4265
static void stripQualifiers(QCString &typeStr)
Definition: xmlgen.cpp:493
bool hasDocumentation() const
Definition: arguments.h:61
const bool TRUE
Definition: qglobal.h:371
bool isTransient() const
Definition: memberdef.cpp:4407
bool isProtectedSettable() const
Definition: memberdef.cpp:4250
QTextStream & endl(QTextStream &s)
bool isAttribute() const
Definition: memberdef.cpp:4382
QCString array
Definition: arguments.h:70
#define ASSERT(x)
Definition: qglobal.h:590
QCString docs
Definition: arguments.h:72
bool isProtectedGettable() const
Definition: memberdef.cpp:4235
static void generateXMLForNamespace ( NamespaceDef nd,
FTextStream ti 
)
static

Definition at line 1428 of file xmlgen.cpp.

1429 {
1430  // + contained class definitions
1431  // + contained namespace definitions
1432  // + member groups
1433  // + normal members
1434  // + brief desc
1435  // + detailed desc
1436  // + location
1437  // - files containing (parts of) the namespace definition
1438 
1439  if (nd->isReference() || nd->isHidden()) return; // skip external references
1440 
1441  ti << " <compound refid=\"" << nd->getOutputFileBase()
1442  << "\" kind=\"namespace\"" << "><name>"
1443  << convertToXML(nd->name()) << "</name>" << endl;
1444 
1445  QCString outputDirectory = Config_getString("XML_OUTPUT");
1446  QCString fileName=outputDirectory+"/"+nd->getOutputFileBase()+".xml";
1447  QFile f(fileName);
1448  if (!f.open(IO_WriteOnly))
1449  {
1450  err("Cannot open file %s for writing!\n",fileName.data());
1451  return;
1452  }
1453  FTextStream t(&f);
1454  //t.setEncoding(FTextStream::UnicodeUTF8);
1455 
1456  writeXMLHeader(t);
1457  t << " <compounddef id=\"" << nd->getOutputFileBase()
1458  << "\" kind=\"namespace\" language=\""
1459  << langToString(nd->getLanguage()) << "\">" << endl;
1460  t << " <compoundname>";
1461  writeXMLString(t,nd->name());
1462  t << "</compoundname>" << endl;
1463 
1466 
1467  if (nd->getMemberGroupSDict())
1468  {
1470  MemberGroup *mg;
1471  for (;(mg=mgli.current());++mgli)
1472  {
1473  generateXMLSection(nd,ti,t,mg->members(),"user-defined",mg->header(),
1474  mg->documentation());
1475  }
1476  }
1477 
1479  MemberList *ml;
1480  for (mli.toFirst();(ml=mli.current());++mli)
1481  {
1482  if ((ml->listType()&MemberListType_declarationLists)!=0)
1483  {
1484  generateXMLSection(nd,ti,t,ml,g_xmlSectionMapper.find(ml->listType()));
1485  }
1486  }
1487 
1488  t << " <briefdescription>" << endl;
1489  writeXMLDocBlock(t,nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription());
1490  t << " </briefdescription>" << endl;
1491  t << " <detaileddescription>" << endl;
1492  writeXMLDocBlock(t,nd->docFile(),nd->docLine(),nd,0,nd->documentation());
1493  t << " </detaileddescription>" << endl;
1494  t << " <location file=\""
1495  << stripFromPath(nd->getDefFileName()) << "\" line=\""
1496  << nd->getDefLine() << "\"" << " column=\""
1497  << nd->getDefColumn() << "\"/>" << endl ;
1498  t << " </compounddef>" << endl;
1499  t << "</doxygen>" << endl;
1500 
1501  ti << " </compound>" << endl;
1502 }
static void writeXMLHeader(FTextStream &t)
Definition: xmlgen.cpp:146
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString docFile() const
#define IO_WriteOnly
Definition: qiodevice.h:62
QCString getOutputFileBase() const
static XmlSectionMapper g_xmlSectionMapper
Definition: xmlgen.cpp:106
friend class Iterator
Definition: sortdict.h:598
const QList< MemberList > & getMemberLists() const
Definition: namespacedef.h:91
static void generateXMLSection(Definition *d, FTextStream &ti, FTextStream &t, MemberList *ml, const char *kind, const char *header=0, const char *documentation=0)
Definition: xmlgen.cpp:1022
int briefLine() const
virtual bool isReference() const
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
static constexpr double mg
Definition: Units.h:145
static void writeXMLDocBlock(FTextStream &t, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
Definition: xmlgen.cpp:423
QCString getDefFileName() const
int getDefColumn() const
Definition: definition.h:191
static QCString stripFromPath(const QCString &path, QStrList &l)
Definition: util.cpp:274
const QCString & name() const
Definition: definition.h:114
int getDefLine() const
Definition: definition.h:188
static void writeInnerClasses(const ClassSDict *cl, FTextStream &t)
Definition: xmlgen.cpp:1112
fileName
Definition: dumpTree.py:9
SrcLangExt getLanguage() const
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
QCString briefFile() const
void err(const char *fmt,...)
Definition: message.cpp:226
virtual QCString briefDescription(bool abbreviate=FALSE) const
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
NamespaceSDict * getNamespaceSDict() const
Definition: namespacedef.h:101
void writeXMLString(FTextStream &t, const char *s)
Definition: xmlgen.cpp:109
bool isHidden() const
MemberGroupSDict * getMemberGroupSDict() const
Definition: namespacedef.h:95
static void writeInnerNamespaces(const NamespaceSDict *nl, FTextStream &t)
Definition: xmlgen.cpp:1137
ClassSDict * getClassSDict() const
Definition: namespacedef.h:98
int docLine() const
virtual QCString documentation() const
type * find(long k) const
Definition: qintdict.h:63
QTextStream & endl(QTextStream &s)
QCString langToString(SrcLangExt lang)
Definition: util.cpp:8041
static void generateXMLForPage ( PageDef pd,
FTextStream ti,
bool  isExample 
)
static

Definition at line 1758 of file xmlgen.cpp.

1759 {
1760  // + name
1761  // + title
1762  // + documentation
1763 
1764  const char *kindName = isExample ? "example" : "page";
1765 
1766  if (pd->isReference()) return;
1767 
1768  QCString pageName = pd->getOutputFileBase();
1769  if (pd->getGroupDef())
1770  {
1771  pageName+=(QCString)"_"+pd->name();
1772  }
1773  if (pageName=="index") pageName="indexpage"; // to prevent overwriting the generated index page.
1774 
1775  ti << " <compound refid=\"" << pageName
1776  << "\" kind=\"" << kindName << "\"><name>" << convertToXML(pd->name())
1777  << "</name>" << endl;
1778 
1779  QCString outputDirectory = Config_getString("XML_OUTPUT");
1780  QCString fileName=outputDirectory+"/"+pageName+".xml";
1781  QFile f(fileName);
1782  if (!f.open(IO_WriteOnly))
1783  {
1784  err("Cannot open file %s for writing!\n",fileName.data());
1785  return;
1786  }
1787 
1788  FTextStream t(&f);
1789  //t.setEncoding(FTextStream::UnicodeUTF8);
1790  writeXMLHeader(t);
1791  t << " <compounddef id=\"" << pageName;
1792  t << "\" kind=\"" << kindName << "\">" << endl;
1793  t << " <compoundname>" << convertToXML(pd->name())
1794  << "</compoundname>" << endl;
1795 
1796  if (pd==Doxygen::mainPage) // main page is special
1797  {
1798  QCString title;
1799  if (!pd->title().isEmpty() && pd->title().lower()!="notitle")
1800  {
1802  }
1803  else
1804  {
1805  title = Config_getString("PROJECT_NAME");
1806  }
1807  t << " <title>" << convertToXML(convertCharEntitiesToUTF8(title))
1808  << "</title>" << endl;
1809  }
1810  else
1811  {
1812  SectionInfo *si = Doxygen::sectionDict->find(pd->name());
1813  if (si)
1814  {
1815  t << " <title>" << convertToXML(convertCharEntitiesToUTF8(filterTitle(si->title)))
1816  << "</title>" << endl;
1817  }
1818  }
1819  writeInnerPages(pd->getSubPages(),t);
1820  t << " <detaileddescription>" << endl;
1821  if (isExample)
1822  {
1823  writeXMLDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
1824  pd->documentation()+"\n\\include "+pd->name());
1825  }
1826  else
1827  {
1828  writeXMLDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
1829  pd->documentation());
1830  }
1831  t << " </detaileddescription>" << endl;
1832 
1833  t << " </compounddef>" << endl;
1834  t << "</doxygen>" << endl;
1835 
1836  ti << " </compound>" << endl;
1837 }
static void writeXMLHeader(FTextStream &t)
Definition: xmlgen.cpp:146
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString docFile() const
PageSDict * getSubPages() const
Definition: pagedef.h:56
static void writeInnerPages(const PageSDict *pl, FTextStream &t)
Definition: xmlgen.cpp:1168
bool isEmpty() const
Definition: qcstring.h:189
QCString title() const
Definition: pagedef.h:54
QCString convertCharEntitiesToUTF8(const QCString &s)
Definition: util.cpp:5822
#define IO_WriteOnly
Definition: qiodevice.h:62
virtual bool isReference() const
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
static void writeXMLDocBlock(FTextStream &t, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
Definition: xmlgen.cpp:423
const QCString & name() const
Definition: definition.h:114
fileName
Definition: dumpTree.py:9
static SectionDict * sectionDict
Definition: doxygen.h:117
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
QCString title
Definition: section.h:57
void err(const char *fmt,...)
Definition: message.cpp:226
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
int docLine() const
QCString lower() const
Definition: qcstring.cpp:263
T * find(const char *key)
Definition: sortdict.h:232
virtual QCString documentation() const
QCString getOutputFileBase() const
Definition: pagedef.cpp:58
static PageDef * mainPage
Definition: doxygen.h:103
QTextStream & endl(QTextStream &s)
GroupDef * getGroupDef() const
Definition: pagedef.cpp:52
QCString filterTitle(const QCString &title)
Definition: util.cpp:7765
static void generateXMLSection ( Definition d,
FTextStream ti,
FTextStream t,
MemberList ml,
const char *  kind,
const char *  header = 0,
const char *  documentation = 0 
)
static

Definition at line 1022 of file xmlgen.cpp.

1025 {
1026  if (ml==0) return;
1027  MemberListIterator mli(*ml);
1028  MemberDef *md;
1029  int count=0;
1030  for (mli.toFirst();(md=mli.current());++mli)
1031  {
1032  // namespace members are also inserted in the file scope, but
1033  // to prevent this duplication in the XML output, we filter those here.
1034  if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
1035  {
1036  count++;
1037  }
1038  }
1039  if (count==0) return; // empty list
1040 
1041  t << " <sectiondef kind=\"" << kind << "\">" << endl;
1042  if (header)
1043  {
1044  t << " <header>" << convertToXML(header) << "</header>" << endl;
1045  }
1046  if (documentation)
1047  {
1048  t << " <description>";
1049  writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
1050  t << "</description>" << endl;
1051  }
1052  for (mli.toFirst();(md=mli.current());++mli)
1053  {
1054  // namespace members are also inserted in the file scope, but
1055  // to prevent this duplication in the XML output, we filter those here.
1056  if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
1057  {
1058  generateXMLForMember(md,ti,t,d);
1059  }
1060  }
1061  t << " </sectiondef>" << endl;
1062 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString docFile() const
static void writeXMLDocBlock(FTextStream &t, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
Definition: xmlgen.cpp:423
virtual DefType definitionType() const =0
static void generateXMLForMember(MemberDef *md, FTextStream &ti, FTextStream &t, Definition *def)
Definition: xmlgen.cpp:526
NamespaceDef * getNamespaceDef() const
Definition: memberdef.cpp:4080
int docLine() const
QTextStream & endl(QTextStream &s)
static QCString memberOutputFileBase ( MemberDef md)
static

Definition at line 515 of file xmlgen.cpp.

516 {
517  //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
518  //if (inlineGroupedClasses && md->getClassDef() && md->getClassDef()->partOfGroups()!=0)
519  // return md->getClassDef()->getXmlOutputFileBase();
520  //else
521  // return md->getOutputFileBase();
522  return md->getOutputFileBase();
523 }
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
static void stripQualifiers ( QCString typeStr)
static

Definition at line 493 of file xmlgen.cpp.

494 {
495  bool done=FALSE;
496  while (!done)
497  {
498  if (typeStr.stripPrefix("static "));
499  else if (typeStr.stripPrefix("virtual "));
500  else if (typeStr.stripPrefix("volatile "));
501  else if (typeStr=="virtual") typeStr="";
502  else done=TRUE;
503  }
504 }
const bool FALSE
Definition: qglobal.h:370
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
const bool TRUE
Definition: qglobal.h:371
static void writeCombineScript ( )
static

Definition at line 154 of file xmlgen.cpp.

155 {
156  QCString outputDirectory = Config_getString("XML_OUTPUT");
157  QCString fileName=outputDirectory+"/combine.xslt";
158  QFile f(fileName);
159  if (!f.open(IO_WriteOnly))
160  {
161  err("Cannot open file %s for writing!\n",fileName.data());
162  return;
163  }
164  FTextStream t(&f);
165  //t.setEncoding(FTextStream::UnicodeUTF8);
166 
167  t <<
168  "<!-- XSLT script to combine the generated output into a single file. \n"
169  " If you have xsltproc you could use:\n"
170  " xsltproc combine.xslt index.xml >all.xml\n"
171  "-->\n"
172  "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n"
173  " <xsl:output method=\"xml\" version=\"1.0\" indent=\"no\" standalone=\"yes\" />\n"
174  " <xsl:template match=\"/\">\n"
175  " <doxygen version=\"{doxygenindex/@version}\">\n"
176  " <!-- Load all doxgen generated xml files -->\n"
177  " <xsl:for-each select=\"doxygenindex/compound\">\n"
178  " <xsl:copy-of select=\"document( concat( @refid, '.xml' ) )/doxygen/*\" />\n"
179  " </xsl:for-each>\n"
180  " </doxygen>\n"
181  " </xsl:template>\n"
182  "</xsl:stylesheet>\n";
183 
184 }
#define IO_WriteOnly
Definition: qiodevice.h:62
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
fileName
Definition: dumpTree.py:9
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
void err(const char *fmt,...)
Definition: message.cpp:226
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
static void writeInnerClasses ( const ClassSDict cl,
FTextStream t 
)
static

Definition at line 1112 of file xmlgen.cpp.

1113 {
1114  if (cl)
1115  {
1117  ClassDef *cd;
1118  for (cli.toFirst();(cd=cli.current());++cli)
1119  {
1120  if (!cd->isHidden() && cd->name().find('@')==-1) // skip anonymous scopes
1121  {
1122  t << " <innerclass refid=\"" << classOutputFileBase(cd)
1123  << "\" prot=\"";
1124  switch(cd->protection())
1125  {
1126  case Public: t << "public"; break;
1127  case Protected: t << "protected"; break;
1128  case Private: t << "private"; break;
1129  case Package: t << "package"; break;
1130  }
1131  t << "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
1132  }
1133  }
1134  }
1135 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
Definition: types.h:26
Definition: types.h:26
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
Definition: types.h:26
Protection protection() const
Definition: classdef.cpp:4414
def cli(ctx)
Definition: main.py:7
const QCString & name() const
Definition: definition.h:114
bool isHidden() const
static QCString classOutputFileBase(ClassDef *cd)
Definition: xmlgen.cpp:506
friend class Iterator
Definition: sortdict.h:289
QTextStream & endl(QTextStream &s)
static void writeInnerDirs ( const DirList dl,
FTextStream t 
)
static

Definition at line 1201 of file xmlgen.cpp.

1202 {
1203  if (dl)
1204  {
1206  DirDef *subdir;
1207  for (subdirs.toFirst();(subdir=subdirs.current());++subdirs)
1208  {
1209  t << " <innerdir refid=\"" << subdir->getOutputFileBase()
1210  << "\">" << convertToXML(subdir->displayName()) << "</innerdir>" << endl;
1211  }
1212  }
1213 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
list subdirs
Definition: train_cnn.py:134
QCString displayName(bool=TRUE) const
Definition: dirdef.h:56
Definition: dirdef.h:44
QCString getOutputFileBase() const
Definition: dirdef.cpp:113
QTextStream & endl(QTextStream &s)
static void writeInnerFiles ( const FileList fl,
FTextStream t 
)
static

Definition at line 1154 of file xmlgen.cpp.

1155 {
1156  if (fl)
1157  {
1158  QListIterator<FileDef> fli(*fl);
1159  FileDef *fd;
1160  for (fli.toFirst();(fd=fli.current());++fli)
1161  {
1162  t << " <innerfile refid=\"" << fd->getOutputFileBase()
1163  << "\">" << convertToXML(fd->name()) << "</innerfile>" << endl;
1164  }
1165  }
1166 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString name() const
Definition: filedef.cpp:1193
QCString getOutputFileBase() const
Definition: filedef.h:83
QTextStream & endl(QTextStream &s)
static void writeInnerGroups ( const GroupList gl,
FTextStream t 
)
static

Definition at line 1186 of file xmlgen.cpp.

1187 {
1188  if (gl)
1189  {
1190  GroupListIterator gli(*gl);
1191  GroupDef *sgd;
1192  for (gli.toFirst();(sgd=gli.current());++gli)
1193  {
1194  t << " <innergroup refid=\"" << sgd->getOutputFileBase()
1195  << "\">" << convertToXML(sgd->groupTitle())
1196  << "</innergroup>" << endl;
1197  }
1198  }
1199 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
const char * groupTitle() const
Definition: groupdef.h:54
QCString getOutputFileBase() const
Definition: groupdef.cpp:1512
QTextStream & endl(QTextStream &s)
static void writeInnerNamespaces ( const NamespaceSDict nl,
FTextStream t 
)
static

Definition at line 1137 of file xmlgen.cpp.

1138 {
1139  if (nl)
1140  {
1141  NamespaceSDict::Iterator nli(*nl);
1142  NamespaceDef *nd;
1143  for (nli.toFirst();(nd=nli.current());++nli)
1144  {
1145  if (!nd->isHidden() && nd->name().find('@')==-1) // skip anonymouse scopes
1146  {
1147  t << " <innernamespace refid=\"" << nd->getOutputFileBase()
1148  << "\">" << convertToXML(nd->name()) << "</innernamespace>" << endl;
1149  }
1150  }
1151  }
1152 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString getOutputFileBase() const
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
const QCString & name() const
Definition: definition.h:114
bool isHidden() const
friend class Iterator
Definition: sortdict.h:289
QTextStream & endl(QTextStream &s)
static void writeInnerPages ( const PageSDict pl,
FTextStream t 
)
static

Definition at line 1168 of file xmlgen.cpp.

1169 {
1170  if (pl)
1171  {
1172  PageSDict::Iterator pli(*pl);
1173  PageDef *pd;
1174  for (pli.toFirst();(pd=pli.current());++pli)
1175  {
1176  t << " <innerpage refid=\"" << pd->getOutputFileBase();
1177  if (pd->getGroupDef())
1178  {
1179  t << "_" << pd->name();
1180  }
1181  t << "\">" << convertToXML(pd->title()) << "</innerpage>" << endl;
1182  }
1183  }
1184 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
QCString title() const
Definition: pagedef.h:54
const QCString & name() const
Definition: definition.h:114
A model of a page symbol.
Definition: pagedef.h:29
friend class Iterator
Definition: sortdict.h:289
QCString getOutputFileBase() const
Definition: pagedef.cpp:58
QTextStream & endl(QTextStream &s)
GroupDef * getGroupDef() const
Definition: pagedef.cpp:52
static void writeListOfAllMembers ( ClassDef cd,
FTextStream t 
)
static

Definition at line 1064 of file xmlgen.cpp.

1065 {
1066  t << " <listofallmembers>" << endl;
1067  if (cd->memberNameInfoSDict())
1068  {
1070  MemberNameInfo *mni;
1071  for (mnii.toFirst();(mni=mnii.current());++mnii)
1072  {
1073  MemberNameInfoIterator mii(*mni);
1074  MemberInfo *mi;
1075  for (mii.toFirst();(mi=mii.current());++mii)
1076  {
1077  MemberDef *md=mi->memberDef;
1078  if (md->name().at(0)!='@') // skip anonymous members
1079  {
1080  Protection prot = mi->prot;
1081  Specifier virt=md->virtualness();
1082  t << " <member refid=\"" << memberOutputFileBase(md) << "_1" <<
1083  md->anchor() << "\" prot=\"";
1084  switch (prot)
1085  {
1086  case Public: t << "public"; break;
1087  case Protected: t << "protected"; break;
1088  case Private: t << "private"; break;
1089  case Package: t << "package"; break;
1090  }
1091  t << "\" virt=\"";
1092  switch(virt)
1093  {
1094  case Normal: t << "non-virtual"; break;
1095  case Virtual: t << "virtual"; break;
1096  case Pure: t << "pure-virtual"; break;
1097  }
1098  t << "\"";
1099  if (!mi->ambiguityResolutionScope.isEmpty())
1100  {
1101  t << " ambiguityscope=\"" << convertToXML(mi->ambiguityResolutionScope) << "\"";
1102  }
1103  t << "><scope>" << convertToXML(cd->name()) << "</scope><name>" <<
1104  convertToXML(md->name()) << "</name></member>" << endl;
1105  }
1106  }
1107  }
1108  }
1109  t << " </listofallmembers>" << endl;
1110 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
Definition: types.h:29
bool isEmpty() const
Definition: qcstring.h:189
Definition: types.h:29
Definition: types.h:26
char & at(uint i) const
Definition: qcstring.h:326
MemberNameInfoSDict * memberNameInfoSDict() const
Definition: classdef.cpp:4409
Definition: types.h:26
Protection prot
Definition: membername.h:63
static QCString memberOutputFileBase(MemberDef *md)
Definition: xmlgen.cpp:515
MemberDef * memberDef
Definition: membername.h:62
Definition: types.h:26
Definition: types.h:29
QCString ambiguityResolutionScope
Definition: membername.h:67
Specifier virtualness(int count=0) const
Definition: memberdef.cpp:3560
const QCString & name() const
Definition: definition.h:114
Specifier
Definition: types.h:29
QCString anchor() const
Definition: memberdef.cpp:1031
static Specifier virt
Protection
Definition: types.h:26
friend class Iterator
Definition: sortdict.h:289
QTextStream & endl(QTextStream &s)
static void writeMemberReference ( FTextStream t,
Definition def,
MemberDef rmd,
const char *  tagName 
)
static

Definition at line 470 of file xmlgen.cpp.

471 {
472  QCString scope = rmd->getScopeString();
473  QCString name = rmd->name();
474  if (!scope.isEmpty() && scope!=def->name())
475  {
477  }
478  t << " <" << tagName << " refid=\"";
479  t << rmd->getOutputFileBase() << "_1" << rmd->anchor() << "\"";
480  if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
481  {
482  t << " compoundref=\"" << rmd->getBodyDef()->getOutputFileBase() << "\"";
483  t << " startline=\"" << rmd->getStartBodyLine() << "\"";
484  if (rmd->getEndBodyLine()!=-1)
485  {
486  t << " endline=\"" << rmd->getEndBodyLine() << "\"";
487  }
488  }
489  t << ">" << convertToXML(name) << "</" << tagName << ">" << endl;
490 
491 }
static QCString name
Definition: declinfo.cpp:673
QCString convertToXML(const char *s)
Definition: util.cpp:5717
static QCString scope
Definition: declinfo.cpp:668
bool isEmpty() const
Definition: qcstring.h:189
FileDef * getBodyDef() const
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Definition: util.cpp:8065
const QCString & name() const
Definition: definition.h:114
QCString getScopeString() const
Definition: memberdef.cpp:3301
SrcLangExt getLanguage() const
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
QCString anchor() const
Definition: memberdef.cpp:1031
QCString getOutputFileBase() const
Definition: filedef.h:83
int getEndBodyLine() const
int getStartBodyLine() const
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
QTextStream & endl(QTextStream &s)
static void writeMemberTemplateLists ( MemberDef md,
FTextStream t 
)
static

Definition at line 409 of file xmlgen.cpp.

410 {
411  ArgumentList *templMd = md->templateArguments();
412  if (templMd) // function template prefix
413  {
414  writeTemplateArgumentList(templMd,t,md->getClassDef(),md->getFileDef(),8);
415  }
416 }
This class represents an function or template argument list.
Definition: arguments.h:82
static void writeTemplateArgumentList(ArgumentList *al, FTextStream &t, Definition *scope, FileDef *fileScope, int indent)
Definition: xmlgen.cpp:364
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
ArgumentList * templateArguments() const
Definition: memberdef.cpp:4522
static void writeTemplateArgumentList ( ArgumentList al,
FTextStream t,
Definition scope,
FileDef fileScope,
int  indent 
)
static

Definition at line 364 of file xmlgen.cpp.

369 {
370  QCString indentStr;
371  indentStr.fill(' ',indent);
372  if (al)
373  {
374  t << indentStr << "<templateparamlist>" << endl;
375  ArgumentListIterator ali(*al);
376  Argument *a;
377  for (ali.toFirst();(a=ali.current());++ali)
378  {
379  t << indentStr << " <param>" << endl;
380  if (!a->type.isEmpty())
381  {
382  t << indentStr << " <type>";
383  linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a->type);
384  t << "</type>" << endl;
385  }
386  if (!a->name.isEmpty())
387  {
388  t << indentStr << " <declname>" << a->name << "</declname>" << endl;
389  t << indentStr << " <defname>" << a->name << "</defname>" << endl;
390  }
391  if (!a->defval.isEmpty())
392  {
393  t << indentStr << " <defval>";
394  linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a->defval);
395  t << "</defval>" << endl;
396  }
397  if (!a->typeConstraint.isEmpty())
398  {
399  t << indentStr << " <typeconstraint>";
400  linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a->typeConstraint);
401  t << "</typeconstraint>" << endl;
402  }
403  t << indentStr << " </param>" << endl;
404  }
405  t << indentStr << "</templateparamlist>" << endl;
406  }
407 }
QCString type
Definition: arguments.h:67
bool isEmpty() const
Definition: qcstring.h:189
QCString defval
Definition: arguments.h:71
QCString typeConstraint
Definition: arguments.h:73
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
const double a
QCString name
Definition: arguments.h:69
bool fill(char c, int len=-1)
Definition: qcstring.h:243
void linkifyText(const TextGeneratorIntf &out, Definition *scope, FileDef *fileScope, Definition *self, const char *text, bool autoBreak, bool external, bool keepSpaces, int indentLevel)
Definition: util.cpp:1916
QTextStream & endl(QTextStream &s)
static void writeTemplateList ( ClassDef cd,
FTextStream t 
)
static

Definition at line 418 of file xmlgen.cpp.

419 {
421 }
ArgumentList * templateArguments() const
Definition: classdef.cpp:4419
static void writeTemplateArgumentList(ArgumentList *al, FTextStream &t, Definition *scope, FileDef *fileScope, int indent)
Definition: xmlgen.cpp:364
void writeXMLCodeBlock ( FTextStream t,
FileDef fd 
)

Definition at line 447 of file xmlgen.cpp.

448 {
451  pIntf->resetCodeParserState();
452  XMLCodeGenerator *xmlGen = new XMLCodeGenerator(t);
453  pIntf->parseCode(*xmlGen, // codeOutIntf
454  0, // scopeName
455  fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES")),
456  langExt, // lang
457  FALSE, // isExampleBlock
458  0, // exampleName
459  fd, // fileDef
460  -1, // startLine
461  -1, // endLine
462  FALSE, // inlineFragement
463  0, // memberDef
464  TRUE // showLineNumbers
465  );
466  xmlGen->finish();
467  delete xmlGen;
468 }
ParserInterface * getParser(const char *extension)
Definition: parserintf.h:191
QCString fileToString(const char *name, bool filter, bool isSourceCode)
Definition: util.cpp:2418
Abstract interface for programming language parsers.
Definition: parserintf.h:38
const bool FALSE
Definition: qglobal.h:370
SrcLangExt
Definition: types.h:41
QCString getDefFileExtension() const
static ParserManager * parserManager
Definition: doxygen.h:141
#define Config_getBool(val)
Definition: config.cpp:664
QCString absFilePath() const
Definition: filedef.h:96
SrcLangExt getLanguageFromFileName(const QCString fileName)
Definition: util.cpp:7061
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
const bool TRUE
Definition: qglobal.h:371
virtual void resetCodeParserState()=0
void writeXMLCodeString ( FTextStream t,
const char *  s,
int &  col 
)
inline

Definition at line 114 of file xmlgen.cpp.

115 {
116  char c;
117  while ((c=*s++))
118  {
119  switch(c)
120  {
121  case '\t':
122  {
123  static int tabSize = Config_getInt("TAB_SIZE");
124  int spacesToNextTabStop = tabSize - (col%tabSize);
125  col+=spacesToNextTabStop;
126  while (spacesToNextTabStop--) t << "<sp/>";
127  break;
128  }
129  case ' ': t << "<sp/>"; col++; break;
130  case '<': t << "&lt;"; col++; break;
131  case '>': t << "&gt;"; col++; break;
132  case '&': t << "&amp;"; col++; break;
133  case '\'': t << "&apos;"; col++; break;
134  case '"': t << "&quot;"; col++; break;
135  case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:
136  case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18:
137  case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26:
138  case 27: case 28: case 29: case 30: case 31:
139  break; // skip invalid XML characters (see http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char)
140  default: s=writeUtf8Char(t,s-1); col++; break;
141  }
142  }
143 }
#define Config_getInt(val)
Definition: config.cpp:661
const char * writeUtf8Char(FTextStream &t, const char *s)
Definition: util.cpp:7165
static QCString * s
Definition: config.cpp:1042
static void writeXMLDocBlock ( FTextStream t,
const QCString fileName,
int  lineNr,
Definition scope,
MemberDef md,
const QCString text 
)
static

Definition at line 423 of file xmlgen.cpp.

429 {
430  QCString stext = text.stripWhiteSpace();
431  if (stext.isEmpty()) return;
432  // convert the documentation string into an abstract syntax tree
433  DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,text,FALSE,FALSE);
434  // create a code generator
435  XMLCodeGenerator *xmlCodeGen = new XMLCodeGenerator(t);
436  // create a parse tree visitor for XML
437  XmlDocVisitor *visitor = new XmlDocVisitor(t,*xmlCodeGen);
438  // visit all nodes
439  root->accept(visitor);
440  // clean up
441  delete visitor;
442  delete xmlCodeGen;
443  delete root;
444 
445 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool isEmpty() const
Definition: qcstring.h:189
const bool FALSE
Definition: qglobal.h:370
DocRoot * validatingParseDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const char *input, bool indexWords, bool isExample, const char *exampleName, bool singleLine, bool linkFromIndex)
Definition: docparser.cpp:7179
Concrete visitor implementation for XML output.
Definition: xmldocvisitor.h:31
virtual void accept(DocVisitor *v)=0
static void writeXMLHeader ( FTextStream t)
static

Definition at line 146 of file xmlgen.cpp.

147 {
148  t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
149  t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
150  t << "xsi:noNamespaceSchemaLocation=\"compound.xsd\" ";
151  t << "version=\"" << versionString << "\">" << endl;
152 }
char versionString[]
Definition: version.cpp:1
QTextStream & endl(QTextStream &s)
void writeXMLLink ( FTextStream t,
const char *  extRef,
const char *  compoundId,
const char *  anchorId,
const char *  text,
const char *  tooltip 
)

Definition at line 186 of file xmlgen.cpp.

188 {
189  t << "<ref refid=\"" << compoundId;
190  if (anchorId) t << "_1" << anchorId;
191  t << "\" kindref=\"";
192  if (anchorId) t << "member"; else t << "compound";
193  t << "\"";
194  if (extRef) t << " external=\"" << extRef << "\"";
195  if (tooltip) t << " tooltip=\"" << convertToXML(tooltip) << "\"";
196  t << ">";
197  writeXMLString(t,text);
198  t << "</ref>";
199 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
void writeXMLString(FTextStream &t, const char *s)
Definition: xmlgen.cpp:109
void writeXMLString ( FTextStream t,
const char *  s 
)
inline

Definition at line 109 of file xmlgen.cpp.

110 {
111  t << convertToXML(s);
112 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
static QCString * s
Definition: config.cpp:1042

Variable Documentation

XmlSectionMapper g_xmlSectionMapper
static

Definition at line 106 of file xmlgen.cpp.