Doxygen
Loading...
Searching...
No Matches
PrintDocVisitor Class Reference

#include <src/printdocvisitor.h>

Public Member Functions

 PrintDocVisitor ()
 
void operator() (const DocWord &w)
 
void operator() (const DocLinkedWord &w)
 
void operator() (const DocWhiteSpace &w)
 
void operator() (const DocSymbol &s)
 
void operator() (const DocEmoji &s)
 
void operator() (const DocURL &u)
 
void operator() (const DocLineBreak &)
 
void operator() (const DocHorRuler &)
 
void operator() (const DocStyleChange &s)
 
void operator() (const DocVerbatim &s)
 
void operator() (const DocAnchor &a)
 
void operator() (const DocInclude &inc)
 
void operator() (const DocIncOperator &op)
 
void operator() (const DocFormula &f)
 
void operator() (const DocIndexEntry &i)
 
void operator() (const DocSimpleSectSep &)
 
void operator() (const DocCite &cite)
 
void operator() (const DocSeparator &)
 
template<class T>
void visitChildren (const T &t)
 
void operator() (const DocAutoList &l)
 
void operator() (const DocAutoListItem &li)
 
void operator() (const DocPara &p)
 
void operator() (const DocRoot &r)
 
void operator() (const DocSimpleSect &s)
 
void operator() (const DocTitle &t)
 
void operator() (const DocSimpleList &l)
 
void operator() (const DocSimpleListItem &li)
 
void operator() (const DocSection &s)
 
void operator() (const DocHtmlList &s)
 
void operator() (const DocHtmlListItem &li)
 
void operator() (const DocHtmlDescList &l)
 
void operator() (const DocHtmlDescTitle &dt)
 
void operator() (const DocHtmlDescData &dd)
 
void operator() (const DocHtmlTable &t)
 
void operator() (const DocHtmlRow &tr)
 
void operator() (const DocHtmlCell &c)
 
void operator() (const DocHtmlCaption &c)
 
void operator() (const DocInternal &i)
 
void operator() (const DocHRef &href)
 
void operator() (const DocHtmlSummary &summary)
 
void operator() (const DocHtmlDetails &details)
 
void operator() (const DocHtmlHeader &header)
 
void operator() (const DocImage &img)
 
void operator() (const DocDotFile &df)
 
void operator() (const DocMscFile &df)
 
void operator() (const DocDiaFile &df)
 
void operator() (const DocPlantUmlFile &df)
 
void operator() (const DocLink &lnk)
 
void operator() (const DocRef &ref)
 
void operator() (const DocSecRefItem &ref)
 
void operator() (const DocSecRefList &rl)
 
void operator() (const DocParamList &pl)
 
void operator() (const DocParamSect &ps)
 
void operator() (const DocXRefItem &x)
 
void operator() (const DocInternalRef &r)
 
void operator() (const DocText &t)
 
void operator() (const DocHtmlBlockQuote &q)
 
void operator() (const DocVhdlFlow &vf)
 
void operator() (const DocParBlock &pb)
 

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

Visitor implementation for pretty printing

Definition at line 27 of file printdocvisitor.h.

Constructor & Destructor Documentation

◆ PrintDocVisitor()

PrintDocVisitor::PrintDocVisitor ( )
inline

Definition at line 30 of file printdocvisitor.h.

References FALSE, m_indent, m_insidePre, and m_needsEnter.

Member Function Documentation

◆ indent()

void PrintDocVisitor::indent ( )
inlineprivate

Definition at line 737 of file printdocvisitor.h.

738 {
739 if (m_needsEnter) printf("\n");
740 for (int i=0;i<m_indent;i++) printf(".");
742 }

References FALSE, m_indent, and m_needsEnter.

Referenced by indent_leaf(), indent_post(), and indent_pre().

◆ indent_leaf()

void PrintDocVisitor::indent_leaf ( )
inlineprivate

◆ indent_post()

◆ indent_pre()

◆ operator()() [1/58]

void PrintDocVisitor::operator() ( const DocAnchor & a)
inline

Definition at line 192 of file printdocvisitor.h.

193 {
194 indent_leaf();
195 printf("<anchor name=\"%s\"/>",qPrint(a.anchor()));
196 }
QCString anchor() const
Definition docnode.h:231
const char * qPrint(const char *s)
Definition qcstring.h:672

References DocAnchor::anchor(), indent_leaf(), and qPrint().

◆ operator()() [2/58]

void PrintDocVisitor::operator() ( const DocAutoList & l)
inline

Definition at line 275 of file printdocvisitor.h.

276 {
277 indent_pre();
278 if (l.isEnumList())
279 {
280 printf("<ol>\n");
281 }
282 else
283 {
284 printf("<ul>\n");
285 }
286 visitChildren(l);
287 indent_post();
288 if (l.isEnumList())
289 {
290 printf("</ol>\n");
291 }
292 else
293 {
294 printf("</ul>\n");
295 }
296 }
bool isEnumList() const
Definition docnode.h:575
void visitChildren(const T &t)

References indent_post(), indent_pre(), DocAutoList::isEnumList(), and visitChildren().

◆ operator()() [3/58]

void PrintDocVisitor::operator() ( const DocAutoListItem & li)
inline

Definition at line 297 of file printdocvisitor.h.

298 {
299 indent_pre();
300 switch (li.itemNumber())
301 {
302 case DocAutoList::Unchecked: // unchecked
303 printf("<li class=\"unchecked\">\n");
304 break;
305 case DocAutoList::Checked_x: // checked with x
306 case DocAutoList::Checked_X: // checked with X
307 printf("<li class=\"checked\">\n");
308 break;
309 default:
310 printf("<li>\n");
311 break;
312 }
313 visitChildren(li);
314 indent_post();
315 printf("</li>\n");
316 }
int itemNumber() const
Definition docnode.h:593

References DocAutoList::Checked_X, DocAutoList::Checked_x, indent_post(), indent_pre(), DocAutoListItem::itemNumber(), DocAutoList::Unchecked, and visitChildren().

◆ operator()() [4/58]

void PrintDocVisitor::operator() ( const DocCite & cite)
inline

Definition at line 250 of file printdocvisitor.h.

251 {
252 indent_leaf();
253 printf("<cite ref=\"%s\" file=\"%s\" "
254 "anchor=\"%s\" text=\"%s\""
255 "/>\n",
256 qPrint(cite.ref()),qPrint(cite.file()),qPrint(cite.anchor()),
257 qPrint(cite.text()));
258 }
QCString text() const
Definition docnode.h:251
QCString anchor() const
Definition docnode.h:250
QCString ref() const
Definition docnode.h:249
QCString file() const
Definition docnode.h:247

References DocCite::anchor(), DocCite::file(), indent_leaf(), qPrint(), DocCite::ref(), and DocCite::text().

◆ operator()() [5/58]

void PrintDocVisitor::operator() ( const DocDiaFile & df)
inline

Definition at line 596 of file printdocvisitor.h.

597 {
598 indent_pre();
599 printf("<diafile src=\"%s\">\n",qPrint(df.name()));
600 visitChildren(df);
601 indent_post();
602 printf("</diafile>\n");
603 }
QCString name() const
Definition docnode.h:678

References indent_post(), indent_pre(), DocDiagramFileBase::name(), qPrint(), and visitChildren().

◆ operator()() [6/58]

void PrintDocVisitor::operator() ( const DocDotFile & df)
inline

Definition at line 580 of file printdocvisitor.h.

581 {
582 indent_pre();
583 printf("<dotfile src=\"%s\">\n",qPrint(df.name()));
584 visitChildren(df);
585 indent_post();
586 printf("</dotfile>\n");
587 }

References indent_post(), indent_pre(), DocDiagramFileBase::name(), qPrint(), and visitChildren().

◆ operator()() [7/58]

void PrintDocVisitor::operator() ( const DocEmoji & s)
inline

Definition at line 69 of file printdocvisitor.h.

70 {
72 const char *res = EmojiEntityMapper::instance().name(s.index());
73 if (res)
74 {
75 printf("%s",res);
76 }
77 else
78 {
79 printf("print: non supported emoji found: %s\n",qPrint(s.name()));
80 }
81 }
int index() const
Definition docnode.h:340
QCString name() const
Definition docnode.h:339
const char * name(int index) const
Access routine to the name of the Emoji entity.
Definition emoji.cpp:2026
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
Definition emoji.cpp:1978

References indent_leaf(), DocEmoji::index(), EmojiEntityMapper::instance(), DocEmoji::name(), EmojiEntityMapper::name(), and qPrint().

◆ operator()() [8/58]

void PrintDocVisitor::operator() ( const DocFormula & f)
inline

Definition at line 235 of file printdocvisitor.h.

236 {
237 indent_leaf();
238 printf("<formula name=%s text=%s/>",qPrint(f.name()),qPrint(f.text()));
239 }
QCString text() const
Definition docnode.h:528
QCString name() const
Definition docnode.h:527

References indent_leaf(), DocFormula::name(), qPrint(), and DocFormula::text().

◆ operator()() [9/58]

void PrintDocVisitor::operator() ( const DocHorRuler & )
inline

Definition at line 92 of file printdocvisitor.h.

93 {
95 printf("<hr>");
96 }

References indent_leaf().

◆ operator()() [10/58]

void PrintDocVisitor::operator() ( const DocHRef & href)
inline

Definition at line 516 of file printdocvisitor.h.

517 {
518 indent_pre();
519 printf("<a url=\"%s\">\n",qPrint(href.url()));
520 visitChildren(href);
521 indent_post();
522 printf("</a>\n");
523 }
QCString url() const
Definition docnode.h:824

References indent_post(), indent_pre(), qPrint(), DocHRef::url(), and visitChildren().

◆ operator()() [11/58]

void PrintDocVisitor::operator() ( const DocHtmlBlockQuote & q)
inline

Definition at line 710 of file printdocvisitor.h.

711 {
712 indent_pre();
713 printf("<blockquote>\n");
714 visitChildren(q);
715 indent_post();
716 printf("</blockquote>\n");
717 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [12/58]

void PrintDocVisitor::operator() ( const DocHtmlCaption & c)
inline

Definition at line 500 of file printdocvisitor.h.

501 {
502 indent_pre();
503 printf("<caption>\n");
504 visitChildren(c);
505 indent_post();
506 printf("</caption>\n");
507 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [13/58]

void PrintDocVisitor::operator() ( const DocHtmlCell & c)
inline

Definition at line 492 of file printdocvisitor.h.

493 {
494 indent_pre();
495 printf("<t%c>\n",c.isHeading()?'h':'d');
496 visitChildren(c);
497 indent_post();
498 printf("</t%c>\n",c.isHeading()?'h':'d');
499 }
bool isHeading() const
Definition docnode.h:1194

References indent_post(), indent_pre(), DocHtmlCell::isHeading(), and visitChildren().

◆ operator()() [14/58]

void PrintDocVisitor::operator() ( const DocHtmlDescData & dd)
inline

Definition at line 463 of file printdocvisitor.h.

464 {
465 indent_pre();
466 printf("<dd>\n");
467 visitChildren(dd);
468 indent_post();
469 printf("</dd>\n");
470 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [15/58]

void PrintDocVisitor::operator() ( const DocHtmlDescList & l)
inline

Definition at line 447 of file printdocvisitor.h.

448 {
449 indent_pre();
450 printf("<dl>\n");
451 visitChildren(l);
452 indent_post();
453 printf("</dl>\n");
454 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [16/58]

void PrintDocVisitor::operator() ( const DocHtmlDescTitle & dt)
inline

Definition at line 455 of file printdocvisitor.h.

456 {
457 indent_pre();
458 printf("<dt>\n");
459 visitChildren(dt);
460 indent_post();
461 printf("</dt>\n");
462 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [17/58]

void PrintDocVisitor::operator() ( const DocHtmlDetails & details)
inline

Definition at line 537 of file printdocvisitor.h.

538 {
539 indent_pre();
540 printf("<details");
541 for (const auto &opt : details.attribs())
542 {
543 printf(" %s=\"%s\"",qPrint(opt.name),qPrint(opt.value));
544 }
545 printf(">\n");
546 auto summary = details.summary();
547 if (summary)
548 {
549 std::visit(*this,*summary);
550 }
551 visitChildren(details);
552 indent_post();
553 printf("</details>\n");
554 }
const HtmlAttribList & attribs() const
Definition docnode.h:855
const DocNodeVariant * summary() const
Definition docnode.h:858

References indent_post(), indent_pre(), qPrint(), and visitChildren().

◆ operator()() [18/58]

void PrintDocVisitor::operator() ( const DocHtmlHeader & header)
inline

Definition at line 555 of file printdocvisitor.h.

556 {
557 indent_pre();
558 printf("<h%d>\n",header.level());
559 visitChildren(header);
560 indent_post();
561 printf("</h%d>\n",header.level());
562 }
int level() const
Definition docnode.h:871

References indent_post(), indent_pre(), DocHtmlHeader::level(), and visitChildren().

◆ operator()() [19/58]

void PrintDocVisitor::operator() ( const DocHtmlList & s)
inline

Definition at line 407 of file printdocvisitor.h.

408 {
409 indent_pre();
410 if (s.type()==DocHtmlList::Ordered)
411 {
412 printf("<ol");
413 for (const auto &opt : s.attribs())
414 {
415 printf(" %s=\"%s\"",qPrint(opt.name),qPrint(opt.value));
416 }
417 printf(">\n");
418 }
419 else
420 {
421 printf("<ul>\n");
422 }
423 visitChildren(s);
424 indent_post();
425 if (s.type()==DocHtmlList::Ordered)
426 {
427 printf("</ol>\n");
428 }
429 else
430 {
431 printf("</ul>\n");
432 }
433 }
const HtmlAttribList & attribs() const
Definition docnode.h:1000
Type type() const
Definition docnode.h:999

References DocHtmlList::attribs(), indent_post(), indent_pre(), DocHtmlList::Ordered, qPrint(), DocHtmlList::type(), and visitChildren().

◆ operator()() [20/58]

void PrintDocVisitor::operator() ( const DocHtmlListItem & li)
inline

Definition at line 434 of file printdocvisitor.h.

435 {
436 indent_pre();
437 printf("<li");
438 for (const auto &opt : li.attribs())
439 {
440 printf(" %s=\"%s\"",qPrint(opt.name),qPrint(opt.value));
441 }
442 printf(">\n");
443 visitChildren(li);
444 indent_post();
445 printf("</li>\n");
446 }
const HtmlAttribList & attribs() const
Definition docnode.h:1164

References DocHtmlListItem::attribs(), indent_post(), indent_pre(), qPrint(), and visitChildren().

◆ operator()() [21/58]

void PrintDocVisitor::operator() ( const DocHtmlRow & tr)
inline

Definition at line 484 of file printdocvisitor.h.

485 {
486 indent_pre();
487 printf("<tr>\n");
488 visitChildren(tr);
489 indent_post();
490 printf("</tr>\n");
491 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [22/58]

void PrintDocVisitor::operator() ( const DocHtmlSummary & summary)
inline

Definition at line 524 of file printdocvisitor.h.

525 {
526 indent_pre();
527 printf("<summary");
528 for (const auto &opt : summary.attribs())
529 {
530 printf(" %s=\"%s\"",qPrint(opt.name),qPrint(opt.value));
531 }
532 printf(">\n");
533 visitChildren(summary);
534 indent_post();
535 printf("</summary>\n");
536 }
const HtmlAttribList & attribs() const
Definition docnode.h:842

References DocHtmlSummary::attribs(), indent_post(), indent_pre(), qPrint(), and visitChildren().

◆ operator()() [23/58]

void PrintDocVisitor::operator() ( const DocHtmlTable & t)
inline

Definition at line 471 of file printdocvisitor.h.

472 {
473 indent_pre();
474 printf("<table rows=\"%zu\" cols=\"%zu\">\n",
475 t.numRows(),t.numColumns());
476 visitChildren(t);
477 if (t.caption())
478 {
479 std::visit(*this, *t.caption());
480 }
481 indent_post();
482 printf("</table>\n");
483 }
size_t numRows() const
Definition docnode.h:1267
size_t numColumns() const
Definition docnode.h:1272
const DocNodeVariant * caption() const
Definition docnode.cpp:2029

References DocHtmlTable::caption(), indent_post(), indent_pre(), DocHtmlTable::numColumns(), DocHtmlTable::numRows(), and visitChildren().

◆ operator()() [24/58]

void PrintDocVisitor::operator() ( const DocImage & img)
inline

Definition at line 563 of file printdocvisitor.h.

564 {
565 indent_pre();
566 printf("<image src=\"%s\" type=\"",qPrint(img.name()));
567 switch(img.type())
568 {
569 case DocImage::Html: printf("html"); break;
570 case DocImage::Latex: printf("latex"); break;
571 case DocImage::Rtf: printf("rtf"); break;
572 case DocImage::DocBook: printf("docbook"); break;
573 case DocImage::Xml: printf("xml"); break;
574 }
575 printf("\" %s %s inline=\"%s\">\n",qPrint(img.width()),qPrint(img.height()),img.isInlineImage() ? "yes" : "no");
576 visitChildren(img);
577 indent_post();
578 printf("</image>\n");
579 }
QCString name() const
Definition docnode.h:642
QCString height() const
Definition docnode.h:645
Type type() const
Definition docnode.h:641
QCString width() const
Definition docnode.h:644
@ DocBook
Definition docnode.h:638
bool isInlineImage() const
Definition docnode.h:648

References DocImage::DocBook, DocImage::height(), DocImage::Html, indent_post(), indent_pre(), DocImage::isInlineImage(), DocImage::Latex, DocImage::name(), qPrint(), DocImage::Rtf, DocImage::type(), visitChildren(), DocImage::width(), and DocImage::Xml.

◆ operator()() [25/58]

void PrintDocVisitor::operator() ( const DocInclude & inc)
inline

Definition at line 197 of file printdocvisitor.h.

198 {
199 indent_leaf();
200 printf("<include file=\"%s\" type=\"",qPrint(inc.file()));
201 switch(inc.type())
202 {
203 case DocInclude::Include: printf("include"); break;
204 case DocInclude::IncWithLines: printf("incwithlines"); break;
205 case DocInclude::DontInclude: printf("dontinclude"); break;
206 case DocInclude::DontIncWithLines: printf("dontinwithlines"); break;
208 printf("htmlinclude");
209 if (inc.isBlock()) printf(" block=\"yes\"");
210 break;
211 case DocInclude::LatexInclude: printf("latexinclude"); break;
212 case DocInclude::RtfInclude: printf("rtfinclude"); break;
213 case DocInclude::DocbookInclude: printf("docbookinclude"); break;
214 case DocInclude::ManInclude: printf("maninclude"); break;
215 case DocInclude::XmlInclude: printf("xmlinclude"); break;
216 case DocInclude::VerbInclude: printf("verbinclude"); break;
217 case DocInclude::Snippet: printf("snippet"); break;
218 case DocInclude::SnippetWithLines: printf("snipwithlines"); break;
219 }
220 printf("\"/>");
221 }
bool isBlock() const
Definition docnode.h:453
@ LatexInclude
Definition docnode.h:432
@ SnippetWithLines
Definition docnode.h:433
@ DontIncWithLines
Definition docnode.h:434
@ IncWithLines
Definition docnode.h:433
@ HtmlInclude
Definition docnode.h:432
@ VerbInclude
Definition docnode.h:432
@ DontInclude
Definition docnode.h:432
@ DocbookInclude
Definition docnode.h:434
Type type() const
Definition docnode.h:446
QCString file() const
Definition docnode.h:444

References DocInclude::DocbookInclude, DocInclude::DontInclude, DocInclude::DontIncWithLines, DocInclude::file(), DocInclude::HtmlInclude, DocInclude::Include, DocInclude::IncWithLines, indent_leaf(), DocInclude::isBlock(), DocInclude::LatexInclude, DocInclude::ManInclude, qPrint(), DocInclude::RtfInclude, DocInclude::Snippet, DocInclude::SnippetWithLines, DocInclude::type(), DocInclude::VerbInclude, and DocInclude::XmlInclude.

◆ operator()() [26/58]

void PrintDocVisitor::operator() ( const DocIncOperator & op)
inline

Definition at line 222 of file printdocvisitor.h.

223 {
224 indent_leaf();
225 printf("<incoperator pattern=\"%s\" type=\"",qPrint(op.pattern()));
226 switch(op.type())
227 {
228 case DocIncOperator::Line: printf("line"); break;
229 case DocIncOperator::Skip: printf("skip"); break;
230 case DocIncOperator::SkipLine: printf("skipline"); break;
231 case DocIncOperator::Until: printf("until"); break;
232 }
233 printf("\"/>");
234 }
Type type() const
Definition docnode.h:480
QCString pattern() const
Definition docnode.h:495

References indent_leaf(), DocIncOperator::Line, DocIncOperator::pattern(), qPrint(), DocIncOperator::Skip, DocIncOperator::SkipLine, DocIncOperator::type(), and DocIncOperator::Until.

◆ operator()() [27/58]

void PrintDocVisitor::operator() ( const DocIndexEntry & i)
inline

Definition at line 240 of file printdocvisitor.h.

241 {
242 indent_leaf();
243 printf("<indexentry>%s</indexentry\n",qPrint(i.entry()));
244 }
QCString entry() const
Definition docnode.h:554

References DocIndexEntry::entry(), indent_leaf(), and qPrint().

◆ operator()() [28/58]

void PrintDocVisitor::operator() ( const DocInternal & i)
inline

Definition at line 508 of file printdocvisitor.h.

509 {
510 indent_pre();
511 printf("<internal>\n");
512 visitChildren(i);
513 indent_post();
514 printf("</internal>\n");
515 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [29/58]

void PrintDocVisitor::operator() ( const DocInternalRef & r)
inline

Definition at line 694 of file printdocvisitor.h.

695 {
696 indent_pre();
697 printf("<internalref file=%s anchor=%s>\n",qPrint(r.file()),qPrint(r.anchor()));
698 visitChildren(r);
699 indent_post();
700 printf("</internalref>\n");
701 }
QCString file() const
Definition docnode.h:805
QCString anchor() const
Definition docnode.h:807

References DocInternalRef::anchor(), DocInternalRef::file(), indent_post(), indent_pre(), qPrint(), and visitChildren().

◆ operator()() [30/58]

void PrintDocVisitor::operator() ( const DocLineBreak & )
inline

Definition at line 87 of file printdocvisitor.h.

88 {
90 printf("<br/>");
91 }

References indent_leaf().

◆ operator()() [31/58]

void PrintDocVisitor::operator() ( const DocLink & lnk)
inline

Definition at line 612 of file printdocvisitor.h.

613 {
614 indent_pre();
615 printf("<link ref=\"%s\" file=\"%s\" anchor=\"%s\">\n",
616 qPrint(lnk.ref()),qPrint(lnk.file()),qPrint(lnk.anchor()));
617 visitChildren(lnk);
618 indent_post();
619 printf("</link>\n");
620 }

References DocLink::anchor(), DocLink::file(), indent_post(), indent_pre(), qPrint(), DocLink::ref(), and visitChildren().

◆ operator()() [32/58]

void PrintDocVisitor::operator() ( const DocLinkedWord & w)
inline

Definition at line 39 of file printdocvisitor.h.

40 {
42 printf("%s",qPrint(w.word()));
43 }
QCString word() const
Definition docnode.h:169

References indent_leaf(), qPrint(), and DocLinkedWord::word().

◆ operator()() [33/58]

void PrintDocVisitor::operator() ( const DocMscFile & df)
inline

Definition at line 588 of file printdocvisitor.h.

589 {
590 indent_pre();
591 printf("<mscfile src=\"%s\">\n",qPrint(df.name()));
592 visitChildren(df);
593 indent_post();
594 printf("</mscfile>\n");
595 }

References indent_post(), indent_pre(), DocDiagramFileBase::name(), qPrint(), and visitChildren().

◆ operator()() [34/58]

void PrintDocVisitor::operator() ( const DocPara & p)
inline

Definition at line 317 of file printdocvisitor.h.

318 {
319 indent_pre();
320 printf("<para>\n");
321 visitChildren(p);
322 indent_post();
323 printf("</para>\n");
324 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [35/58]

void PrintDocVisitor::operator() ( const DocParamList & pl)
inline

Definition at line 651 of file printdocvisitor.h.

652 {
653 indent_pre();
654 printf("<parameters>");
655 if (!pl.parameters().empty())
656 {
657 printf("<param>");
658 for (const auto &param : pl.parameters())
659 {
660 std::visit(*this,param);
661 }
662 printf("</param>");
663 }
664 printf("\n");
665 indent_post();
666 printf("</parameters>\n");
667 }
const DocNodeList & parameters() const
Definition docnode.h:1123
bool empty() const
checks whether the container is empty
Definition growvector.h:140

References GrowVector< T >::empty(), indent_post(), indent_pre(), and DocParamList::parameters().

◆ operator()() [36/58]

void PrintDocVisitor::operator() ( const DocParamSect & ps)
inline

Definition at line 668 of file printdocvisitor.h.

669 {
670 indent_pre();
671 printf("<paramsect type=");
672 switch (ps.type())
673 {
674 case DocParamSect::Param: printf("param"); break;
675 case DocParamSect::RetVal: printf("retval"); break;
676 case DocParamSect::Exception: printf("exception"); break;
677 case DocParamSect::TemplateParam: printf("templateparam"); break;
678 case DocParamSect::Unknown: printf("unknown"); break;
679 }
680 printf(">\n");
681 visitChildren(ps);
682 indent_post();
683 printf("</paramsect>\n");
684 }
Type type() const
Definition docnode.h:1062

References DocParamSect::Exception, indent_post(), indent_pre(), DocParamSect::Param, DocParamSect::RetVal, DocParamSect::TemplateParam, DocParamSect::type(), DocParamSect::Unknown, and visitChildren().

◆ operator()() [37/58]

void PrintDocVisitor::operator() ( const DocParBlock & pb)
inline

Definition at line 726 of file printdocvisitor.h.

727 {
728 indent_pre();
729 printf("<parblock>\n");
730 visitChildren(pb);
731 indent_post();
732 printf("</parblock>\n");
733 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [38/58]

void PrintDocVisitor::operator() ( const DocPlantUmlFile & df)
inline

Definition at line 604 of file printdocvisitor.h.

605 {
606 indent_pre();
607 printf("<plantumlfile src=\"%s\">\n",qPrint(df.name()));
608 visitChildren(df);
609 indent_post();
610 printf("</plantumlfile>\n");
611 }

References indent_post(), indent_pre(), DocDiagramFileBase::name(), qPrint(), and visitChildren().

◆ operator()() [39/58]

void PrintDocVisitor::operator() ( const DocRef & ref)
inline

Definition at line 621 of file printdocvisitor.h.

622 {
623 indent_pre();
624 printf("<ref ref=\"%s\" file=\"%s\" "
625 "anchor=\"%s\" targetTitle=\"%s\""
626 " hasLinkText=\"%s\" refToAnchor=\"%s\" refToSection=\"%s\" refToTable=\"%s\">\n",
627 qPrint(ref.ref()),qPrint(ref.file()),qPrint(ref.anchor()),
628 qPrint(ref.targetTitle()),ref.hasLinkText()?"yes":"no",
629 ref.refToAnchor()?"yes":"no", ref.refToSection()?"yes":"no",
630 ref.refToTable()?"yes":"no");
631 visitChildren(ref);
632 indent_post();
633 printf("</ref>\n");
634 }
QCString anchor() const
Definition docnode.h:779
QCString targetTitle() const
Definition docnode.h:780
bool refToTable() const
Definition docnode.h:785
QCString file() const
Definition docnode.h:776
bool refToAnchor() const
Definition docnode.h:783
QCString ref() const
Definition docnode.h:778
bool refToSection() const
Definition docnode.h:784
bool hasLinkText() const
Definition docnode.h:782

References DocRef::anchor(), DocRef::file(), DocRef::hasLinkText(), indent_post(), indent_pre(), qPrint(), DocRef::ref(), DocRef::refToAnchor(), DocRef::refToSection(), DocRef::refToTable(), DocRef::targetTitle(), and visitChildren().

◆ operator()() [40/58]

void PrintDocVisitor::operator() ( const DocRoot & r)
inline

Definition at line 325 of file printdocvisitor.h.

326 {
327 indent_pre();
328 printf("<root>\n");
329 visitChildren(r);
330 indent_post();
331 printf("</root>\n");
332 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [41/58]

void PrintDocVisitor::operator() ( const DocSecRefItem & ref)
inline

Definition at line 635 of file printdocvisitor.h.

636 {
637 indent_pre();
638 printf("<secrefitem target=\"%s\">\n",qPrint(ref.target()));
639 visitChildren(ref);
640 indent_post();
641 printf("</secrefitem>\n");
642 }
QCString target() const
Definition docnode.h:932

References indent_post(), indent_pre(), qPrint(), DocSecRefItem::target(), and visitChildren().

◆ operator()() [42/58]

void PrintDocVisitor::operator() ( const DocSecRefList & rl)
inline

Definition at line 643 of file printdocvisitor.h.

644 {
645 indent_pre();
646 printf("<secreflist>\n");
647 visitChildren(rl);
648 indent_post();
649 printf("</secreflist>\n");
650 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [43/58]

void PrintDocVisitor::operator() ( const DocSection & s)
inline

Definition at line 395 of file printdocvisitor.h.

396 {
397 indent_pre();
398 printf("<sect%d>\n",s.level());
399 if (s.title())
400 {
401 std::visit(*this, *s.title());
402 }
403 visitChildren(s);
404 indent_post();
405 printf("</sect%d>\n",s.level());
406 }
int level() const
Definition docnode.h:912
const DocNodeVariant * title() const
Definition docnode.h:913

References indent_post(), indent_pre(), DocSection::level(), DocSection::title(), and visitChildren().

◆ operator()() [44/58]

void PrintDocVisitor::operator() ( const DocSeparator & )
inline

Definition at line 259 of file printdocvisitor.h.

260 {
261 indent_leaf();
262 printf("<sep/>");
263 }

References indent_leaf().

◆ operator()() [45/58]

void PrintDocVisitor::operator() ( const DocSimpleList & l)
inline

Definition at line 376 of file printdocvisitor.h.

377 {
378 indent_pre();
379 printf("<ul>\n");
380 visitChildren(l);
381 indent_post();
382 printf("</ul>\n");
383 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [46/58]

void PrintDocVisitor::operator() ( const DocSimpleListItem & li)
inline

Definition at line 384 of file printdocvisitor.h.

385 {
386 indent_pre();
387 printf("<li>\n");
388 if (li.paragraph())
389 {
390 visit(*this,*li.paragraph());
391 }
392 indent_post();
393 printf("</li>\n");
394 }
const DocNodeVariant * paragraph() const
Definition docnode.h:1151

References indent_post(), indent_pre(), and DocSimpleListItem::paragraph().

◆ operator()() [47/58]

void PrintDocVisitor::operator() ( const DocSimpleSect & s)
inline

Definition at line 333 of file printdocvisitor.h.

334 {
335 indent_pre();
336 printf("<simplesect type=");
337 switch(s.type())
338 {
339 case DocSimpleSect::See: printf("see"); break;
340 case DocSimpleSect::Return: printf("return"); break;
341 case DocSimpleSect::Author: printf("author"); break;
342 case DocSimpleSect::Authors: printf("authors"); break;
343 case DocSimpleSect::Version: printf("version"); break;
344 case DocSimpleSect::Since: printf("since"); break;
345 case DocSimpleSect::Date: printf("date"); break;
346 case DocSimpleSect::Note: printf("note"); break;
347 case DocSimpleSect::Warning: printf("warning"); break;
348 case DocSimpleSect::Pre: printf("pre"); break;
349 case DocSimpleSect::Post: printf("post"); break;
350 case DocSimpleSect::Copyright: printf("copyright"); break;
351 case DocSimpleSect::Invar: printf("invar"); break;
352 case DocSimpleSect::Remark: printf("remark"); break;
353 case DocSimpleSect::Attention: printf("attention"); break;
354 case DocSimpleSect::Important: printf("important"); break;
355 case DocSimpleSect::User: printf("user"); break;
356 case DocSimpleSect::Rcs: printf("rcs"); break;
357 case DocSimpleSect::Unknown: printf("unknown"); break;
358 }
359 printf(">\n");
360 if (s.title())
361 {
362 std::visit(*this, *s.title());
363 }
364 visitChildren(s);
365 indent_post();
366 printf("</simplesect>\n");
367 }
Type type() const
Definition docnode.h:1020
const DocNodeVariant * title() const
Definition docnode.h:1027

References DocSimpleSect::Attention, DocSimpleSect::Author, DocSimpleSect::Authors, DocSimpleSect::Copyright, DocSimpleSect::Date, DocSimpleSect::Important, indent_post(), indent_pre(), DocSimpleSect::Invar, DocSimpleSect::Note, DocSimpleSect::Post, DocSimpleSect::Pre, DocSimpleSect::Rcs, DocSimpleSect::Remark, DocSimpleSect::Return, DocSimpleSect::See, DocSimpleSect::Since, DocSimpleSect::title(), DocSimpleSect::type(), DocSimpleSect::Unknown, DocSimpleSect::User, DocSimpleSect::Version, visitChildren(), and DocSimpleSect::Warning.

◆ operator()() [48/58]

void PrintDocVisitor::operator() ( const DocSimpleSectSep & )
inline

Definition at line 245 of file printdocvisitor.h.

246 {
247 indent_leaf();
248 printf("<simplesectsep/>");
249 }

References indent_leaf().

◆ operator()() [49/58]

void PrintDocVisitor::operator() ( const DocStyleChange & s)
inline

Definition at line 97 of file printdocvisitor.h.

98 {
100 switch (s.style())
101 {
103 if (s.enable()) printf("<bold>"); else printf("</bold>");
104 break;
106 if (s.enable()) printf("<s>"); else printf("</s>");
107 break;
109 if (s.enable()) printf("<strike>"); else printf("</strike>");
110 break;
112 if (s.enable()) printf("<del>"); else printf("</del>");
113 break;
115 if (s.enable()) printf("<underline>"); else printf("</underline>");
116 break;
118 if (s.enable()) printf("<ins>"); else printf("</ins>");
119 break;
121 if (s.enable()) printf("<italic>"); else printf("</italic>");
122 break;
124 if (s.enable()) printf("<kbd>"); else printf("</kbd>");
125 break;
127 if (s.enable()) printf("<code>"); else printf("</code>");
128 break;
130 if (s.enable()) printf("<sub>"); else printf("</sub>");
131 break;
133 if (s.enable()) printf("<sup>"); else printf("</sup>");
134 break;
136 if (s.enable()) printf("<center>"); else printf("</center>");
137 break;
139 if (s.enable()) printf("<small>"); else printf("</small>");
140 break;
142 if (s.enable()) printf("<cite>"); else printf("</cite>");
143 break;
145 if (s.enable()) printf("<pre>"); else printf("</pre>");
146 break;
148 if (s.enable()) printf("<div>"); else printf("</div>");
149 break;
151 if (s.enable()) printf("<span>"); else printf("</span>");
152 break;
153 }
154 }
Style style() const
Definition docnode.h:302
bool enable() const
Definition docnode.h:304

References DocStyleChange::Bold, DocStyleChange::Center, DocStyleChange::Cite, DocStyleChange::Code, DocStyleChange::Del, DocStyleChange::Div, DocStyleChange::enable(), indent_leaf(), DocStyleChange::Ins, DocStyleChange::Italic, DocStyleChange::Kbd, DocStyleChange::Preformatted, DocStyleChange::S, DocStyleChange::Small, DocStyleChange::Span, DocStyleChange::Strike, DocStyleChange::style(), DocStyleChange::Subscript, DocStyleChange::Superscript, and DocStyleChange::Underline.

◆ operator()() [50/58]

void PrintDocVisitor::operator() ( const DocSymbol & s)
inline

Definition at line 56 of file printdocvisitor.h.

57 {
59 const char *res = HtmlEntityMapper::instance().utf8(s.symbol(),TRUE);
60 if (res)
61 {
62 printf("%s",res);
63 }
64 else
65 {
66 printf("print: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance().html(s.symbol(),TRUE));
67 }
68 }
HtmlEntityMapper::SymType symbol() const
Definition docnode.h:327
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
const char * utf8(SymType symb, bool useInPrintf=FALSE) const
Access routine to the UTF8 code of the HTML entity.

References indent_leaf(), HtmlEntityMapper::instance(), DocSymbol::symbol(), TRUE, and HtmlEntityMapper::utf8().

◆ operator()() [51/58]

void PrintDocVisitor::operator() ( const DocText & t)
inline

Definition at line 702 of file printdocvisitor.h.

703 {
704 indent_pre();
705 printf("<text>\n");
706 visitChildren(t);
707 indent_post();
708 printf("</text>\n");
709 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [52/58]

void PrintDocVisitor::operator() ( const DocTitle & t)
inline

Definition at line 368 of file printdocvisitor.h.

369 {
370 indent_pre();
371 printf("<title>\n");
372 visitChildren(t);
373 indent_post();
374 printf("</title>\n");
375 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [53/58]

void PrintDocVisitor::operator() ( const DocURL & u)
inline

Definition at line 82 of file printdocvisitor.h.

83 {
85 printf("%s",qPrint(u.url()));
86 }
QCString url() const
Definition docnode.h:191

References indent_leaf(), qPrint(), and DocURL::url().

◆ operator()() [54/58]

void PrintDocVisitor::operator() ( const DocVerbatim & s)
inline

Definition at line 155 of file printdocvisitor.h.

156 {
157 indent_leaf();
158 switch(s.type())
159 {
160 case DocVerbatim::Code: printf("<code>"); break;
161 case DocVerbatim::Verbatim: printf("<verbatim>"); break;
162 case DocVerbatim::JavaDocLiteral: printf("<javadocliteral>"); break;
163 case DocVerbatim::JavaDocCode: printf("<javadoccode>"); break;
164 case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break;
165 case DocVerbatim::RtfOnly: printf("<rtfonly>"); break;
166 case DocVerbatim::ManOnly: printf("<manonly>"); break;
167 case DocVerbatim::LatexOnly: printf("<latexonly>"); break;
168 case DocVerbatim::XmlOnly: printf("<xmlonly>"); break;
169 case DocVerbatim::DocbookOnly: printf("<docbookonly>"); break;
170 case DocVerbatim::Dot: printf("<dot>"); break;
171 case DocVerbatim::Msc: printf("<msc>"); break;
172 case DocVerbatim::PlantUML: printf("<plantuml>"); break;
173 }
174 printf("%s",qPrint(s.text()));
175 switch(s.type())
176 {
177 case DocVerbatim::Code: printf("</code>"); break;
178 case DocVerbatim::Verbatim: printf("</verbatim>"); break;
179 case DocVerbatim::JavaDocLiteral: printf("</javadocliteral>"); break;
180 case DocVerbatim::JavaDocCode: printf("</javadoccode>"); break;
181 case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break;
182 case DocVerbatim::RtfOnly: printf("</rtfonly>"); break;
183 case DocVerbatim::ManOnly: printf("</manonly>"); break;
184 case DocVerbatim::LatexOnly: printf("</latexonly>"); break;
185 case DocVerbatim::XmlOnly: printf("</xmlonly>"); break;
186 case DocVerbatim::DocbookOnly: printf("</docbookonly>"); break;
187 case DocVerbatim::Dot: printf("</dot>"); break;
188 case DocVerbatim::Msc: printf("</msc>"); break;
189 case DocVerbatim::PlantUML: printf("</plantuml>"); break;
190 }
191 }
Type type() const
Definition docnode.h:377
QCString text() const
Definition docnode.h:378
@ JavaDocLiteral
Definition docnode.h:373

References DocVerbatim::Code, DocVerbatim::DocbookOnly, DocVerbatim::Dot, DocVerbatim::HtmlOnly, indent_leaf(), DocVerbatim::JavaDocCode, DocVerbatim::JavaDocLiteral, DocVerbatim::LatexOnly, DocVerbatim::ManOnly, DocVerbatim::Msc, DocVerbatim::PlantUML, qPrint(), DocVerbatim::RtfOnly, DocVerbatim::text(), DocVerbatim::type(), DocVerbatim::Verbatim, and DocVerbatim::XmlOnly.

◆ operator()() [55/58]

void PrintDocVisitor::operator() ( const DocVhdlFlow & vf)
inline

Definition at line 718 of file printdocvisitor.h.

719 {
720 indent_pre();
721 printf("<vhdlflow>\n");
722 visitChildren(vf);
723 indent_post();
724 printf("</vhdlflow>\n");
725 }

References indent_post(), indent_pre(), and visitChildren().

◆ operator()() [56/58]

void PrintDocVisitor::operator() ( const DocWhiteSpace & w)
inline

Definition at line 44 of file printdocvisitor.h.

45 {
47 if (m_insidePre)
48 {
49 printf("%s",qPrint(w.chars()));
50 }
51 else
52 {
53 printf(" ");
54 }
55 }
QCString chars() const
Definition docnode.h:353

References DocWhiteSpace::chars(), indent_leaf(), m_insidePre, and qPrint().

◆ operator()() [57/58]

void PrintDocVisitor::operator() ( const DocWord & w)
inline

Definition at line 34 of file printdocvisitor.h.

35 {
37 printf("%s",qPrint(w.word()));
38 }
QCString word() const
Definition docnode.h:155

References indent_leaf(), qPrint(), and DocWord::word().

◆ operator()() [58/58]

void PrintDocVisitor::operator() ( const DocXRefItem & x)
inline

Definition at line 685 of file printdocvisitor.h.

686 {
687 indent_pre();
688 printf("<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\">\n",
689 qPrint(x.file()),qPrint(x.anchor()),qPrint(x.title()));
690 visitChildren(x);
691 indent_post();
692 printf("</xrefitem>\n");
693 }
QCString anchor() const
Definition docnode.h:619
QCString file() const
Definition docnode.h:618
QCString title() const
Definition docnode.h:620

References DocXRefItem::anchor(), DocXRefItem::file(), indent_post(), indent_pre(), qPrint(), DocXRefItem::title(), and visitChildren().

◆ visitChildren()

Member Data Documentation

◆ m_indent

int PrintDocVisitor::m_indent
private

Definition at line 760 of file printdocvisitor.h.

Referenced by indent(), indent_post(), indent_pre(), and PrintDocVisitor().

◆ m_insidePre

bool PrintDocVisitor::m_insidePre
private

Definition at line 762 of file printdocvisitor.h.

Referenced by operator()(), and PrintDocVisitor().

◆ m_needsEnter

bool PrintDocVisitor::m_needsEnter
private

Definition at line 761 of file printdocvisitor.h.

Referenced by indent(), indent_leaf(), and PrintDocVisitor().


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