My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 28 of file printdocvisitor.h.

Constructor & Destructor Documentation

PrintDocVisitor::PrintDocVisitor ( )
inline

Definition at line 31 of file printdocvisitor.h.

Member Function Documentation

void PrintDocVisitor::indent ( )
inlineprivate

Definition at line 707 of file printdocvisitor.h.

References m_indent, and m_needsEnter.

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

{
if (m_needsEnter) printf("\n");
for (int i=0;i<m_indent;i++) printf(".");
m_needsEnter=FALSE;
}
void PrintDocVisitor::indent_leaf ( )
inlineprivate

Definition at line 713 of file printdocvisitor.h.

References indent(), and m_needsEnter.

Referenced by visit().

{
}
void PrintDocVisitor::indent_post ( )
inlineprivate

Definition at line 723 of file printdocvisitor.h.

References indent(), and m_indent.

Referenced by visitPost().

{
indent();
}
void PrintDocVisitor::indent_pre ( )
inlineprivate

Definition at line 718 of file printdocvisitor.h.

References indent(), and m_indent.

Referenced by visitPre().

{
indent();
}
void PrintDocVisitor::visit ( DocWord w)
inlinevirtual

Implements DocVisitor.

Definition at line 36 of file printdocvisitor.h.

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

Referenced by visitPre().

{
printf("%s",w->word().data());
}
void PrintDocVisitor::visit ( DocLinkedWord w)
inlinevirtual

Implements DocVisitor.

Definition at line 41 of file printdocvisitor.h.

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

{
printf("%s",w->word().data());
}
void PrintDocVisitor::visit ( DocWhiteSpace w)
inlinevirtual

Implements DocVisitor.

Definition at line 46 of file printdocvisitor.h.

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

{
{
printf("%s",w->chars().data());
}
else
{
printf(" ");
}
}
void PrintDocVisitor::visit ( DocSymbol s)
inlinevirtual

Implements DocVisitor.

Definition at line 58 of file printdocvisitor.h.

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

{
const char *res = HtmlEntityMapper::instance()->utf8(s->symbol(),TRUE);
if (res)
{
printf("%s",res);
}
else
{
printf("print: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
}
}
void PrintDocVisitor::visit ( DocURL u)
inlinevirtual

Implements DocVisitor.

Definition at line 71 of file printdocvisitor.h.

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

{
printf("%s",u->url().data());
}
void PrintDocVisitor::visit ( DocLineBreak )
inlinevirtual

Implements DocVisitor.

Definition at line 76 of file printdocvisitor.h.

References indent_leaf().

{
printf("<br/>");
}
void PrintDocVisitor::visit ( DocHorRuler )
inlinevirtual

Implements DocVisitor.

Definition at line 81 of file printdocvisitor.h.

References indent_leaf().

{
printf("<hr>");
}
void PrintDocVisitor::visit ( DocStyleChange s)
inlinevirtual

Implements DocVisitor.

Definition at line 86 of file printdocvisitor.h.

References DocStyleChange::Bold, DocStyleChange::Center, DocStyleChange::Code, DocStyleChange::Div, DocStyleChange::enable(), indent_leaf(), DocStyleChange::Italic, DocStyleChange::Preformatted, DocStyleChange::Small, DocStyleChange::Span, DocStyleChange::style(), DocStyleChange::Subscript, and DocStyleChange::Superscript.

{
switch (s->style())
{
if (s->enable()) printf("<bold>"); else printf("</bold>");
break;
if (s->enable()) printf("<italic>"); else printf("</italic>");
break;
if (s->enable()) printf("<code>"); else printf("</code>");
break;
if (s->enable()) printf("<sub>"); else printf("</sub>");
break;
if (s->enable()) printf("<sup>"); else printf("</sup>");
break;
if (s->enable()) printf("<center>"); else printf("</center>");
break;
if (s->enable()) printf("<small>"); else printf("</small>");
break;
if (s->enable()) printf("<pre>"); else printf("</pre>");
break;
if (s->enable()) printf("<div>"); else printf("</div>");
break;
if (s->enable()) printf("<span>"); else printf("</span>");
break;
}
}
void PrintDocVisitor::visit ( DocVerbatim s)
inlinevirtual

Implements DocVisitor.

Definition at line 123 of file printdocvisitor.h.

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

{
switch(s->type())
{
case DocVerbatim::Code: printf("<code>"); break;
case DocVerbatim::Verbatim: printf("<verbatim>"); break;
case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break;
case DocVerbatim::RtfOnly: printf("<rtfonly>"); break;
case DocVerbatim::ManOnly: printf("<manonly>"); break;
case DocVerbatim::LatexOnly: printf("<latexonly>"); break;
case DocVerbatim::XmlOnly: printf("<xmlonly>"); break;
case DocVerbatim::DocbookOnly: printf("<docbookonly>"); break;
case DocVerbatim::Dot: printf("<dot>"); break;
case DocVerbatim::Msc: printf("<msc>"); break;
case DocVerbatim::PlantUML: printf("<plantuml>"); break;
}
printf("%s",s->text().data());
switch(s->type())
{
case DocVerbatim::Code: printf("</code>"); break;
case DocVerbatim::Verbatim: printf("</verbatim>"); break;
case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break;
case DocVerbatim::RtfOnly: printf("</rtfonly>"); break;
case DocVerbatim::ManOnly: printf("</manonly>"); break;
case DocVerbatim::LatexOnly: printf("</latexonly>"); break;
case DocVerbatim::XmlOnly: printf("</xmlonly>"); break;
case DocVerbatim::DocbookOnly: printf("</docbookonly>"); break;
case DocVerbatim::Dot: printf("</dot>"); break;
case DocVerbatim::Msc: printf("</msc>"); break;
case DocVerbatim::PlantUML: printf("</plantuml>"); break;
}
}
void PrintDocVisitor::visit ( DocAnchor a)
inlinevirtual

Implements DocVisitor.

Definition at line 156 of file printdocvisitor.h.

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

{
printf("<anchor name=\"%s\"/>",a->anchor().data());
}
void PrintDocVisitor::visit ( DocInclude inc)
inlinevirtual

Implements DocVisitor.

Definition at line 161 of file printdocvisitor.h.

References DocInclude::DontInclude, err(), DocInclude::file(), DocInclude::HtmlInclude, DocInclude::Include, DocInclude::IncludeDoc, DocInclude::IncWithLines, indent_leaf(), DocInclude::LatexInclude, DocInclude::Snippet, DocInclude::SnippetDoc, DocInclude::type(), and DocInclude::VerbInclude.

{
printf("<include file=\"%s\" type=\"",inc->file().data());
switch(inc->type())
{
case DocInclude::Include: printf("include"); break;
case DocInclude::IncWithLines: printf("incwithlines"); break;
case DocInclude::DontInclude: printf("dontinclude"); break;
case DocInclude::HtmlInclude: printf("htmlinclude"); break;
case DocInclude::LatexInclude: printf("latexinclude"); break;
case DocInclude::VerbInclude: printf("verbinclude"); break;
case DocInclude::Snippet: printf("snippet"); break;
err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
"Please create a bug report\n",__FILE__);
break;
}
printf("\"/>");
}
void PrintDocVisitor::visit ( DocIncOperator op)
inlinevirtual

Implements DocVisitor.

Definition at line 182 of file printdocvisitor.h.

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

{
printf("<incoperator pattern=\"%s\" type=\"",op->pattern().data());
switch(op->type())
{
case DocIncOperator::Line: printf("line"); break;
case DocIncOperator::Skip: printf("skip"); break;
case DocIncOperator::SkipLine: printf("skipline"); break;
case DocIncOperator::Until: printf("until"); break;
}
printf("\"/>");
}
void PrintDocVisitor::visit ( DocFormula f)
inlinevirtual

Implements DocVisitor.

Definition at line 195 of file printdocvisitor.h.

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

{
printf("<formula name=%s text=%s/>",f->name().data(),f->text().data());
}
void PrintDocVisitor::visit ( DocIndexEntry i)
inlinevirtual

Implements DocVisitor.

Definition at line 200 of file printdocvisitor.h.

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

{
printf("<indexentry>%s</indexentry\n",i->entry().data());
}
void PrintDocVisitor::visit ( DocSimpleSectSep )
inlinevirtual

Implements DocVisitor.

Definition at line 205 of file printdocvisitor.h.

References indent_leaf().

{
printf("<simplesectsep/>");
}
void PrintDocVisitor::visit ( DocCite cite)
inlinevirtual

Implements DocVisitor.

Definition at line 210 of file printdocvisitor.h.

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

{
printf("<cite ref=\"%s\" file=\"%s\" "
"anchor=\"%s\" text=\"%s\""
"/>\n",
cite->ref().data(),cite->file().data(),cite->anchor().data(),
cite->text().data());
}
void PrintDocVisitor::visitPost ( DocAutoList l)
inlinevirtual

Implements DocVisitor.

Definition at line 234 of file printdocvisitor.h.

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

{
if (l->isEnumList())
{
printf("</ol>\n");
}
else
{
printf("</ul>\n");
}
}
void PrintDocVisitor::visitPost ( DocAutoListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 251 of file printdocvisitor.h.

References indent_post().

{
printf("</li>\n");
}
void PrintDocVisitor::visitPost ( DocPara )
inlinevirtual

Implements DocVisitor.

Definition at line 261 of file printdocvisitor.h.

References indent_post().

{
printf("</para>\n");
}
void PrintDocVisitor::visitPost ( DocRoot )
inlinevirtual

Implements DocVisitor.

Definition at line 271 of file printdocvisitor.h.

References indent_post().

{
printf("</root>\n");
}
void PrintDocVisitor::visitPost ( DocSimpleSect )
inlinevirtual

Implements DocVisitor.

Definition at line 303 of file printdocvisitor.h.

References indent_post().

{
printf("</simplesect>\n");
}
void PrintDocVisitor::visitPost ( DocTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 313 of file printdocvisitor.h.

References indent_post().

{
printf("</title>\n");
}
void PrintDocVisitor::visitPost ( DocSimpleList )
inlinevirtual

Implements DocVisitor.

Definition at line 323 of file printdocvisitor.h.

References indent_post().

{
printf("</ul>\n");
}
void PrintDocVisitor::visitPost ( DocSimpleListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 333 of file printdocvisitor.h.

References indent_post().

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

Implements DocVisitor.

Definition at line 343 of file printdocvisitor.h.

References indent_post(), and DocSection::level().

{
printf("</sect%d>\n",s->level());
}
void PrintDocVisitor::visitPost ( DocHtmlList s)
inlinevirtual

Implements DocVisitor.

Definition at line 353 of file printdocvisitor.h.

References indent_post(), DocHtmlList::Ordered, and DocHtmlList::type().

{
if (s->type()==DocHtmlList::Ordered) printf("</ol>\n"); else printf("</ul>\n");
}
void PrintDocVisitor::visitPost ( DocHtmlListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 363 of file printdocvisitor.h.

References indent_post().

{
printf("</li>\n");
}
void PrintDocVisitor::visitPost ( DocHtmlDescList )
inlinevirtual

Implements DocVisitor.

Definition at line 385 of file printdocvisitor.h.

References indent_post().

{
printf("</dl>\n");
}
void PrintDocVisitor::visitPost ( DocHtmlDescTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 395 of file printdocvisitor.h.

References indent_post().

{
printf("</dt>\n");
}
void PrintDocVisitor::visitPost ( DocHtmlDescData )
inlinevirtual

Implements DocVisitor.

Definition at line 405 of file printdocvisitor.h.

References indent_post().

{
printf("</dd>\n");
}
void PrintDocVisitor::visitPost ( DocHtmlTable )
inlinevirtual

Implements DocVisitor.

Definition at line 416 of file printdocvisitor.h.

References indent_post().

{
printf("</table>\n");
}
void PrintDocVisitor::visitPost ( DocHtmlRow )
inlinevirtual

Implements DocVisitor.

Definition at line 426 of file printdocvisitor.h.

References indent_post().

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

Implements DocVisitor.

Definition at line 436 of file printdocvisitor.h.

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

{
printf("</t%c>\n",c->isHeading()?'h':'d');
}
void PrintDocVisitor::visitPost ( DocHtmlCaption )
inlinevirtual

Implements DocVisitor.

Definition at line 446 of file printdocvisitor.h.

References indent_post().

{
printf("</caption>\n");
}
void PrintDocVisitor::visitPost ( DocInternal )
inlinevirtual

Implements DocVisitor.

Definition at line 456 of file printdocvisitor.h.

References indent_post().

{
printf("</internal>\n");
}
void PrintDocVisitor::visitPost ( DocHRef )
inlinevirtual

Implements DocVisitor.

Definition at line 466 of file printdocvisitor.h.

References indent_post().

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

Implements DocVisitor.

Definition at line 476 of file printdocvisitor.h.

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

{
printf("</h%d>\n",header->level());
}
void PrintDocVisitor::visitPost ( DocImage )
inlinevirtual

Implements DocVisitor.

Definition at line 494 of file printdocvisitor.h.

References indent_post().

{
printf("</image>\n");
}
void PrintDocVisitor::visitPost ( DocDotFile )
inlinevirtual

Implements DocVisitor.

Definition at line 504 of file printdocvisitor.h.

References indent_post().

{
printf("</dotfile>\n");
}
void PrintDocVisitor::visitPost ( DocMscFile )
inlinevirtual

Implements DocVisitor.

Definition at line 514 of file printdocvisitor.h.

References indent_post().

{
printf("</mscfile>\n");
}
void PrintDocVisitor::visitPost ( DocDiaFile )
inlinevirtual

Implements DocVisitor.

Definition at line 524 of file printdocvisitor.h.

References indent_post().

{
printf("</diafile>\n");
}
void PrintDocVisitor::visitPost ( DocLink )
inlinevirtual

Implements DocVisitor.

Definition at line 535 of file printdocvisitor.h.

References indent_post().

{
printf("</link>\n");
}
void PrintDocVisitor::visitPost ( DocRef )
inlinevirtual

Implements DocVisitor.

Definition at line 551 of file printdocvisitor.h.

References indent_post().

{
printf("</ref>\n");
}
void PrintDocVisitor::visitPost ( DocSecRefItem )
inlinevirtual

Implements DocVisitor.

Definition at line 561 of file printdocvisitor.h.

References indent_post().

{
printf("</secrefitem>\n");
}
void PrintDocVisitor::visitPost ( DocSecRefList )
inlinevirtual

Implements DocVisitor.

Definition at line 571 of file printdocvisitor.h.

References indent_post().

{
printf("</secreflist>\n");
}
void PrintDocVisitor::visitPost ( DocParamList )
inlinevirtual

Implements DocVisitor.

Definition at line 609 of file printdocvisitor.h.

References indent_post().

{
printf("</parameters>\n");
}
void PrintDocVisitor::visitPost ( DocParamSect )
inlinevirtual

Implements DocVisitor.

Definition at line 628 of file printdocvisitor.h.

References indent_post().

{
printf("</paramsect>\n");
}
void PrintDocVisitor::visitPost ( DocXRefItem )
inlinevirtual

Implements DocVisitor.

Definition at line 639 of file printdocvisitor.h.

References indent_post().

{
printf("<xrefitem/>\n");
}
void PrintDocVisitor::visitPost ( DocInternalRef )
inlinevirtual

Implements DocVisitor.

Definition at line 649 of file printdocvisitor.h.

References indent_post().

{
printf("</internalref>\n");
}
void PrintDocVisitor::visitPost ( DocCopy )
inlinevirtual

Implements DocVisitor.

Definition at line 659 of file printdocvisitor.h.

References indent_post().

{
printf("</copy>\n");
}
void PrintDocVisitor::visitPost ( DocText )
inlinevirtual

Implements DocVisitor.

Definition at line 669 of file printdocvisitor.h.

References indent_post().

{
printf("</text>\n");
}
void PrintDocVisitor::visitPost ( DocHtmlBlockQuote )
inlinevirtual

Implements DocVisitor.

Definition at line 679 of file printdocvisitor.h.

References indent_post().

{
printf("</blockquote>\n");
}
void PrintDocVisitor::visitPost ( DocVhdlFlow )
inlinevirtual

Implements DocVisitor.

Definition at line 689 of file printdocvisitor.h.

References indent_post().

{
printf("</vhdlflow>\n");
}
void PrintDocVisitor::visitPost ( DocParBlock )
inlinevirtual

Implements DocVisitor.

Definition at line 699 of file printdocvisitor.h.

References indent_post().

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

Implements DocVisitor.

Definition at line 222 of file printdocvisitor.h.

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

{
if (l->isEnumList())
{
printf("<ol>\n");
}
else
{
printf("<ul>\n");
}
}
void PrintDocVisitor::visitPre ( DocAutoListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 246 of file printdocvisitor.h.

References indent_pre().

{
printf("<li>\n");
}
void PrintDocVisitor::visitPre ( DocPara )
inlinevirtual

Implements DocVisitor.

Definition at line 256 of file printdocvisitor.h.

References indent_pre().

{
printf("<para>\n");
}
void PrintDocVisitor::visitPre ( DocRoot )
inlinevirtual

Implements DocVisitor.

Definition at line 266 of file printdocvisitor.h.

References indent_pre().

{
printf("<root>\n");
}
void PrintDocVisitor::visitPre ( DocSimpleSect s)
inlinevirtual

Implements DocVisitor.

Definition at line 276 of file printdocvisitor.h.

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

{
printf("<simplesect type=");
switch(s->type())
{
case DocSimpleSect::See: printf("see"); break;
case DocSimpleSect::Return: printf("return"); break;
case DocSimpleSect::Author: printf("author"); break;
case DocSimpleSect::Authors: printf("authors"); break;
case DocSimpleSect::Version: printf("version"); break;
case DocSimpleSect::Since: printf("since"); break;
case DocSimpleSect::Date: printf("date"); break;
case DocSimpleSect::Note: printf("note"); break;
case DocSimpleSect::Warning: printf("warning"); break;
case DocSimpleSect::Pre: printf("pre"); break;
case DocSimpleSect::Post: printf("post"); break;
case DocSimpleSect::Copyright: printf("copyright"); break;
case DocSimpleSect::Invar: printf("invar"); break;
case DocSimpleSect::Remark: printf("remark"); break;
case DocSimpleSect::Attention: printf("attention"); break;
case DocSimpleSect::User: printf("user"); break;
case DocSimpleSect::Rcs: printf("rcs"); break;
case DocSimpleSect::Unknown: printf("unknown"); break;
}
printf(">\n");
}
void PrintDocVisitor::visitPre ( DocTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 308 of file printdocvisitor.h.

References indent_pre().

{
printf("<title>\n");
}
void PrintDocVisitor::visitPre ( DocSimpleList )
inlinevirtual

Implements DocVisitor.

Definition at line 318 of file printdocvisitor.h.

References indent_pre().

{
printf("<ul>\n");
}
void PrintDocVisitor::visitPre ( DocSimpleListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 328 of file printdocvisitor.h.

References indent_pre().

{
printf("<li>\n");
}
void PrintDocVisitor::visitPre ( DocSection s)
inlinevirtual

Implements DocVisitor.

Definition at line 338 of file printdocvisitor.h.

References indent_pre(), and DocSection::level().

{
printf("<sect%d>\n",s->level());
}
void PrintDocVisitor::visitPre ( DocHtmlList s)
inlinevirtual

Implements DocVisitor.

Definition at line 348 of file printdocvisitor.h.

References indent_pre(), DocHtmlList::Ordered, and DocHtmlList::type().

{
if (s->type()==DocHtmlList::Ordered) printf("<ol>\n"); else printf("<ul>\n");
}
void PrintDocVisitor::visitPre ( DocHtmlListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 358 of file printdocvisitor.h.

References indent_pre().

{
printf("<li>\n");
}
void PrintDocVisitor::visitPre ( DocHtmlDescList )
inlinevirtual

Implements DocVisitor.

Definition at line 380 of file printdocvisitor.h.

References indent_pre().

{
printf("<dl>\n");
}
void PrintDocVisitor::visitPre ( DocHtmlDescTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 390 of file printdocvisitor.h.

References indent_pre().

{
printf("<dt>\n");
}
void PrintDocVisitor::visitPre ( DocHtmlDescData )
inlinevirtual

Implements DocVisitor.

Definition at line 400 of file printdocvisitor.h.

References indent_pre().

{
printf("<dd>\n");
}
void PrintDocVisitor::visitPre ( DocHtmlTable t)
inlinevirtual

Implements DocVisitor.

Definition at line 410 of file printdocvisitor.h.

References indent_pre(), DocHtmlTable::numColumns(), and DocHtmlTable::numRows().

{
printf("<table rows=\"%d\" cols=\"%d\">\n",
t->numRows(),t->numColumns());
}
void PrintDocVisitor::visitPre ( DocHtmlRow )
inlinevirtual

Implements DocVisitor.

Definition at line 421 of file printdocvisitor.h.

References indent_pre().

{
printf("<tr>\n");
}
void PrintDocVisitor::visitPre ( DocHtmlCell c)
inlinevirtual

Implements DocVisitor.

Definition at line 431 of file printdocvisitor.h.

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

{
printf("<t%c>\n",c->isHeading()?'h':'d');
}
void PrintDocVisitor::visitPre ( DocHtmlCaption )
inlinevirtual

Implements DocVisitor.

Definition at line 441 of file printdocvisitor.h.

References indent_pre().

{
printf("<caption>\n");
}
void PrintDocVisitor::visitPre ( DocInternal )
inlinevirtual

Implements DocVisitor.

Definition at line 451 of file printdocvisitor.h.

References indent_pre().

{
printf("<internal>\n");
}
void PrintDocVisitor::visitPre ( DocHRef href)
inlinevirtual

Implements DocVisitor.

Definition at line 461 of file printdocvisitor.h.

References indent_pre(), and DocHRef::url().

{
printf("<a url=\"%s\">\n",href->url().data());
}
void PrintDocVisitor::visitPre ( DocHtmlHeader header)
inlinevirtual

Implements DocVisitor.

Definition at line 471 of file printdocvisitor.h.

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

{
printf("<h%d>\n",header->level());
}
void PrintDocVisitor::visitPre ( DocImage img)
inlinevirtual

Implements DocVisitor.

Definition at line 481 of file printdocvisitor.h.

References DocImage::DocBook, DocImage::height(), DocImage::Html, indent_pre(), DocImage::Latex, DocImage::name(), DocImage::Rtf, DocImage::type(), and DocImage::width().

{
printf("<image src=\"%s\" type=\"",img->name().data());
switch(img->type())
{
case DocImage::Html: printf("html"); break;
case DocImage::Latex: printf("latex"); break;
case DocImage::Rtf: printf("rtf"); break;
case DocImage::DocBook: printf("docbook"); break;
}
printf("\" %s %s>\n",img->width().data(),img->height().data());
}
void PrintDocVisitor::visitPre ( DocDotFile df)
inlinevirtual

Implements DocVisitor.

Definition at line 499 of file printdocvisitor.h.

References indent_pre(), and DocDotFile::name().

{
printf("<dotfile src=\"%s\">\n",df->name().data());
}
void PrintDocVisitor::visitPre ( DocMscFile df)
inlinevirtual

Implements DocVisitor.

Definition at line 509 of file printdocvisitor.h.

References indent_pre(), and DocMscFile::name().

{
printf("<mscfile src=\"%s\">\n",df->name().data());
}
void PrintDocVisitor::visitPre ( DocDiaFile df)
inlinevirtual

Implements DocVisitor.

Definition at line 519 of file printdocvisitor.h.

References indent_pre(), and DocDiaFile::name().

{
printf("<diafile src=\"%s\">\n",df->name().data());
}
void PrintDocVisitor::visitPre ( DocLink lnk)
inlinevirtual

Implements DocVisitor.

Definition at line 529 of file printdocvisitor.h.

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

{
printf("<link ref=\"%s\" file=\"%s\" anchor=\"%s\">\n",
lnk->ref().data(),lnk->file().data(),lnk->anchor().data());
}
void PrintDocVisitor::visitPre ( DocRef ref)
inlinevirtual

Implements DocVisitor.

Definition at line 540 of file printdocvisitor.h.

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

{
printf("<ref ref=\"%s\" file=\"%s\" "
"anchor=\"%s\" targetTitle=\"%s\""
" hasLinkText=\"%s\" refToAnchor=\"%s\" refToSection=\"%s\" refToTable=\"%s\">\n",
ref->ref().data(),ref->file().data(),ref->anchor().data(),
ref->targetTitle().data(),ref->hasLinkText()?"yes":"no",
ref->refToAnchor()?"yes":"no", ref->refToSection()?"yes":"no",
ref->refToTable()?"yes":"no");
}
void PrintDocVisitor::visitPre ( DocSecRefItem ref)
inlinevirtual

Implements DocVisitor.

Definition at line 556 of file printdocvisitor.h.

References indent_pre(), and DocSecRefItem::target().

{
printf("<secrefitem target=\"%s\">\n",ref->target().data());
}
void PrintDocVisitor::visitPre ( DocSecRefList )
inlinevirtual

Implements DocVisitor.

Definition at line 566 of file printdocvisitor.h.

References indent_pre().

{
printf("<secreflist>\n");
}
void PrintDocVisitor::visitPre ( DocParamList pl)
inlinevirtual

Implements DocVisitor.

Definition at line 586 of file printdocvisitor.h.

References indent_pre(), DocNode::Kind_LinkedWord, DocNode::Kind_Word, DocParamList::parameters(), and visit().

{
//QStrListIterator sli(pl->parameters());
QListIterator<DocNode> sli(pl->parameters());
//const char *s;
DocNode *param;
printf("<parameters>");
for (sli.toFirst();(param=sli.current());++sli)
{
printf("<param>");
if (param->kind()==DocNode::Kind_Word)
{
visit((DocWord*)param);
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)param);
}
printf("</param>");
}
printf("\n");
}
void PrintDocVisitor::visitPre ( DocParamSect ps)
inlinevirtual

Implements DocVisitor.

Definition at line 614 of file printdocvisitor.h.

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

{
printf("<paramsect type=");
switch (ps->type())
{
case DocParamSect::Param: printf("param"); break;
case DocParamSect::RetVal: printf("retval"); break;
case DocParamSect::Exception: printf("exception"); break;
case DocParamSect::TemplateParam: printf("templateparam"); break;
case DocParamSect::Unknown: printf("unknown"); break;
}
printf(">\n");
}
void PrintDocVisitor::visitPre ( DocXRefItem x)
inlinevirtual

Implements DocVisitor.

Definition at line 633 of file printdocvisitor.h.

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

{
printf("<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\"/>\n",
x->file().data(),x->anchor().data(),x->title().data());
}
void PrintDocVisitor::visitPre ( DocInternalRef r)
inlinevirtual

Implements DocVisitor.

Definition at line 644 of file printdocvisitor.h.

References DocInternalRef::anchor(), DocInternalRef::file(), and indent_pre().

{
printf("<internalref file=%s anchor=%s>\n",r->file().data(),r->anchor().data());
}
void PrintDocVisitor::visitPre ( DocCopy c)
inlinevirtual

Implements DocVisitor.

Definition at line 654 of file printdocvisitor.h.

References indent_pre(), and DocCopy::link().

{
printf("<copy link=\"%s\">\n",c->link().data());
}
void PrintDocVisitor::visitPre ( DocText )
inlinevirtual

Implements DocVisitor.

Definition at line 664 of file printdocvisitor.h.

References indent_pre().

{
printf("<text>\n");
}
void PrintDocVisitor::visitPre ( DocHtmlBlockQuote )
inlinevirtual

Implements DocVisitor.

Definition at line 674 of file printdocvisitor.h.

References indent_pre().

{
printf("<blockquote>\n");
}
void PrintDocVisitor::visitPre ( DocVhdlFlow )
inlinevirtual

Implements DocVisitor.

Definition at line 684 of file printdocvisitor.h.

References indent_pre().

{
printf("<vhdlflow>\n");
}
void PrintDocVisitor::visitPre ( DocParBlock )
inlinevirtual

Implements DocVisitor.

Definition at line 694 of file printdocvisitor.h.

References indent_pre().

{
printf("<parblock>\n");
}

Member Data Documentation

int PrintDocVisitor::m_indent
private

Definition at line 730 of file printdocvisitor.h.

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

bool PrintDocVisitor::m_insidePre
private

Definition at line 732 of file printdocvisitor.h.

Referenced by visit().

bool PrintDocVisitor::m_needsEnter
private

Definition at line 731 of file printdocvisitor.h.

Referenced by indent(), and indent_leaf().


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