Public Member Functions | Private Member Functions | Private Attributes | List of all members
XmlDocVisitor Class Reference

Concrete visitor implementation for XML output. More...

#include <xmldocvisitor.h>

Inheritance diagram for XmlDocVisitor:
DocVisitor

Public Member Functions

 XmlDocVisitor (FTextStream &t, CodeOutputInterface &ci)
 
void visit (DocWord *)
 
void visit (DocLinkedWord *)
 
void visit (DocWhiteSpace *)
 
void visit (DocSymbol *)
 
void visit (DocURL *)
 
void visit (DocLineBreak *)
 
void visit (DocHorRuler *)
 
void visit (DocStyleChange *)
 
void visit (DocVerbatim *)
 
void visit (DocAnchor *)
 
void visit (DocInclude *)
 
void visit (DocIncOperator *)
 
void visit (DocFormula *)
 
void visit (DocIndexEntry *)
 
void visit (DocSimpleSectSep *)
 
void visit (DocCite *)
 
void visitPre (DocAutoList *)
 
void visitPost (DocAutoList *)
 
void visitPre (DocAutoListItem *)
 
void visitPost (DocAutoListItem *)
 
void visitPre (DocPara *)
 
void visitPost (DocPara *)
 
void visitPre (DocRoot *)
 
void visitPost (DocRoot *)
 
void visitPre (DocSimpleSect *)
 
void visitPost (DocSimpleSect *)
 
void visitPre (DocTitle *)
 
void visitPost (DocTitle *)
 
void visitPre (DocSimpleList *)
 
void visitPost (DocSimpleList *)
 
void visitPre (DocSimpleListItem *)
 
void visitPost (DocSimpleListItem *)
 
void visitPre (DocSection *)
 
void visitPost (DocSection *)
 
void visitPre (DocHtmlList *)
 
void visitPost (DocHtmlList *)
 
void visitPre (DocHtmlListItem *)
 
void visitPost (DocHtmlListItem *)
 
void visitPre (DocHtmlDescList *)
 
void visitPost (DocHtmlDescList *)
 
void visitPre (DocHtmlDescTitle *)
 
void visitPost (DocHtmlDescTitle *)
 
void visitPre (DocHtmlDescData *)
 
void visitPost (DocHtmlDescData *)
 
void visitPre (DocHtmlTable *)
 
void visitPost (DocHtmlTable *)
 
void visitPre (DocHtmlRow *)
 
void visitPost (DocHtmlRow *)
 
void visitPre (DocHtmlCell *)
 
void visitPost (DocHtmlCell *)
 
void visitPre (DocHtmlCaption *)
 
void visitPost (DocHtmlCaption *)
 
void visitPre (DocInternal *)
 
void visitPost (DocInternal *)
 
void visitPre (DocHRef *)
 
void visitPost (DocHRef *)
 
void visitPre (DocHtmlHeader *)
 
void visitPost (DocHtmlHeader *)
 
void visitPre (DocImage *)
 
void visitPost (DocImage *)
 
void visitPre (DocDotFile *)
 
void visitPost (DocDotFile *)
 
void visitPre (DocMscFile *)
 
void visitPost (DocMscFile *)
 
void visitPre (DocDiaFile *)
 
void visitPost (DocDiaFile *)
 
void visitPre (DocLink *)
 
void visitPost (DocLink *)
 
void visitPre (DocRef *)
 
void visitPost (DocRef *)
 
void visitPre (DocSecRefItem *)
 
void visitPost (DocSecRefItem *)
 
void visitPre (DocSecRefList *)
 
void visitPost (DocSecRefList *)
 
void visitPre (DocParamSect *)
 
void visitPost (DocParamSect *)
 
void visitPre (DocParamList *)
 
void visitPost (DocParamList *)
 
void visitPre (DocXRefItem *)
 
void visitPost (DocXRefItem *)
 
void visitPre (DocInternalRef *)
 
void visitPost (DocInternalRef *)
 
void visitPre (DocCopy *)
 
void visitPost (DocCopy *)
 
void visitPre (DocText *)
 
void visitPost (DocText *)
 
void visitPre (DocHtmlBlockQuote *)
 
void visitPost (DocHtmlBlockQuote *)
 
void visitPre (DocVhdlFlow *)
 
void visitPost (DocVhdlFlow *)
 
void visitPre (DocParBlock *)
 
void visitPost (DocParBlock *)
 
- Public Member Functions inherited from DocVisitor
 DocVisitor (int id)
 
virtual ~DocVisitor ()
 
int id () const
 

Private Member Functions

void filter (const char *str)
 
void startLink (const QCString &ref, const QCString &file, const QCString &anchor)
 
void endLink ()
 
void pushEnabled ()
 
void popEnabled ()
 

Private Attributes

FTextStreamm_t
 
CodeOutputInterfacem_ci
 
bool m_insidePre
 
bool m_hide
 
QStack< boolm_enabled
 
QCString m_langExt
 

Detailed Description

Concrete visitor implementation for XML output.

Definition at line 31 of file xmldocvisitor.h.

Constructor & Destructor Documentation

XmlDocVisitor::XmlDocVisitor ( FTextStream t,
CodeOutputInterface ci 
)

Definition at line 86 of file xmldocvisitor.cpp.

88 {
89 }
const bool FALSE
Definition: qglobal.h:370
CodeOutputInterface & m_ci
FTextStream & m_t
DocVisitor(int id)
Definition: docvisitor.h:94
const int DocVisitor_XML
Definition: docvisitor.h:25

Member Function Documentation

void XmlDocVisitor::endLink ( )
private

Definition at line 1049 of file xmldocvisitor.cpp.

1050 {
1051  m_t << "</ref>";
1052 }
FTextStream & m_t
void XmlDocVisitor::filter ( const char *  str)
private

Definition at line 1032 of file xmldocvisitor.cpp.

1033 {
1034  m_t << convertToXML(str);
1035 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
FTextStream & m_t
static QCString str
void XmlDocVisitor::popEnabled ( )
private

Definition at line 1059 of file xmldocvisitor.cpp.

1060 {
1061  bool *v=m_enabled.pop();
1062  ASSERT(v!=0);
1063  m_hide = *v;
1064  delete v;
1065 }
type * pop()
Definition: qstack.h:59
QStack< bool > m_enabled
#define ASSERT(x)
Definition: qglobal.h:590
void XmlDocVisitor::pushEnabled ( )
private

Definition at line 1054 of file xmldocvisitor.cpp.

1055 {
1056  m_enabled.push(new bool(m_hide));
1057 }
void push(const type *d)
Definition: qstack.h:58
QStack< bool > m_enabled
void XmlDocVisitor::startLink ( const QCString ref,
const QCString file,
const QCString anchor 
)
private

Definition at line 1037 of file xmldocvisitor.cpp.

1038 {
1039  //printf("XmlDocVisitor: file=%s anchor=%s\n",file.data(),anchor.data());
1040  m_t << "<ref refid=\"" << file;
1041  if (!anchor.isEmpty()) m_t << "_1" << anchor;
1042  m_t << "\" kindref=\"";
1043  if (!anchor.isEmpty()) m_t << "member"; else m_t << "compound";
1044  m_t << "\"";
1045  if (!ref.isEmpty()) m_t << " external=\"" << ref << "\"";
1046  m_t << ">";
1047 }
bool isEmpty() const
Definition: qcstring.h:189
FTextStream & m_t
void XmlDocVisitor::visit ( DocWord w)
virtual

Implements DocVisitor.

Definition at line 95 of file xmldocvisitor.cpp.

96 {
97  if (m_hide) return;
98  filter(w->word());
99 }
void filter(const char *str)
QCString word() const
Definition: docparser.h:199
void XmlDocVisitor::visit ( DocLinkedWord w)
virtual

Implements DocVisitor.

Definition at line 101 of file xmldocvisitor.cpp.

102 {
103  if (m_hide) return;
104  startLink(w->ref(),w->file(),w->anchor());
105  filter(w->word());
106  endLink();
107 }
QCString ref() const
Definition: docparser.h:219
void filter(const char *str)
void startLink(const QCString &ref, const QCString &file, const QCString &anchor)
QCString word() const
Definition: docparser.h:215
QCString file() const
Definition: docparser.h:217
QCString anchor() const
Definition: docparser.h:220
void XmlDocVisitor::visit ( DocWhiteSpace w)
virtual

Implements DocVisitor.

Definition at line 109 of file xmldocvisitor.cpp.

110 {
111  if (m_hide) return;
112  if (m_insidePre)
113  {
114  m_t << w->chars();
115  }
116  else
117  {
118  m_t << " ";
119  }
120 }
FTextStream & m_t
QCString chars() const
Definition: docparser.h:434
void XmlDocVisitor::visit ( DocSymbol s)
virtual

Implements DocVisitor.

Definition at line 122 of file xmldocvisitor.cpp.

123 {
124  if (m_hide) return;
125  const char *res = HtmlEntityMapper::instance()->xml(s->symbol());
126  if (res)
127  {
128  m_t << res;
129  }
130  else
131  {
132  err("XML: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
133  }
134 }
const char * xml(DocSymbol::SymType symb) const
Access routine to the XML code of the HTML entity.
Definition: htmlentity.cpp:404
static HtmlEntityMapper * instance()
Definition: htmlentity.cpp:341
void err(const char *fmt,...)
Definition: message.cpp:226
FTextStream & m_t
SymType symbol() const
Definition: docparser.h:418
const bool TRUE
Definition: qglobal.h:371
void XmlDocVisitor::visit ( DocURL u)
virtual

Implements DocVisitor.

Definition at line 136 of file xmldocvisitor.cpp.

137 {
138  if (m_hide) return;
139  m_t << "<ulink url=\"";
140  if (u->isEmail()) m_t << "mailto:";
141  filter(u->url());
142  m_t << "\">";
143  filter(u->url());
144  m_t << "</ulink>";
145 }
QCString url() const
Definition: docparser.h:239
bool isEmail() const
Definition: docparser.h:242
void filter(const char *str)
FTextStream & m_t
void XmlDocVisitor::visit ( DocLineBreak )
virtual

Implements DocVisitor.

Definition at line 147 of file xmldocvisitor.cpp.

148 {
149  if (m_hide) return;
150  m_t << "<linebreak/>\n";
151 }
FTextStream & m_t
void XmlDocVisitor::visit ( DocHorRuler )
virtual

Implements DocVisitor.

Definition at line 153 of file xmldocvisitor.cpp.

154 {
155  if (m_hide) return;
156  m_t << "<hruler/>\n";
157 }
FTextStream & m_t
void XmlDocVisitor::visit ( DocStyleChange s)
virtual

Implements DocVisitor.

Definition at line 159 of file xmldocvisitor.cpp.

160 {
161  if (m_hide) return;
162  switch (s->style())
163  {
165  if (s->enable()) m_t << "<bold>"; else m_t << "</bold>";
166  break;
168  if (s->enable()) m_t << "<emphasis>"; else m_t << "</emphasis>";
169  break;
171  if (s->enable()) m_t << "<computeroutput>"; else m_t << "</computeroutput>";
172  break;
174  if (s->enable()) m_t << "<subscript>"; else m_t << "</subscript>";
175  break;
177  if (s->enable()) m_t << "<superscript>"; else m_t << "</superscript>";
178  break;
180  if (s->enable()) m_t << "<center>"; else m_t << "</center>";
181  break;
183  if (s->enable()) m_t << "<small>"; else m_t << "</small>";
184  break;
186  if (s->enable())
187  {
188  m_t << "<preformatted>";
190  }
191  else
192  {
193  m_t << "</preformatted>";
195  }
196  break;
197  case DocStyleChange::Div: /* HTML only */ break;
198  case DocStyleChange::Span: /* HTML only */ break;
199  }
200 }
const bool FALSE
Definition: qglobal.h:370
Style style() const
Definition: docparser.h:329
FTextStream & m_t
bool enable() const
Definition: docparser.h:331
const bool TRUE
Definition: qglobal.h:371
void XmlDocVisitor::visit ( DocVerbatim s)
virtual

Implements DocVisitor.

Definition at line 202 of file xmldocvisitor.cpp.

203 {
204  if (m_hide) return;
205  QCString lang = m_langExt;
206  if (!s->language().isEmpty()) // explicit language setting
207  {
208  lang = s->language();
209  }
210  SrcLangExt langExt = getLanguageFromFileName(lang);
211  switch(s->type())
212  {
213  case DocVerbatim::Code: // fall though
214  m_t << "<programlisting>";
216  ->parseCode(m_ci,s->context(),s->text(),langExt,
217  s->isExample(),s->exampleFile());
218  m_t << "</programlisting>";
219  break;
220  case DocVerbatim::Verbatim:
221  m_t << "<verbatim>";
222  filter(s->text());
223  m_t << "</verbatim>";
224  break;
225  case DocVerbatim::HtmlOnly:
226  case DocVerbatim::RtfOnly:
227  case DocVerbatim::ManOnly:
230  /* nothing */
231  break;
232  case DocVerbatim::XmlOnly:
233  m_t << s->text();
234  break;
235  case DocVerbatim::Dot:
236  visitPreStart(m_t, "dot", s->hasCaption(), this, s->children(), QCString(""), FALSE, DocImage::Html, s->width(), s->height());
237  filter(s->text());
238  visitPostEnd(m_t, "dot");
239  break;
240  case DocVerbatim::Msc:
241  visitPreStart(m_t, "msc", s->hasCaption(), this, s->children(), QCString(""), FALSE, DocImage::Html, s->width(), s->height());
242  filter(s->text());
243  visitPostEnd(m_t, "msc");
244  break;
246  visitPreStart(m_t, "plantuml", s->hasCaption(), this, s->children(), QCString(""), FALSE, DocImage::Html, s->width(), s->height());
247  filter(s->text());
248  visitPostEnd(m_t, "plantuml");
249  break;
250  }
251 }
QCString exampleFile() const
Definition: docparser.h:454
ParserInterface * getParser(const char *extension)
Definition: parserintf.h:191
bool isEmpty() const
Definition: qcstring.h:189
void filter(const char *str)
const bool FALSE
Definition: qglobal.h:370
SrcLangExt
Definition: types.h:41
QCString width() const
Definition: docparser.h:459
bool isExample() const
Definition: docparser.h:453
QCString height() const
Definition: docparser.h:460
CodeOutputInterface & m_ci
static ParserManager * parserManager
Definition: doxygen.h:141
QCString text() const
Definition: docparser.h:450
const QList< DocNode > & children() const
Definition: docparser.h:461
static void visitPreStart(FTextStream &t, const char *cmd, const bool doCaption, XmlDocVisitor *parent, QList< DocNode > children, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, const QCString &height)
QCString language() const
Definition: docparser.h:456
FTextStream & m_t
QCString context() const
Definition: docparser.h:451
SrcLangExt getLanguageFromFileName(const QCString fileName)
Definition: util.cpp:7061
bool hasCaption() const
Definition: docparser.h:458
static void visitPostEnd(FTextStream &t, const char *cmd)
Type type() const
Definition: docparser.h:449
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
QCString m_langExt
void XmlDocVisitor::visit ( DocAnchor anc)
virtual

Implements DocVisitor.

Definition at line 253 of file xmldocvisitor.cpp.

254 {
255  if (m_hide) return;
256  m_t << "<anchor id=\"" << anc->file() << "_1" << anc->anchor() << "\"/>";
257 }
QCString anchor() const
Definition: docparser.h:277
QCString file() const
Definition: docparser.h:278
FTextStream & m_t
void XmlDocVisitor::visit ( DocInclude inc)
virtual

Implements DocVisitor.

Definition at line 259 of file xmldocvisitor.cpp.

260 {
261  if (m_hide) return;
262  SrcLangExt langExt = getLanguageFromFileName(inc->extension());
263  switch(inc->type())
264  {
266  {
267  m_t << "<programlisting>";
268  QFileInfo cfi( inc->file() );
269  FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
271  ->parseCode(m_ci,inc->context(),
272  inc->text(),
273  langExt,
274  inc->isExample(),
275  inc->exampleFile(), &fd);
276  m_t << "</programlisting>";
277  }
278  break;
279  case DocInclude::Include:
280  m_t << "<programlisting>";
282  ->parseCode(m_ci,inc->context(),
283  inc->text(),
284  langExt,
285  inc->isExample(),
286  inc->exampleFile());
287  m_t << "</programlisting>";
288  break;
290  break;
292  m_t << "<htmlonly>";
293  filter(inc->text());
294  m_t << "</htmlonly>";
295  break;
297  m_t << "<latexonly>";
298  filter(inc->text());
299  m_t << "</latexonly>";
300  break;
302  m_t << "<verbatim>";
303  filter(inc->text());
304  m_t << "</verbatim>";
305  break;
306  case DocInclude::Snippet:
307  m_t << "<programlisting>";
309  ->parseCode(m_ci,
310  inc->context(),
311  extractBlock(inc->text(),inc->blockId()),
312  langExt,
313  inc->isExample(),
314  inc->exampleFile()
315  );
316  m_t << "</programlisting>";
317  break;
318  }
319 }
ParserInterface * getParser(const char *extension)
Definition: parserintf.h:191
static TemplateVariant parseCode(MemberDef *md, const QCString &scopeName, const QCString &relPath, const QCString &code, int startLine=-1, int endLine=-1, bool showLineNumbers=FALSE)
Definition: context.cpp:1266
void filter(const char *str)
QCString blockId() const
Definition: docparser.h:505
QCString text() const
Definition: docparser.h:503
Type type() const
Definition: docparser.h:502
SrcLangExt
Definition: types.h:41
QCString extractBlock(const QCString text, const QCString marker)
Definition: util.cpp:7998
CodeOutputInterface & m_ci
static ParserManager * parserManager
Definition: doxygen.h:141
bool isExample() const
Definition: docparser.h:506
FTextStream & m_t
QCString file() const
Definition: docparser.h:495
SrcLangExt getLanguageFromFileName(const QCString fileName)
Definition: util.cpp:7061
QCString exampleFile() const
Definition: docparser.h:507
QCString context() const
Definition: docparser.h:504
QCString extension() const
Definition: docparser.h:496
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
void XmlDocVisitor::visit ( DocIncOperator op)
virtual

Implements DocVisitor.

Definition at line 321 of file xmldocvisitor.cpp.

322 {
323  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
324  // op->type(),op->isFirst(),op->isLast(),op->text().data());
325  if (op->isFirst())
326  {
327  if (!m_hide)
328  {
329  m_t << "<programlisting>";
330  }
331  pushEnabled();
332  m_hide = TRUE;
333  }
335  if (op->type()!=DocIncOperator::Skip)
336  {
337  popEnabled();
338  if (!m_hide)
339  {
341  ->parseCode(m_ci,op->context(),
342  op->text(),langExt,op->isExample(),
343  op->exampleFile());
344  }
345  pushEnabled();
346  m_hide=TRUE;
347  }
348  if (op->isLast())
349  {
350  popEnabled();
351  if (!m_hide) m_t << "</programlisting>";
352  }
353  else
354  {
355  if (!m_hide) m_t << endl;
356  }
357 }
Type type() const
Definition: docparser.h:532
ParserInterface * getParser(const char *extension)
Definition: parserintf.h:191
bool isFirst() const
Definition: docparser.h:537
SrcLangExt
Definition: types.h:41
QCString exampleFile() const
Definition: docparser.h:542
CodeOutputInterface & m_ci
static ParserManager * parserManager
Definition: doxygen.h:141
bool isExample() const
Definition: docparser.h:541
QCString context() const
Definition: docparser.h:535
QCString text() const
Definition: docparser.h:533
bool isLast() const
Definition: docparser.h:538
FTextStream & m_t
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
QTextStream & endl(QTextStream &s)
QCString m_langExt
void XmlDocVisitor::visit ( DocFormula f)
virtual

Implements DocVisitor.

Definition at line 359 of file xmldocvisitor.cpp.

360 {
361  if (m_hide) return;
362  m_t << "<formula id=\"" << f->id() << "\">";
363  filter(f->text());
364  m_t << "</formula>";
365 }
void filter(const char *str)
QCString text() const
Definition: docparser.h:563
int id() const
Definition: docparser.h:565
FTextStream & m_t
void XmlDocVisitor::visit ( DocIndexEntry ie)
virtual

Implements DocVisitor.

Definition at line 367 of file xmldocvisitor.cpp.

368 {
369  if (m_hide) return;
370  m_t << "<indexentry>"
371  "<primaryie>";
372  filter(ie->entry());
373  m_t << "</primaryie>"
374  "<secondaryie></secondaryie>"
375  "</indexentry>";
376 }
void filter(const char *str)
QCString entry() const
Definition: docparser.h:586
FTextStream & m_t
void XmlDocVisitor::visit ( DocSimpleSectSep sep)
virtual

Implements DocVisitor.

Definition at line 378 of file xmldocvisitor.cpp.

379 {
380  if (sep->parent() && sep->parent()->kind()==DocNode::Kind_SimpleSect)
381  {
382  visitPost((DocSimpleSect*)sep->parent()); // end current section
383  visitPre((DocSimpleSect*)sep->parent()); // start new section
384  }
385 }
DocNode * parent() const
Definition: docparser.h:147
void visitPre(DocAutoList *)
virtual Kind kind() const =0
void visitPost(DocAutoList *)
void XmlDocVisitor::visit ( DocCite cite)
virtual

Implements DocVisitor.

Definition at line 387 of file xmldocvisitor.cpp.

388 {
389  if (m_hide) return;
390  if (!cite->file().isEmpty()) startLink(cite->ref(),cite->file(),cite->anchor());
391  filter(cite->text());
392  if (!cite->file().isEmpty()) endLink();
393 }
QCString text() const
Definition: docparser.h:296
bool isEmpty() const
Definition: qcstring.h:189
void filter(const char *str)
QCString ref() const
Definition: docparser.h:294
QCString file() const
Definition: docparser.h:292
void startLink(const QCString &ref, const QCString &file, const QCString &anchor)
QCString anchor() const
Definition: docparser.h:295
void XmlDocVisitor::visitPost ( DocAutoList l)
virtual

Implements DocVisitor.

Definition at line 412 of file xmldocvisitor.cpp.

413 {
414  if (m_hide) return;
415  if (l->isEnumList())
416  {
417  m_t << "</orderedlist>\n";
418  }
419  else
420  {
421  m_t << "</itemizedlist>\n";
422  }
423 }
FTextStream & m_t
bool isEnumList() const
Definition: docparser.h:621
void XmlDocVisitor::visitPost ( DocAutoListItem )
virtual

Implements DocVisitor.

Definition at line 431 of file xmldocvisitor.cpp.

432 {
433  if (m_hide) return;
434  m_t << "</listitem>";
435 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocPara )
virtual

Implements DocVisitor.

Definition at line 443 of file xmldocvisitor.cpp.

444 {
445  if (m_hide) return;
446  m_t << "</para>";
447 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocRoot )
virtual

Implements DocVisitor.

Definition at line 454 of file xmldocvisitor.cpp.

455 {
456  //m_t << "<hr><h4><font color=\"red\">Old parser:</font></h4>\n";
457 }
void XmlDocVisitor::visitPost ( DocSimpleSect )
virtual

Implements DocVisitor.

Definition at line 504 of file xmldocvisitor.cpp.

505 {
506  if (m_hide) return;
507  m_t << "</simplesect>\n";
508 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocTitle )
virtual

Implements DocVisitor.

Definition at line 516 of file xmldocvisitor.cpp.

517 {
518  if (m_hide) return;
519  m_t << "</title>";
520 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocSimpleList )
virtual

Implements DocVisitor.

Definition at line 528 of file xmldocvisitor.cpp.

529 {
530  if (m_hide) return;
531  m_t << "</itemizedlist>\n";
532 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocSimpleListItem )
virtual

Implements DocVisitor.

Definition at line 540 of file xmldocvisitor.cpp.

541 {
542  if (m_hide) return;
543  m_t << "</listitem>\n";
544 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocSection s)
virtual

Implements DocVisitor.

Definition at line 557 of file xmldocvisitor.cpp.

558 {
559  m_t << "</sect" << s->level() << ">\n";
560 }
int level() const
Definition: docparser.h:942
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlList s)
virtual

Implements DocVisitor.

Definition at line 571 of file xmldocvisitor.cpp.

572 {
573  if (m_hide) return;
574  if (s->type()==DocHtmlList::Ordered)
575  m_t << "</orderedlist>\n";
576  else
577  m_t << "</itemizedlist>\n";
578 }
Type type() const
Definition: docparser.h:1034
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlListItem )
virtual

Implements DocVisitor.

Definition at line 586 of file xmldocvisitor.cpp.

587 {
588  if (m_hide) return;
589  m_t << "</listitem>\n";
590 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlDescList )
virtual

Implements DocVisitor.

Definition at line 598 of file xmldocvisitor.cpp.

599 {
600  if (m_hide) return;
601  m_t << "</variablelist>\n";
602 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlDescTitle )
virtual

Implements DocVisitor.

Definition at line 610 of file xmldocvisitor.cpp.

611 {
612  if (m_hide) return;
613  m_t << "</term></varlistentry>\n";
614 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlDescData )
virtual

Implements DocVisitor.

Definition at line 622 of file xmldocvisitor.cpp.

623 {
624  if (m_hide) return;
625  m_t << "</listitem>\n";
626 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlTable )
virtual

Implements DocVisitor.

Definition at line 635 of file xmldocvisitor.cpp.

636 {
637  if (m_hide) return;
638  m_t << "</table>\n";
639 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlRow )
virtual

Implements DocVisitor.

Definition at line 647 of file xmldocvisitor.cpp.

648 {
649  if (m_hide) return;
650  m_t << "</row>\n";
651 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlCell )
virtual

Implements DocVisitor.

Definition at line 659 of file xmldocvisitor.cpp.

660 {
661  if (m_hide) return;
662  m_t << "</entry>";
663 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlCaption )
virtual

Implements DocVisitor.

Definition at line 671 of file xmldocvisitor.cpp.

672 {
673  if (m_hide) return;
674  m_t << "</caption>\n";
675 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocInternal )
virtual

Implements DocVisitor.

Definition at line 683 of file xmldocvisitor.cpp.

684 {
685  if (m_hide) return;
686  m_t << "</internal>" << endl;
687 }
FTextStream & m_t
QTextStream & endl(QTextStream &s)
void XmlDocVisitor::visitPost ( DocHRef )
virtual

Implements DocVisitor.

Definition at line 697 of file xmldocvisitor.cpp.

698 {
699  if (m_hide) return;
700  m_t << "</ulink>";
701 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocHtmlHeader )
virtual

Implements DocVisitor.

Definition at line 709 of file xmldocvisitor.cpp.

710 {
711  if (m_hide) return;
712  m_t << "</heading>\n";
713 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocImage )
virtual

Implements DocVisitor.

Definition at line 743 of file xmldocvisitor.cpp.

744 {
745  if (m_hide) return;
746  visitPostEnd(m_t, "image");
747 }
FTextStream & m_t
static void visitPostEnd(FTextStream &t, const char *cmd)
void XmlDocVisitor::visitPost ( DocDotFile )
virtual

Implements DocVisitor.

Definition at line 755 of file xmldocvisitor.cpp.

756 {
757  if (m_hide) return;
758  visitPostEnd(m_t, "dotfile");
759 }
FTextStream & m_t
static void visitPostEnd(FTextStream &t, const char *cmd)
void XmlDocVisitor::visitPost ( DocMscFile )
virtual

Implements DocVisitor.

Definition at line 767 of file xmldocvisitor.cpp.

768 {
769  if (m_hide) return;
770  visitPostEnd(m_t, "mscfile");
771 }
FTextStream & m_t
static void visitPostEnd(FTextStream &t, const char *cmd)
void XmlDocVisitor::visitPost ( DocDiaFile )
virtual

Implements DocVisitor.

Definition at line 779 of file xmldocvisitor.cpp.

780 {
781  if (m_hide) return;
782  visitPostEnd(m_t, "diafile");
783 }
FTextStream & m_t
static void visitPostEnd(FTextStream &t, const char *cmd)
void XmlDocVisitor::visitPost ( DocLink )
virtual

Implements DocVisitor.

Definition at line 791 of file xmldocvisitor.cpp.

792 {
793  if (m_hide) return;
794  endLink();
795 }
void XmlDocVisitor::visitPost ( DocRef ref)
virtual

Implements DocVisitor.

Definition at line 807 of file xmldocvisitor.cpp.

808 {
809  if (m_hide) return;
810  if (!ref->file().isEmpty()) endLink();
811  //m_t << " ";
812 }
bool isEmpty() const
Definition: qcstring.h:189
QCString file() const
Definition: docparser.h:827
void XmlDocVisitor::visitPost ( DocSecRefItem )
virtual

Implements DocVisitor.

Definition at line 820 of file xmldocvisitor.cpp.

821 {
822  if (m_hide) return;
823  m_t << "</tocitem>" << endl;
824 }
FTextStream & m_t
QTextStream & endl(QTextStream &s)
void XmlDocVisitor::visitPost ( DocSecRefList )
virtual

Implements DocVisitor.

Definition at line 832 of file xmldocvisitor.cpp.

833 {
834  if (m_hide) return;
835  m_t << "</toclist>" << endl;
836 }
FTextStream & m_t
QTextStream & endl(QTextStream &s)
void XmlDocVisitor::visitPost ( DocParamSect )
virtual

Implements DocVisitor.

Definition at line 870 of file xmldocvisitor.cpp.

871 {
872  if (m_hide) return;
873  m_t << "</parameterlist>" << endl;
874 }
FTextStream & m_t
QTextStream & endl(QTextStream &s)
void XmlDocVisitor::visitPost ( DocParamList )
virtual

Implements DocVisitor.

Definition at line 938 of file xmldocvisitor.cpp.

939 {
940  if (m_hide) return;
941  m_t << "</parameterdescription>" << endl;
942  m_t << "</parameteritem>" << endl;
943 }
FTextStream & m_t
QTextStream & endl(QTextStream &s)
void XmlDocVisitor::visitPost ( DocXRefItem x)
virtual

Implements DocVisitor.

Definition at line 958 of file xmldocvisitor.cpp.

959 {
960  if (m_hide) return;
961  if (x->title().isEmpty()) return;
962  m_t << "</xrefdescription>";
963  m_t << "</xrefsect>";
964 }
bool isEmpty() const
Definition: qcstring.h:189
FTextStream & m_t
QCString title() const
Definition: docparser.h:671
void XmlDocVisitor::visitPost ( DocInternalRef )
virtual

Implements DocVisitor.

Definition at line 972 of file xmldocvisitor.cpp.

973 {
974  if (m_hide) return;
975  endLink();
976  m_t << " ";
977 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocCopy )
virtual

Implements DocVisitor.

Definition at line 985 of file xmldocvisitor.cpp.

986 {
987  if (m_hide) return;
988  m_t << "</copydoc>" << endl;
989 }
FTextStream & m_t
QTextStream & endl(QTextStream &s)
void XmlDocVisitor::visitPost ( DocText )
virtual

Implements DocVisitor.

Definition at line 995 of file xmldocvisitor.cpp.

996 {
997 }
void XmlDocVisitor::visitPost ( DocHtmlBlockQuote )
virtual

Implements DocVisitor.

Definition at line 1005 of file xmldocvisitor.cpp.

1006 {
1007  if (m_hide) return;
1008  m_t << "</blockquote>";
1009 }
FTextStream & m_t
void XmlDocVisitor::visitPost ( DocVhdlFlow )
virtual

Implements DocVisitor.

Definition at line 1015 of file xmldocvisitor.cpp.

1016 {
1017 }
void XmlDocVisitor::visitPost ( DocParBlock )
virtual

Implements DocVisitor.

Definition at line 1025 of file xmldocvisitor.cpp.

1026 {
1027  if (m_hide) return;
1028  m_t << "</parblock>";
1029 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocAutoList l)
virtual

Implements DocVisitor.

Definition at line 399 of file xmldocvisitor.cpp.

400 {
401  if (m_hide) return;
402  if (l->isEnumList())
403  {
404  m_t << "<orderedlist>\n";
405  }
406  else
407  {
408  m_t << "<itemizedlist>\n";
409  }
410 }
FTextStream & m_t
bool isEnumList() const
Definition: docparser.h:621
void XmlDocVisitor::visitPre ( DocAutoListItem )
virtual

Implements DocVisitor.

Definition at line 425 of file xmldocvisitor.cpp.

426 {
427  if (m_hide) return;
428  m_t << "<listitem>";
429 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocPara )
virtual

Implements DocVisitor.

Definition at line 437 of file xmldocvisitor.cpp.

438 {
439  if (m_hide) return;
440  m_t << "<para>";
441 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocRoot )
virtual

Implements DocVisitor.

Definition at line 449 of file xmldocvisitor.cpp.

450 {
451  //m_t << "<hr><h4><font color=\"red\">New parser:</font></h4>\n";
452 }
void XmlDocVisitor::visitPre ( DocSimpleSect s)
virtual

Implements DocVisitor.

Definition at line 459 of file xmldocvisitor.cpp.

460 {
461  if (m_hide) return;
462  m_t << "<simplesect kind=\"";
463  switch(s->type())
464  {
465  case DocSimpleSect::See:
466  m_t << "see"; break;
467  case DocSimpleSect::Return:
468  m_t << "return"; break;
469  case DocSimpleSect::Author:
470  m_t << "author"; break;
472  m_t << "authors"; break;
474  m_t << "version"; break;
475  case DocSimpleSect::Since:
476  m_t << "since"; break;
477  case DocSimpleSect::Date:
478  m_t << "date"; break;
479  case DocSimpleSect::Note:
480  m_t << "note"; break;
482  m_t << "warning"; break;
483  case DocSimpleSect::Pre:
484  m_t << "pre"; break;
485  case DocSimpleSect::Post:
486  m_t << "post"; break;
488  m_t << "copyright"; break;
490  m_t << "invariant"; break;
492  m_t << "remark"; break;
494  m_t << "attention"; break;
495  case DocSimpleSect::User:
496  m_t << "par"; break;
497  case DocSimpleSect::Rcs:
498  m_t << "rcs"; break;
499  case DocSimpleSect::Unknown: break;
500  }
501  m_t << "\">";
502 }
Type type() const
Definition: docparser.h:1057
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocTitle )
virtual

Implements DocVisitor.

Definition at line 510 of file xmldocvisitor.cpp.

511 {
512  if (m_hide) return;
513  m_t << "<title>";
514 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocSimpleList )
virtual

Implements DocVisitor.

Definition at line 522 of file xmldocvisitor.cpp.

523 {
524  if (m_hide) return;
525  m_t << "<itemizedlist>\n";
526 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocSimpleListItem )
virtual

Implements DocVisitor.

Definition at line 534 of file xmldocvisitor.cpp.

535 {
536  if (m_hide) return;
537  m_t << "<listitem>";
538 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocSection s)
virtual

Implements DocVisitor.

Definition at line 546 of file xmldocvisitor.cpp.

547 {
548  if (m_hide) return;
549  m_t << "<sect" << s->level() << " id=\"" << s->file();
550  if (!s->anchor().isEmpty()) m_t << "_1" << s->anchor();
551  m_t << "\">" << endl;
552  m_t << "<title>";
554  m_t << "</title>" << endl;
555 }
QCString file() const
Definition: docparser.h:946
bool isEmpty() const
Definition: qcstring.h:189
QCString convertCharEntitiesToUTF8(const QCString &s)
Definition: util.cpp:5822
int level() const
Definition: docparser.h:942
QCString anchor() const
Definition: docparser.h:944
void filter(const char *str)
FTextStream & m_t
QCString title() const
Definition: docparser.h:943
QTextStream & endl(QTextStream &s)
void XmlDocVisitor::visitPre ( DocHtmlList s)
virtual

Implements DocVisitor.

Definition at line 562 of file xmldocvisitor.cpp.

563 {
564  if (m_hide) return;
565  if (s->type()==DocHtmlList::Ordered)
566  m_t << "<orderedlist>\n";
567  else
568  m_t << "<itemizedlist>\n";
569 }
Type type() const
Definition: docparser.h:1034
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocHtmlListItem )
virtual

Implements DocVisitor.

Definition at line 580 of file xmldocvisitor.cpp.

581 {
582  if (m_hide) return;
583  m_t << "<listitem>\n";
584 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocHtmlDescList )
virtual

Implements DocVisitor.

Definition at line 592 of file xmldocvisitor.cpp.

593 {
594  if (m_hide) return;
595  m_t << "<variablelist>\n";
596 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocHtmlDescTitle )
virtual

Implements DocVisitor.

Definition at line 604 of file xmldocvisitor.cpp.

605 {
606  if (m_hide) return;
607  m_t << "<varlistentry><term>";
608 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocHtmlDescData )
virtual

Implements DocVisitor.

Definition at line 616 of file xmldocvisitor.cpp.

617 {
618  if (m_hide) return;
619  m_t << "<listitem>";
620 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocHtmlTable t)
virtual

Implements DocVisitor.

Definition at line 628 of file xmldocvisitor.cpp.

629 {
630  if (m_hide) return;
631  m_t << "<table rows=\"" << t->numRows()
632  << "\" cols=\"" << t->numColumns() << "\">" ;
633 }
FTextStream & m_t
uint numRows() const
Definition: docparser.h:1352
uint numColumns() const
Definition: docparser.h:1357
void XmlDocVisitor::visitPre ( DocHtmlRow )
virtual

Implements DocVisitor.

Definition at line 641 of file xmldocvisitor.cpp.

642 {
643  if (m_hide) return;
644  m_t << "<row>\n";
645 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocHtmlCell c)
virtual

Implements DocVisitor.

Definition at line 653 of file xmldocvisitor.cpp.

654 {
655  if (m_hide) return;
656  if (c->isHeading()) m_t << "<entry thead=\"yes\">"; else m_t << "<entry thead=\"no\">";
657 }
bool isHeading() const
Definition: docparser.h:1260
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocHtmlCaption )
virtual

Implements DocVisitor.

Definition at line 665 of file xmldocvisitor.cpp.

666 {
667  if (m_hide) return;
668  m_t << "<caption>";
669 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocInternal )
virtual

Implements DocVisitor.

Definition at line 677 of file xmldocvisitor.cpp.

678 {
679  if (m_hide) return;
680  m_t << "<internal>";
681 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocHRef href)
virtual

Implements DocVisitor.

Definition at line 689 of file xmldocvisitor.cpp.

690 {
691  if (m_hide) return;
692  m_t << "<ulink url=\"";
693  filter(href->url());
694  m_t << "\">";
695 }
void filter(const char *str)
QCString url() const
Definition: docparser.h:876
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocHtmlHeader header)
virtual

Implements DocVisitor.

Definition at line 703 of file xmldocvisitor.cpp.

704 {
705  if (m_hide) return;
706  m_t << "<heading level=\"" << header->level() << "\">";
707 }
int level() const
Definition: docparser.h:894
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocImage img)
virtual

Implements DocVisitor.

Definition at line 715 of file xmldocvisitor.cpp.

716 {
717  if (m_hide) return;
718 
719  QCString baseName=img->name();
720  int i;
721  if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
722  {
723  baseName=baseName.right(baseName.length()-i-1);
724  }
725  visitPreStart(m_t, "image", FALSE, this, img->children(), baseName, TRUE, img->type(), img->width(), img->height());
726 
727  // copy the image to the output dir
728  QFile inImage(img->name());
729  QFile outImage(Config_getString("XML_OUTPUT")+"/"+baseName.data());
730  if (inImage.open(IO_ReadOnly))
731  {
732  if (outImage.open(IO_WriteOnly))
733  {
734  char *buffer = new char[inImage.size()];
735  inImage.readBlock(buffer,inImage.size());
736  outImage.writeBlock(buffer,inImage.size());
737  outImage.flush();
738  delete[] buffer;
739  }
740  }
741 }
QCString name() const
Definition: docparser.h:695
QCString width() const
Definition: docparser.h:697
uint length() const
Definition: qcstring.h:195
#define IO_WriteOnly
Definition: qiodevice.h:62
const bool FALSE
Definition: qglobal.h:370
int readBlock(char *data, uint len)
Definition: qfile_unix.cpp:473
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString height() const
Definition: docparser.h:698
#define IO_ReadOnly
Definition: qiodevice.h:61
QCString right(uint len) const
Definition: qcstring.cpp:231
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
static void visitPreStart(FTextStream &t, const char *cmd, const bool doCaption, XmlDocVisitor *parent, QList< DocNode > children, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, const QCString &height)
FTextStream & m_t
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
static QCString baseName
Definition: scanner.cpp:10890
Type type() const
Definition: docparser.h:694
const bool TRUE
Definition: qglobal.h:371
const QList< DocNode > & children() const
Definition: docparser.h:185
void XmlDocVisitor::visitPre ( DocDotFile df)
virtual

Implements DocVisitor.

Definition at line 749 of file xmldocvisitor.cpp.

750 {
751  if (m_hide) return;
752  visitPreStart(m_t, "dotfile", FALSE, this, df->children(), df->file(), FALSE, DocImage::Html, df->width(), df->height());
753 }
QCString file() const
Definition: docparser.h:723
const bool FALSE
Definition: qglobal.h:370
QCString width() const
Definition: docparser.h:726
static void visitPreStart(FTextStream &t, const char *cmd, const bool doCaption, XmlDocVisitor *parent, QList< DocNode > children, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, const QCString &height)
FTextStream & m_t
QCString height() const
Definition: docparser.h:727
const QList< DocNode > & children() const
Definition: docparser.h:185
void XmlDocVisitor::visitPre ( DocMscFile df)
virtual

Implements DocVisitor.

Definition at line 761 of file xmldocvisitor.cpp.

762 {
763  if (m_hide) return;
764  visitPreStart(m_t, "mscfile", FALSE, this, df->children(), df->file(), FALSE, DocImage::Html, df->width(), df->height());
765 }
QCString file() const
Definition: docparser.h:747
const bool FALSE
Definition: qglobal.h:370
QCString height() const
Definition: docparser.h:751
QCString width() const
Definition: docparser.h:750
static void visitPreStart(FTextStream &t, const char *cmd, const bool doCaption, XmlDocVisitor *parent, QList< DocNode > children, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, const QCString &height)
FTextStream & m_t
const QList< DocNode > & children() const
Definition: docparser.h:185
void XmlDocVisitor::visitPre ( DocDiaFile df)
virtual

Implements DocVisitor.

Definition at line 773 of file xmldocvisitor.cpp.

774 {
775  if (m_hide) return;
776  visitPreStart(m_t, "diafile", FALSE, this, df->children(), df->file(), FALSE, DocImage::Html, df->width(), df->height());
777 }
const bool FALSE
Definition: qglobal.h:370
QCString height() const
Definition: docparser.h:775
QCString file() const
Definition: docparser.h:771
static void visitPreStart(FTextStream &t, const char *cmd, const bool doCaption, XmlDocVisitor *parent, QList< DocNode > children, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, const QCString &height)
FTextStream & m_t
QCString width() const
Definition: docparser.h:774
const QList< DocNode > & children() const
Definition: docparser.h:185
void XmlDocVisitor::visitPre ( DocLink lnk)
virtual

Implements DocVisitor.

Definition at line 785 of file xmldocvisitor.cpp.

786 {
787  if (m_hide) return;
788  startLink(lnk->ref(),lnk->file(),lnk->anchor());
789 }
void startLink(const QCString &ref, const QCString &file, const QCString &anchor)
void XmlDocVisitor::visitPre ( DocRef ref)
virtual

Implements DocVisitor.

Definition at line 797 of file xmldocvisitor.cpp.

798 {
799  if (m_hide) return;
800  if (!ref->file().isEmpty())
801  {
802  startLink(ref->ref(),ref->file(),ref->isSubPage() ? QCString() : ref->anchor());
803  }
804  if (!ref->hasLinkText()) filter(ref->targetTitle());
805 }
bool isEmpty() const
Definition: qcstring.h:189
void filter(const char *str)
QCString file() const
Definition: docparser.h:827
bool isSubPage() const
Definition: docparser.h:836
QCString targetTitle() const
Definition: docparser.h:831
QCString ref() const
Definition: docparser.h:829
void startLink(const QCString &ref, const QCString &file, const QCString &anchor)
bool hasLinkText() const
Definition: docparser.h:832
void XmlDocVisitor::visitPre ( DocSecRefItem ref)
virtual

Implements DocVisitor.

Definition at line 814 of file xmldocvisitor.cpp.

815 {
816  if (m_hide) return;
817  m_t << "<tocitem id=\"" << ref->file() << "_1" << ref->anchor() << "\">";
818 }
QCString file() const
Definition: docparser.h:966
QCString anchor() const
Definition: docparser.h:967
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocSecRefList )
virtual

Implements DocVisitor.

Definition at line 826 of file xmldocvisitor.cpp.

827 {
828  if (m_hide) return;
829  m_t << "<toclist>" << endl;
830 }
FTextStream & m_t
QTextStream & endl(QTextStream &s)
void XmlDocVisitor::visitPre ( DocParamSect s)
virtual

Implements DocVisitor.

Definition at line 850 of file xmldocvisitor.cpp.

851 {
852  if (m_hide) return;
853  m_t << "<parameterlist kind=\"";
854  switch(s->type())
855  {
856  case DocParamSect::Param:
857  m_t << "param"; break;
858  case DocParamSect::RetVal:
859  m_t << "retval"; break;
861  m_t << "exception"; break;
863  m_t << "templateparam"; break;
864  default:
865  ASSERT(0);
866  }
867  m_t << "\">";
868 }
Type type() const
Definition: docparser.h:1101
FTextStream & m_t
#define ASSERT(x)
Definition: qglobal.h:590
void XmlDocVisitor::visitPre ( DocParamList pl)
virtual

Implements DocVisitor.

Definition at line 876 of file xmldocvisitor.cpp.

877 {
878  if (m_hide) return;
879  m_t << "<parameteritem>" << endl;
880  m_t << "<parameternamelist>" << endl;
881  //QStrListIterator li(pl->parameters());
882  //const char *s;
884  DocNode *param;
885  for (li.toFirst();(param=li.current());++li)
886  {
887  if (pl->paramTypes().count()>0)
888  {
890  DocNode *type;
891  for (li.toFirst();(type=li.current());++li)
892  {
893  m_t << "<parametertype>";
894  if (type->kind()==DocNode::Kind_Word)
895  {
896  visit((DocWord*)type);
897  }
898  else if (type->kind()==DocNode::Kind_LinkedWord)
899  {
900  visit((DocLinkedWord*)type);
901  }
902  m_t << "</parametertype>" << endl;
903  }
904  }
905  m_t << "<parametername";
907  {
908  m_t << " direction=\"";
909  if (pl->direction()==DocParamSect::In)
910  {
911  m_t << "in";
912  }
913  else if (pl->direction()==DocParamSect::Out)
914  {
915  m_t << "out";
916  }
917  else if (pl->direction()==DocParamSect::InOut)
918  {
919  m_t << "inout";
920  }
921  m_t << "\"";
922  }
923  m_t << ">";
924  if (param->kind()==DocNode::Kind_Word)
925  {
926  visit((DocWord*)param);
927  }
928  else if (param->kind()==DocNode::Kind_LinkedWord)
929  {
930  visit((DocLinkedWord*)param);
931  }
932  m_t << "</parametername>" << endl;
933  }
934  m_t << "</parameternamelist>" << endl;
935  m_t << "<parameterdescription>" << endl;
936 }
void visit(DocWord *)
const QList< DocNode > & paramTypes()
Definition: docparser.h:1170
uint count() const
Definition: qlist.h:66
type * current() const
Definition: qlist.h:146
FTextStream & m_t
DocParamSect::Direction direction() const
Definition: docparser.h:1172
const QList< DocNode > & parameters()
Definition: docparser.h:1169
static QCString type
Definition: declinfo.cpp:672
QTextStream & endl(QTextStream &s)
void XmlDocVisitor::visitPre ( DocXRefItem x)
virtual

Implements DocVisitor.

Definition at line 945 of file xmldocvisitor.cpp.

946 {
947  if (m_hide) return;
948  if (x->title().isEmpty()) return;
949  m_t << "<xrefsect id=\"";
950  m_t << x->file() << "_1" << x->anchor();
951  m_t << "\">";
952  m_t << "<xreftitle>";
953  filter(x->title());
954  m_t << "</xreftitle>";
955  m_t << "<xrefdescription>";
956 }
bool isEmpty() const
Definition: qcstring.h:189
void filter(const char *str)
QCString anchor() const
Definition: docparser.h:670
FTextStream & m_t
QCString file() const
Definition: docparser.h:669
QCString title() const
Definition: docparser.h:671
void XmlDocVisitor::visitPre ( DocInternalRef ref)
virtual

Implements DocVisitor.

Definition at line 966 of file xmldocvisitor.cpp.

967 {
968  if (m_hide) return;
969  startLink(0,ref->file(),ref->anchor());
970 }
QCString anchor() const
Definition: docparser.h:859
QCString file() const
Definition: docparser.h:857
void startLink(const QCString &ref, const QCString &file, const QCString &anchor)
void XmlDocVisitor::visitPre ( DocCopy c)
virtual

Implements DocVisitor.

Definition at line 979 of file xmldocvisitor.cpp.

980 {
981  if (m_hide) return;
982  m_t << "<copydoc link=\"" << convertToXML(c->link()) << "\">";
983 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
FTextStream & m_t
QCString link() const
Definition: docparser.h:605
void XmlDocVisitor::visitPre ( DocText )
virtual

Implements DocVisitor.

Definition at line 991 of file xmldocvisitor.cpp.

992 {
993 }
void XmlDocVisitor::visitPre ( DocHtmlBlockQuote )
virtual

Implements DocVisitor.

Definition at line 999 of file xmldocvisitor.cpp.

1000 {
1001  if (m_hide) return;
1002  m_t << "<blockquote>";
1003 }
FTextStream & m_t
void XmlDocVisitor::visitPre ( DocVhdlFlow )
virtual

Implements DocVisitor.

Definition at line 1011 of file xmldocvisitor.cpp.

1012 {
1013 }
void XmlDocVisitor::visitPre ( DocParBlock )
virtual

Implements DocVisitor.

Definition at line 1019 of file xmldocvisitor.cpp.

1020 {
1021  if (m_hide) return;
1022  m_t << "<parblock>";
1023 }
FTextStream & m_t

Member Data Documentation

CodeOutputInterface& XmlDocVisitor::m_ci
private

Definition at line 162 of file xmldocvisitor.h.

QStack<bool> XmlDocVisitor::m_enabled
private

Definition at line 165 of file xmldocvisitor.h.

bool XmlDocVisitor::m_hide
private

Definition at line 164 of file xmldocvisitor.h.

bool XmlDocVisitor::m_insidePre
private

Definition at line 163 of file xmldocvisitor.h.

QCString XmlDocVisitor::m_langExt
private

Definition at line 166 of file xmldocvisitor.h.

FTextStream& XmlDocVisitor::m_t
private

Definition at line 161 of file xmldocvisitor.h.


The documentation for this class was generated from the following files: