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

#include <printdocvisitor.h>

Inheritance diagram for PrintDocVisitor:
DocVisitor

Public Member Functions

 PrintDocVisitor ()
 
void visit (DocWord *w)
 
void visit (DocLinkedWord *w)
 
void visit (DocWhiteSpace *w)
 
void visit (DocSymbol *s)
 
void visit (DocURL *u)
 
void visit (DocLineBreak *)
 
void visit (DocHorRuler *)
 
void visit (DocStyleChange *s)
 
void visit (DocVerbatim *s)
 
void visit (DocAnchor *a)
 
void visit (DocInclude *inc)
 
void visit (DocIncOperator *op)
 
void visit (DocFormula *f)
 
void visit (DocIndexEntry *i)
 
void visit (DocSimpleSectSep *)
 
void visit (DocCite *cite)
 
void visitPre (DocAutoList *l)
 
void visitPost (DocAutoList *l)
 
void visitPre (DocAutoListItem *)
 
void visitPost (DocAutoListItem *)
 
void visitPre (DocPara *)
 
void visitPost (DocPara *)
 
void visitPre (DocRoot *)
 
void visitPost (DocRoot *)
 
void visitPre (DocSimpleSect *s)
 
void visitPost (DocSimpleSect *)
 
void visitPre (DocTitle *)
 
void visitPost (DocTitle *)
 
void visitPre (DocSimpleList *)
 
void visitPost (DocSimpleList *)
 
void visitPre (DocSimpleListItem *)
 
void visitPost (DocSimpleListItem *)
 
void visitPre (DocSection *s)
 
void visitPost (DocSection *s)
 
void visitPre (DocHtmlList *s)
 
void visitPost (DocHtmlList *s)
 
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 *t)
 
void visitPost (DocHtmlTable *)
 
void visitPre (DocHtmlRow *)
 
void visitPost (DocHtmlRow *)
 
void visitPre (DocHtmlCell *c)
 
void visitPost (DocHtmlCell *c)
 
void visitPre (DocHtmlCaption *)
 
void visitPost (DocHtmlCaption *)
 
void visitPre (DocInternal *)
 
void visitPost (DocInternal *)
 
void visitPre (DocHRef *href)
 
void visitPost (DocHRef *)
 
void visitPre (DocHtmlHeader *header)
 
void visitPost (DocHtmlHeader *header)
 
void visitPre (DocImage *img)
 
void visitPost (DocImage *)
 
void visitPre (DocDotFile *df)
 
void visitPost (DocDotFile *)
 
void visitPre (DocMscFile *df)
 
void visitPost (DocMscFile *)
 
void visitPre (DocDiaFile *df)
 
void visitPost (DocDiaFile *)
 
void visitPre (DocLink *lnk)
 
void visitPost (DocLink *)
 
void visitPre (DocRef *ref)
 
void visitPost (DocRef *)
 
void visitPre (DocSecRefItem *ref)
 
void visitPost (DocSecRefItem *)
 
void visitPre (DocSecRefList *)
 
void visitPost (DocSecRefList *)
 
void visitPre (DocParamList *pl)
 
void visitPost (DocParamList *)
 
void visitPre (DocParamSect *ps)
 
void visitPost (DocParamSect *)
 
void visitPre (DocXRefItem *x)
 
void visitPost (DocXRefItem *)
 
void visitPre (DocInternalRef *r)
 
void visitPost (DocInternalRef *)
 
void visitPre (DocCopy *c)
 
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 indent ()
 
void indent_leaf ()
 
void indent_pre ()
 
void indent_post ()
 

Private Attributes

int m_indent
 
bool m_needsEnter
 
bool m_insidePre
 

Detailed Description

Concrete visitor implementation for pretty printing

Definition at line 27 of file printdocvisitor.h.

Constructor & Destructor Documentation

PrintDocVisitor::PrintDocVisitor ( )
inline

Definition at line 30 of file printdocvisitor.h.

const bool FALSE
Definition: qglobal.h:370
const int DocVisitor_Other
Definition: docvisitor.h:29
DocVisitor(int id)
Definition: docvisitor.h:94

Member Function Documentation

void PrintDocVisitor::indent ( )
inlineprivate

Definition at line 701 of file printdocvisitor.h.

702  {
703  if (m_needsEnter) printf("\n");
704  for (int i=0;i<m_indent;i++) printf(".");
706  }
const bool FALSE
Definition: qglobal.h:370
void PrintDocVisitor::indent_leaf ( )
inlineprivate

Definition at line 707 of file printdocvisitor.h.

708  {
709  if (!m_needsEnter) indent();
711  }
const bool TRUE
Definition: qglobal.h:371
void PrintDocVisitor::indent_post ( )
inlineprivate

Definition at line 717 of file printdocvisitor.h.

718  {
719  m_indent--;
720  indent();
721  }
void PrintDocVisitor::indent_pre ( )
inlineprivate

Definition at line 712 of file printdocvisitor.h.

713  {
714  indent();
715  m_indent++;
716  }
void PrintDocVisitor::visit ( DocWord w)
inlinevirtual

Implements DocVisitor.

Definition at line 35 of file printdocvisitor.h.

36  {
37  indent_leaf();
38  printf("%s",w->word().data());
39  }
QCString word() const
Definition: docparser.h:199
const char * data() const
Definition: qcstring.h:207
void PrintDocVisitor::visit ( DocLinkedWord w)
inlinevirtual

Implements DocVisitor.

Definition at line 40 of file printdocvisitor.h.

41  {
42  indent_leaf();
43  printf("%s",w->word().data());
44  }
const char * data() const
Definition: qcstring.h:207
QCString word() const
Definition: docparser.h:215
void PrintDocVisitor::visit ( DocWhiteSpace w)
inlinevirtual

Implements DocVisitor.

Definition at line 45 of file printdocvisitor.h.

46  {
47  indent_leaf();
48  if (m_insidePre)
49  {
50  printf("%s",w->chars().data());
51  }
52  else
53  {
54  printf(" ");
55  }
56  }
const char * data() const
Definition: qcstring.h:207
QCString chars() const
Definition: docparser.h:434
void PrintDocVisitor::visit ( DocSymbol s)
inlinevirtual

Implements DocVisitor.

Definition at line 57 of file printdocvisitor.h.

58  {
59  indent_leaf();
60  const char *res = HtmlEntityMapper::instance()->utf8(s->symbol(),TRUE);
61  if (res)
62  {
63  printf("%s",res);
64  }
65  else
66  {
67  printf("print: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
68  }
69  }
static HtmlEntityMapper * instance()
Definition: htmlentity.cpp:341
SymType symbol() const
Definition: docparser.h:418
const bool TRUE
Definition: qglobal.h:371
const char * utf8(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the UTF8 code of the HTML entity.
Definition: htmlentity.cpp:366
void PrintDocVisitor::visit ( DocURL u)
inlinevirtual

Implements DocVisitor.

Definition at line 70 of file printdocvisitor.h.

71  {
72  indent_leaf();
73  printf("%s",u->url().data());
74  }
QCString url() const
Definition: docparser.h:239
const char * data() const
Definition: qcstring.h:207
void PrintDocVisitor::visit ( DocLineBreak )
inlinevirtual

Implements DocVisitor.

Definition at line 75 of file printdocvisitor.h.

76  {
77  indent_leaf();
78  printf("<br/>");
79  }
void PrintDocVisitor::visit ( DocHorRuler )
inlinevirtual

Implements DocVisitor.

Definition at line 80 of file printdocvisitor.h.

81  {
82  indent_leaf();
83  printf("<hr>");
84  }
void PrintDocVisitor::visit ( DocStyleChange s)
inlinevirtual

Implements DocVisitor.

Definition at line 85 of file printdocvisitor.h.

86  {
87  indent_leaf();
88  switch (s->style())
89  {
91  if (s->enable()) printf("<bold>"); else printf("</bold>");
92  break;
94  if (s->enable()) printf("<italic>"); else printf("</italic>");
95  break;
97  if (s->enable()) printf("<code>"); else printf("</code>");
98  break;
100  if (s->enable()) printf("<sub>"); else printf("</sub>");
101  break;
103  if (s->enable()) printf("<sup>"); else printf("</sup>");
104  break;
106  if (s->enable()) printf("<center>"); else printf("</center>");
107  break;
109  if (s->enable()) printf("<small>"); else printf("</small>");
110  break;
112  if (s->enable()) printf("<pre>"); else printf("</pre>");
113  break;
114  case DocStyleChange::Div:
115  if (s->enable()) printf("<div>"); else printf("</div>");
116  break;
118  if (s->enable()) printf("<span>"); else printf("</span>");
119  break;
120  }
121  }
Style style() const
Definition: docparser.h:329
bool enable() const
Definition: docparser.h:331
void PrintDocVisitor::visit ( DocVerbatim s)
inlinevirtual

Implements DocVisitor.

Definition at line 122 of file printdocvisitor.h.

123  {
124  indent_leaf();
125  switch(s->type())
126  {
127  case DocVerbatim::Code: printf("<code>"); break;
128  case DocVerbatim::Verbatim: printf("<verbatim>"); break;
129  case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break;
130  case DocVerbatim::RtfOnly: printf("<rtfonly>"); break;
131  case DocVerbatim::ManOnly: printf("<manonly>"); break;
132  case DocVerbatim::LatexOnly: printf("<latexonly>"); break;
133  case DocVerbatim::XmlOnly: printf("<xmlonly>"); break;
134  case DocVerbatim::DocbookOnly: printf("<docbookonly>"); break;
135  case DocVerbatim::Dot: printf("<dot>"); break;
136  case DocVerbatim::Msc: printf("<msc>"); break;
137  case DocVerbatim::PlantUML: printf("<plantuml>"); break;
138  }
139  printf("%s",s->text().data());
140  switch(s->type())
141  {
142  case DocVerbatim::Code: printf("</code>"); break;
143  case DocVerbatim::Verbatim: printf("</verbatim>"); break;
144  case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break;
145  case DocVerbatim::RtfOnly: printf("</rtfonly>"); break;
146  case DocVerbatim::ManOnly: printf("</manonly>"); break;
147  case DocVerbatim::LatexOnly: printf("</latexonly>"); break;
148  case DocVerbatim::XmlOnly: printf("</xmlonly>"); break;
149  case DocVerbatim::DocbookOnly: printf("</docbookonly>"); break;
150  case DocVerbatim::Dot: printf("</dot>"); break;
151  case DocVerbatim::Msc: printf("</msc>"); break;
152  case DocVerbatim::PlantUML: printf("</plantuml>"); break;
153  }
154  }
QCString text() const
Definition: docparser.h:450
const char * data() const
Definition: qcstring.h:207
Type type() const
Definition: docparser.h:449
void PrintDocVisitor::visit ( DocAnchor a)
inlinevirtual

Implements DocVisitor.

Definition at line 155 of file printdocvisitor.h.

156  {
157  indent_leaf();
158  printf("<anchor name=\"%s\"/>",a->anchor().data());
159  }
QCString anchor() const
Definition: docparser.h:277
const char * data() const
Definition: qcstring.h:207
void PrintDocVisitor::visit ( DocInclude inc)
inlinevirtual

Implements DocVisitor.

Definition at line 160 of file printdocvisitor.h.

161  {
162  indent_leaf();
163  printf("<include file=\"%s\" type=\"",inc->file().data());
164  switch(inc->type())
165  {
166  case DocInclude::Include: printf("include"); break;
167  case DocInclude::IncWithLines: printf("incwithlines"); break;
168  case DocInclude::DontInclude: printf("dontinclude"); break;
169  case DocInclude::HtmlInclude: printf("htmlinclude"); break;
170  case DocInclude::LatexInclude: printf("latexinclude"); break;
171  case DocInclude::VerbInclude: printf("verbinclude"); break;
172  case DocInclude::Snippet: printf("snippet"); break;
173  }
174  printf("\"/>");
175  }
Type type() const
Definition: docparser.h:502
const char * data() const
Definition: qcstring.h:207
QCString file() const
Definition: docparser.h:495
void PrintDocVisitor::visit ( DocIncOperator op)
inlinevirtual

Implements DocVisitor.

Definition at line 176 of file printdocvisitor.h.

177  {
178  indent_leaf();
179  printf("<incoperator pattern=\"%s\" type=\"",op->pattern().data());
180  switch(op->type())
181  {
182  case DocIncOperator::Line: printf("line"); break;
183  case DocIncOperator::Skip: printf("skip"); break;
184  case DocIncOperator::SkipLine: printf("skipline"); break;
185  case DocIncOperator::Until: printf("until"); break;
186  }
187  printf("\"/>");
188  }
Type type() const
Definition: docparser.h:532
QCString pattern() const
Definition: docparser.h:534
const char * data() const
Definition: qcstring.h:207
void PrintDocVisitor::visit ( DocFormula f)
inlinevirtual

Implements DocVisitor.

Definition at line 189 of file printdocvisitor.h.

190  {
191  indent_leaf();
192  printf("<formula name=%s text=%s/>",f->name().data(),f->text().data());
193  }
QCString text() const
Definition: docparser.h:563
const char * data() const
Definition: qcstring.h:207
QCString name() const
Definition: docparser.h:562
void PrintDocVisitor::visit ( DocIndexEntry i)
inlinevirtual

Implements DocVisitor.

Definition at line 194 of file printdocvisitor.h.

195  {
196  indent_leaf();
197  printf("<indexentry>%s</indexentry\n",i->entry().data());
198  }
const char * data() const
Definition: qcstring.h:207
QCString entry() const
Definition: docparser.h:586
void PrintDocVisitor::visit ( DocSimpleSectSep )
inlinevirtual

Implements DocVisitor.

Definition at line 199 of file printdocvisitor.h.

200  {
201  indent_leaf();
202  printf("<simplesectsep/>");
203  }
void PrintDocVisitor::visit ( DocCite cite)
inlinevirtual

Implements DocVisitor.

Definition at line 204 of file printdocvisitor.h.

205  {
206  indent_leaf();
207  printf("<cite ref=\"%s\" file=\"%s\" "
208  "anchor=\"%s\" text=\"%s\""
209  "/>\n",
210  cite->ref().data(),cite->file().data(),cite->anchor().data(),
211  cite->text().data());
212  }
QCString text() const
Definition: docparser.h:296
QCString ref() const
Definition: docparser.h:294
QCString file() const
Definition: docparser.h:292
const char * data() const
Definition: qcstring.h:207
QCString anchor() const
Definition: docparser.h:295
void PrintDocVisitor::visitPost ( DocAutoList l)
inlinevirtual

Implements DocVisitor.

Definition at line 228 of file printdocvisitor.h.

229  {
230  indent_post();
231  if (l->isEnumList())
232  {
233  printf("</ol>\n");
234  }
235  else
236  {
237  printf("</ul>\n");
238  }
239  }
bool isEnumList() const
Definition: docparser.h:621
void PrintDocVisitor::visitPost ( DocAutoListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 245 of file printdocvisitor.h.

246  {
247  indent_post();
248  printf("</li>\n");
249  }
void PrintDocVisitor::visitPost ( DocPara )
inlinevirtual

Implements DocVisitor.

Definition at line 255 of file printdocvisitor.h.

256  {
257  indent_post();
258  printf("</para>\n");
259  }
void PrintDocVisitor::visitPost ( DocRoot )
inlinevirtual

Implements DocVisitor.

Definition at line 265 of file printdocvisitor.h.

266  {
267  indent_post();
268  printf("</root>\n");
269  }
void PrintDocVisitor::visitPost ( DocSimpleSect )
inlinevirtual

Implements DocVisitor.

Definition at line 297 of file printdocvisitor.h.

298  {
299  indent_post();
300  printf("</simplesect>\n");
301  }
void PrintDocVisitor::visitPost ( DocTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 307 of file printdocvisitor.h.

308  {
309  indent_post();
310  printf("</title>\n");
311  }
void PrintDocVisitor::visitPost ( DocSimpleList )
inlinevirtual

Implements DocVisitor.

Definition at line 317 of file printdocvisitor.h.

318  {
319  indent_post();
320  printf("</ul>\n");
321  }
void PrintDocVisitor::visitPost ( DocSimpleListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 327 of file printdocvisitor.h.

328  {
329  indent_post();
330  printf("</li>\n");
331  }
void PrintDocVisitor::visitPost ( DocSection s)
inlinevirtual

Implements DocVisitor.

Definition at line 337 of file printdocvisitor.h.

338  {
339  indent_post();
340  printf("</sect%d>\n",s->level());
341  }
int level() const
Definition: docparser.h:942
void PrintDocVisitor::visitPost ( DocHtmlList s)
inlinevirtual

Implements DocVisitor.

Definition at line 347 of file printdocvisitor.h.

348  {
349  indent_post();
350  if (s->type()==DocHtmlList::Ordered) printf("</ol>\n"); else printf("</ul>\n");
351  }
Type type() const
Definition: docparser.h:1034
void PrintDocVisitor::visitPost ( DocHtmlListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 357 of file printdocvisitor.h.

358  {
359  indent_post();
360  printf("</li>\n");
361  }
void PrintDocVisitor::visitPost ( DocHtmlDescList )
inlinevirtual

Implements DocVisitor.

Definition at line 379 of file printdocvisitor.h.

380  {
381  indent_post();
382  printf("</dl>\n");
383  }
void PrintDocVisitor::visitPost ( DocHtmlDescTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 389 of file printdocvisitor.h.

390  {
391  indent_post();
392  printf("</dt>\n");
393  }
void PrintDocVisitor::visitPost ( DocHtmlDescData )
inlinevirtual

Implements DocVisitor.

Definition at line 399 of file printdocvisitor.h.

400  {
401  indent_post();
402  printf("</dd>\n");
403  }
void PrintDocVisitor::visitPost ( DocHtmlTable )
inlinevirtual

Implements DocVisitor.

Definition at line 410 of file printdocvisitor.h.

411  {
412  indent_post();
413  printf("</table>\n");
414  }
void PrintDocVisitor::visitPost ( DocHtmlRow )
inlinevirtual

Implements DocVisitor.

Definition at line 420 of file printdocvisitor.h.

421  {
422  indent_post();
423  printf("</tr>\n");
424  }
void PrintDocVisitor::visitPost ( DocHtmlCell c)
inlinevirtual

Implements DocVisitor.

Definition at line 430 of file printdocvisitor.h.

431  {
432  indent_post();
433  printf("</t%c>\n",c->isHeading()?'h':'d');
434  }
bool isHeading() const
Definition: docparser.h:1260
void PrintDocVisitor::visitPost ( DocHtmlCaption )
inlinevirtual

Implements DocVisitor.

Definition at line 440 of file printdocvisitor.h.

441  {
442  indent_post();
443  printf("</caption>\n");
444  }
void PrintDocVisitor::visitPost ( DocInternal )
inlinevirtual

Implements DocVisitor.

Definition at line 450 of file printdocvisitor.h.

451  {
452  indent_post();
453  printf("</internal>\n");
454  }
void PrintDocVisitor::visitPost ( DocHRef )
inlinevirtual

Implements DocVisitor.

Definition at line 460 of file printdocvisitor.h.

461  {
462  indent_post();
463  printf("</a>\n");
464  }
void PrintDocVisitor::visitPost ( DocHtmlHeader header)
inlinevirtual

Implements DocVisitor.

Definition at line 470 of file printdocvisitor.h.

471  {
472  indent_post();
473  printf("</h%d>\n",header->level());
474  }
int level() const
Definition: docparser.h:894
void PrintDocVisitor::visitPost ( DocImage )
inlinevirtual

Implements DocVisitor.

Definition at line 488 of file printdocvisitor.h.

489  {
490  indent_post();
491  printf("</image>\n");
492  }
void PrintDocVisitor::visitPost ( DocDotFile )
inlinevirtual

Implements DocVisitor.

Definition at line 498 of file printdocvisitor.h.

499  {
500  indent_post();
501  printf("</dotfile>\n");
502  }
void PrintDocVisitor::visitPost ( DocMscFile )
inlinevirtual

Implements DocVisitor.

Definition at line 508 of file printdocvisitor.h.

509  {
510  indent_post();
511  printf("</mscfile>\n");
512  }
void PrintDocVisitor::visitPost ( DocDiaFile )
inlinevirtual

Implements DocVisitor.

Definition at line 518 of file printdocvisitor.h.

519  {
520  indent_post();
521  printf("</diafile>\n");
522  }
void PrintDocVisitor::visitPost ( DocLink )
inlinevirtual

Implements DocVisitor.

Definition at line 529 of file printdocvisitor.h.

530  {
531  indent_post();
532  printf("</link>\n");
533  }
void PrintDocVisitor::visitPost ( DocRef )
inlinevirtual

Implements DocVisitor.

Definition at line 545 of file printdocvisitor.h.

546  {
547  indent_post();
548  printf("</ref>\n");
549  }
void PrintDocVisitor::visitPost ( DocSecRefItem )
inlinevirtual

Implements DocVisitor.

Definition at line 555 of file printdocvisitor.h.

556  {
557  indent_post();
558  printf("</secrefitem>\n");
559  }
void PrintDocVisitor::visitPost ( DocSecRefList )
inlinevirtual

Implements DocVisitor.

Definition at line 565 of file printdocvisitor.h.

566  {
567  indent_post();
568  printf("</secreflist>\n");
569  }
void PrintDocVisitor::visitPost ( DocParamList )
inlinevirtual

Implements DocVisitor.

Definition at line 603 of file printdocvisitor.h.

604  {
605  indent_post();
606  printf("</parameters>\n");
607  }
void PrintDocVisitor::visitPost ( DocParamSect )
inlinevirtual

Implements DocVisitor.

Definition at line 622 of file printdocvisitor.h.

623  {
624  indent_post();
625  printf("</paramsect>\n");
626  }
void PrintDocVisitor::visitPost ( DocXRefItem )
inlinevirtual

Implements DocVisitor.

Definition at line 633 of file printdocvisitor.h.

634  {
635  indent_post();
636  printf("<xrefitem/>\n");
637  }
void PrintDocVisitor::visitPost ( DocInternalRef )
inlinevirtual

Implements DocVisitor.

Definition at line 643 of file printdocvisitor.h.

644  {
645  indent_post();
646  printf("</internalref>\n");
647  }
void PrintDocVisitor::visitPost ( DocCopy )
inlinevirtual

Implements DocVisitor.

Definition at line 653 of file printdocvisitor.h.

654  {
655  indent_post();
656  printf("</copy>\n");
657  }
void PrintDocVisitor::visitPost ( DocText )
inlinevirtual

Implements DocVisitor.

Definition at line 663 of file printdocvisitor.h.

664  {
665  indent_post();
666  printf("</text>\n");
667  }
void PrintDocVisitor::visitPost ( DocHtmlBlockQuote )
inlinevirtual

Implements DocVisitor.

Definition at line 673 of file printdocvisitor.h.

674  {
675  indent_post();
676  printf("</blockquote>\n");
677  }
void PrintDocVisitor::visitPost ( DocVhdlFlow )
inlinevirtual

Implements DocVisitor.

Definition at line 683 of file printdocvisitor.h.

684  {
685  indent_post();
686  printf("</vhdlflow>\n");
687  }
void PrintDocVisitor::visitPost ( DocParBlock )
inlinevirtual

Implements DocVisitor.

Definition at line 693 of file printdocvisitor.h.

694  {
695  indent_post();
696  printf("</parblock>\n");
697  }
void PrintDocVisitor::visitPre ( DocAutoList l)
inlinevirtual

Implements DocVisitor.

Definition at line 216 of file printdocvisitor.h.

217  {
218  indent_pre();
219  if (l->isEnumList())
220  {
221  printf("<ol>\n");
222  }
223  else
224  {
225  printf("<ul>\n");
226  }
227  }
bool isEnumList() const
Definition: docparser.h:621
void PrintDocVisitor::visitPre ( DocAutoListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 240 of file printdocvisitor.h.

241  {
242  indent_pre();
243  printf("<li>\n");
244  }
void PrintDocVisitor::visitPre ( DocPara )
inlinevirtual

Implements DocVisitor.

Definition at line 250 of file printdocvisitor.h.

251  {
252  indent_pre();
253  printf("<para>\n");
254  }
void PrintDocVisitor::visitPre ( DocRoot )
inlinevirtual

Implements DocVisitor.

Definition at line 260 of file printdocvisitor.h.

261  {
262  indent_pre();
263  printf("<root>\n");
264  }
void PrintDocVisitor::visitPre ( DocSimpleSect s)
inlinevirtual

Implements DocVisitor.

Definition at line 270 of file printdocvisitor.h.

271  {
272  indent_pre();
273  printf("<simplesect type=");
274  switch(s->type())
275  {
276  case DocSimpleSect::See: printf("see"); break;
277  case DocSimpleSect::Return: printf("return"); break;
278  case DocSimpleSect::Author: printf("author"); break;
279  case DocSimpleSect::Authors: printf("authors"); break;
280  case DocSimpleSect::Version: printf("version"); break;
281  case DocSimpleSect::Since: printf("since"); break;
282  case DocSimpleSect::Date: printf("date"); break;
283  case DocSimpleSect::Note: printf("note"); break;
284  case DocSimpleSect::Warning: printf("warning"); break;
285  case DocSimpleSect::Pre: printf("pre"); break;
286  case DocSimpleSect::Post: printf("post"); break;
287  case DocSimpleSect::Copyright: printf("copyright"); break;
288  case DocSimpleSect::Invar: printf("invar"); break;
289  case DocSimpleSect::Remark: printf("remark"); break;
290  case DocSimpleSect::Attention: printf("attention"); break;
291  case DocSimpleSect::User: printf("user"); break;
292  case DocSimpleSect::Rcs: printf("rcs"); break;
293  case DocSimpleSect::Unknown: printf("unknown"); break;
294  }
295  printf(">\n");
296  }
Type type() const
Definition: docparser.h:1057
void PrintDocVisitor::visitPre ( DocTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 302 of file printdocvisitor.h.

303  {
304  indent_pre();
305  printf("<title>\n");
306  }
void PrintDocVisitor::visitPre ( DocSimpleList )
inlinevirtual

Implements DocVisitor.

Definition at line 312 of file printdocvisitor.h.

313  {
314  indent_pre();
315  printf("<ul>\n");
316  }
void PrintDocVisitor::visitPre ( DocSimpleListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 322 of file printdocvisitor.h.

323  {
324  indent_pre();
325  printf("<li>\n");
326  }
void PrintDocVisitor::visitPre ( DocSection s)
inlinevirtual

Implements DocVisitor.

Definition at line 332 of file printdocvisitor.h.

333  {
334  indent_pre();
335  printf("<sect%d>\n",s->level());
336  }
int level() const
Definition: docparser.h:942
void PrintDocVisitor::visitPre ( DocHtmlList s)
inlinevirtual

Implements DocVisitor.

Definition at line 342 of file printdocvisitor.h.

343  {
344  indent_pre();
345  if (s->type()==DocHtmlList::Ordered) printf("<ol>\n"); else printf("<ul>\n");
346  }
Type type() const
Definition: docparser.h:1034
void PrintDocVisitor::visitPre ( DocHtmlListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 352 of file printdocvisitor.h.

353  {
354  indent_pre();
355  printf("<li>\n");
356  }
void PrintDocVisitor::visitPre ( DocHtmlDescList )
inlinevirtual

Implements DocVisitor.

Definition at line 374 of file printdocvisitor.h.

375  {
376  indent_pre();
377  printf("<dl>\n");
378  }
void PrintDocVisitor::visitPre ( DocHtmlDescTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 384 of file printdocvisitor.h.

385  {
386  indent_pre();
387  printf("<dt>\n");
388  }
void PrintDocVisitor::visitPre ( DocHtmlDescData )
inlinevirtual

Implements DocVisitor.

Definition at line 394 of file printdocvisitor.h.

395  {
396  indent_pre();
397  printf("<dd>\n");
398  }
void PrintDocVisitor::visitPre ( DocHtmlTable t)
inlinevirtual

Implements DocVisitor.

Definition at line 404 of file printdocvisitor.h.

405  {
406  indent_pre();
407  printf("<table rows=\"%d\" cols=\"%d\">\n",
408  t->numRows(),t->numColumns());
409  }
uint numRows() const
Definition: docparser.h:1352
uint numColumns() const
Definition: docparser.h:1357
void PrintDocVisitor::visitPre ( DocHtmlRow )
inlinevirtual

Implements DocVisitor.

Definition at line 415 of file printdocvisitor.h.

416  {
417  indent_pre();
418  printf("<tr>\n");
419  }
void PrintDocVisitor::visitPre ( DocHtmlCell c)
inlinevirtual

Implements DocVisitor.

Definition at line 425 of file printdocvisitor.h.

426  {
427  indent_pre();
428  printf("<t%c>\n",c->isHeading()?'h':'d');
429  }
bool isHeading() const
Definition: docparser.h:1260
void PrintDocVisitor::visitPre ( DocHtmlCaption )
inlinevirtual

Implements DocVisitor.

Definition at line 435 of file printdocvisitor.h.

436  {
437  indent_pre();
438  printf("<caption>\n");
439  }
void PrintDocVisitor::visitPre ( DocInternal )
inlinevirtual

Implements DocVisitor.

Definition at line 445 of file printdocvisitor.h.

446  {
447  indent_pre();
448  printf("<internal>\n");
449  }
void PrintDocVisitor::visitPre ( DocHRef href)
inlinevirtual

Implements DocVisitor.

Definition at line 455 of file printdocvisitor.h.

456  {
457  indent_pre();
458  printf("<a url=\"%s\">\n",href->url().data());
459  }
const char * data() const
Definition: qcstring.h:207
QCString url() const
Definition: docparser.h:876
void PrintDocVisitor::visitPre ( DocHtmlHeader header)
inlinevirtual

Implements DocVisitor.

Definition at line 465 of file printdocvisitor.h.

466  {
467  indent_pre();
468  printf("<h%d>\n",header->level());
469  }
int level() const
Definition: docparser.h:894
void PrintDocVisitor::visitPre ( DocImage img)
inlinevirtual

Implements DocVisitor.

Definition at line 475 of file printdocvisitor.h.

476  {
477  indent_pre();
478  printf("<image src=\"%s\" type=\"",img->name().data());
479  switch(img->type())
480  {
481  case DocImage::Html: printf("html"); break;
482  case DocImage::Latex: printf("latex"); break;
483  case DocImage::Rtf: printf("rtf"); break;
484  case DocImage::DocBook: printf("docbook"); break;
485  }
486  printf("\" %s %s>\n",img->width().data(),img->height().data());
487  }
QCString name() const
Definition: docparser.h:695
QCString width() const
Definition: docparser.h:697
QCString height() const
Definition: docparser.h:698
const char * data() const
Definition: qcstring.h:207
Type type() const
Definition: docparser.h:694
void PrintDocVisitor::visitPre ( DocDotFile df)
inlinevirtual

Implements DocVisitor.

Definition at line 493 of file printdocvisitor.h.

494  {
495  indent_pre();
496  printf("<dotfile src=\"%s\">\n",df->name().data());
497  }
QCString name() const
Definition: docparser.h:722
const char * data() const
Definition: qcstring.h:207
void PrintDocVisitor::visitPre ( DocMscFile df)
inlinevirtual

Implements DocVisitor.

Definition at line 503 of file printdocvisitor.h.

504  {
505  indent_pre();
506  printf("<mscfile src=\"%s\">\n",df->name().data());
507  }
QCString name() const
Definition: docparser.h:746
const char * data() const
Definition: qcstring.h:207
void PrintDocVisitor::visitPre ( DocDiaFile df)
inlinevirtual

Implements DocVisitor.

Definition at line 513 of file printdocvisitor.h.

514  {
515  indent_pre();
516  printf("<diafile src=\"%s\">\n",df->name().data());
517  }
QCString name() const
Definition: docparser.h:770
const char * data() const
Definition: qcstring.h:207
void PrintDocVisitor::visitPre ( DocLink lnk)
inlinevirtual

Implements DocVisitor.

Definition at line 523 of file printdocvisitor.h.

524  {
525  indent_pre();
526  printf("<link ref=\"%s\" file=\"%s\" anchor=\"%s\">\n",
527  lnk->ref().data(),lnk->file().data(),lnk->anchor().data());
528  }
const char * data() const
Definition: qcstring.h:207
void PrintDocVisitor::visitPre ( DocRef ref)
inlinevirtual

Implements DocVisitor.

Definition at line 534 of file printdocvisitor.h.

535  {
536  indent_pre();
537  printf("<ref ref=\"%s\" file=\"%s\" "
538  "anchor=\"%s\" targetTitle=\"%s\""
539  " hasLinkText=\"%s\" refToAnchor=\"%s\" refToSection=\"%s\" refToTable=\"%s\">\n",
540  ref->ref().data(),ref->file().data(),ref->anchor().data(),
541  ref->targetTitle().data(),ref->hasLinkText()?"yes":"no",
542  ref->refToAnchor()?"yes":"no", ref->refToSection()?"yes":"no",
543  ref->refToTable()?"yes":"no");
544  }
bool refToSection() const
Definition: docparser.h:834
QCString anchor() const
Definition: docparser.h:830
bool refToAnchor() const
Definition: docparser.h:833
QCString file() const
Definition: docparser.h:827
QCString targetTitle() const
Definition: docparser.h:831
QCString ref() const
Definition: docparser.h:829
const char * data() const
Definition: qcstring.h:207
bool hasLinkText() const
Definition: docparser.h:832
bool refToTable() const
Definition: docparser.h:835
void PrintDocVisitor::visitPre ( DocSecRefItem ref)
inlinevirtual

Implements DocVisitor.

Definition at line 550 of file printdocvisitor.h.

551  {
552  indent_pre();
553  printf("<secrefitem target=\"%s\">\n",ref->target().data());
554  }
const char * data() const
Definition: qcstring.h:207
QCString target() const
Definition: docparser.h:965
void PrintDocVisitor::visitPre ( DocSecRefList )
inlinevirtual

Implements DocVisitor.

Definition at line 560 of file printdocvisitor.h.

561  {
562  indent_pre();
563  printf("<secreflist>\n");
564  }
void PrintDocVisitor::visitPre ( DocParamList pl)
inlinevirtual

Implements DocVisitor.

Definition at line 580 of file printdocvisitor.h.

581  {
582  indent_pre();
583  //QStrListIterator sli(pl->parameters());
585  //const char *s;
586  DocNode *param;
587  printf("<parameters>");
588  for (sli.toFirst();(param=sli.current());++sli)
589  {
590  printf("<param>");
591  if (param->kind()==DocNode::Kind_Word)
592  {
593  visit((DocWord*)param);
594  }
595  else if (param->kind()==DocNode::Kind_LinkedWord)
596  {
597  visit((DocLinkedWord*)param);
598  }
599  printf("</param>");
600  }
601  printf("\n");
602  }
void visit(DocWord *w)
type * current() const
Definition: qlist.h:146
const QList< DocNode > & parameters()
Definition: docparser.h:1169
void PrintDocVisitor::visitPre ( DocParamSect ps)
inlinevirtual

Implements DocVisitor.

Definition at line 608 of file printdocvisitor.h.

609  {
610  indent_pre();
611  printf("<paramsect type=");
612  switch (ps->type())
613  {
614  case DocParamSect::Param: printf("param"); break;
615  case DocParamSect::RetVal: printf("retval"); break;
616  case DocParamSect::Exception: printf("exception"); break;
617  case DocParamSect::TemplateParam: printf("templateparam"); break;
618  case DocParamSect::Unknown: printf("unknown"); break;
619  }
620  printf(">\n");
621  }
Type type() const
Definition: docparser.h:1101
void PrintDocVisitor::visitPre ( DocXRefItem x)
inlinevirtual

Implements DocVisitor.

Definition at line 627 of file printdocvisitor.h.

628  {
629  indent_pre();
630  printf("<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\"/>\n",
631  x->file().data(),x->anchor().data(),x->title().data());
632  }
QCString anchor() const
Definition: docparser.h:670
const char * data() const
Definition: qcstring.h:207
QCString file() const
Definition: docparser.h:669
QCString title() const
Definition: docparser.h:671
void PrintDocVisitor::visitPre ( DocInternalRef r)
inlinevirtual

Implements DocVisitor.

Definition at line 638 of file printdocvisitor.h.

639  {
640  indent_pre();
641  printf("<internalref file=%s anchor=%s>\n",r->file().data(),r->anchor().data());
642  }
QCString anchor() const
Definition: docparser.h:859
QCString file() const
Definition: docparser.h:857
const char * data() const
Definition: qcstring.h:207
void PrintDocVisitor::visitPre ( DocCopy c)
inlinevirtual

Implements DocVisitor.

Definition at line 648 of file printdocvisitor.h.

649  {
650  indent_pre();
651  printf("<copy link=\"%s\">\n",c->link().data());
652  }
const char * data() const
Definition: qcstring.h:207
QCString link() const
Definition: docparser.h:605
void PrintDocVisitor::visitPre ( DocText )
inlinevirtual

Implements DocVisitor.

Definition at line 658 of file printdocvisitor.h.

659  {
660  indent_pre();
661  printf("<text>\n");
662  }
void PrintDocVisitor::visitPre ( DocHtmlBlockQuote )
inlinevirtual

Implements DocVisitor.

Definition at line 668 of file printdocvisitor.h.

669  {
670  indent_pre();
671  printf("<blockquote>\n");
672  }
void PrintDocVisitor::visitPre ( DocVhdlFlow )
inlinevirtual

Implements DocVisitor.

Definition at line 678 of file printdocvisitor.h.

679  {
680  indent_pre();
681  printf("<vhdlflow>\n");
682  }
void PrintDocVisitor::visitPre ( DocParBlock )
inlinevirtual

Implements DocVisitor.

Definition at line 688 of file printdocvisitor.h.

689  {
690  indent_pre();
691  printf("<parblock>\n");
692  }

Member Data Documentation

int PrintDocVisitor::m_indent
private

Definition at line 724 of file printdocvisitor.h.

bool PrintDocVisitor::m_insidePre
private

Definition at line 726 of file printdocvisitor.h.

bool PrintDocVisitor::m_needsEnter
private

Definition at line 725 of file printdocvisitor.h.


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