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
PerlModDocVisitor Class Reference

Concrete visitor implementation for PerlMod output. More...

Inheritance diagram for PerlModDocVisitor:
DocVisitor

Public Member Functions

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

Private Member Functions

void addLink (const QCString &ref, const QCString &file, const QCString &anchor)
 
void enterText ()
 
void leaveText ()
 
void openItem (const char *)
 
void closeItem ()
 
void singleItem (const char *)
 
void openSubBlock (const char *=0)
 
void closeSubBlock ()
 
void openOther ()
 
void closeOther ()
 

Private Attributes

PerlModOutputm_output
 
bool m_textmode
 
bool m_textblockstart
 
QCString m_other
 

Detailed Description

Concrete visitor implementation for PerlMod output.

Definition at line 286 of file perlmodgen.cpp.

Constructor & Destructor Documentation

PerlModDocVisitor::PerlModDocVisitor ( PerlModOutput output)

Definition at line 430 of file perlmodgen.cpp.

References m_output, and PerlModOutput::openList().

virtual PerlModDocVisitor::~PerlModDocVisitor ( )
inlinevirtual

Definition at line 290 of file perlmodgen.cpp.

{ }

Member Function Documentation

void PerlModDocVisitor::addLink ( const QCString &  ref,
const QCString &  file,
const QCString &  anchor 
)
private

Definition at line 443 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), and m_output.

Referenced by visit(), and visitPre().

{
QCString link = file;
if (!anchor.isEmpty())
(link += "_1") += anchor;
}
void PerlModDocVisitor::closeItem ( )
private

Definition at line 457 of file perlmodgen.cpp.

References PerlModOutput::closeHash(), leaveText(), and m_output.

Referenced by singleItem(), visit(), and visitPost().

void PerlModDocVisitor::closeOther ( )
private

Definition at line 511 of file perlmodgen.cpp.

Referenced by visitPost().

{
// Using a secondary text stream will corrupt the perl file. Instead of
// printing doc => [ data => [] ], it will print doc => [] data => [].
/*
QCString other;
leaveText();
m_output.closeSave(other);
m_other += other;
*/
}
void PerlModDocVisitor::closeSubBlock ( )
private

Definition at line 495 of file perlmodgen.cpp.

References PerlModOutput::closeList(), leaveText(), and m_output.

Referenced by visit(), and visitPost().

void PerlModDocVisitor::enterText ( )
private

Definition at line 463 of file perlmodgen.cpp.

References PerlModOutput::add(), PerlModOutput::addField(), m_output, m_textmode, and openItem().

Referenced by visit().

{
return;
openItem("text");
m_output.addField("content").add('\'');
m_textmode = true;
}
void PerlModDocVisitor::finish ( )
void PerlModDocVisitor::leaveText ( )
private
void PerlModDocVisitor::openItem ( const char *  name)
private
void PerlModDocVisitor::openOther ( )
private

Definition at line 501 of file perlmodgen.cpp.

Referenced by visitPre().

{
// Using a secondary text stream will corrupt the perl file. Instead of
// printing doc => [ data => [] ], it will print doc => [] data => [].
/*
leaveText();
m_output.openSave();
*/
}
void PerlModDocVisitor::openSubBlock ( const char *  s = 0)
private

Definition at line 488 of file perlmodgen.cpp.

References leaveText(), m_output, m_textblockstart, and PerlModOutput::openList().

Referenced by visit(), and visitPre().

void PerlModDocVisitor::singleItem ( const char *  name)
private

Definition at line 482 of file perlmodgen.cpp.

References closeItem(), and openItem().

Referenced by visit(), and visitPre().

{
openItem(name);
}
void PerlModDocVisitor::visit ( DocWord w)
virtual

Implements DocVisitor.

Definition at line 523 of file perlmodgen.cpp.

References PerlModOutput::addQuoted(), enterText(), m_output, and DocWord::word().

void PerlModDocVisitor::visit ( DocLinkedWord w)
virtual
void PerlModDocVisitor::visit ( DocWhiteSpace )
virtual

Implements DocVisitor.

Definition at line 537 of file perlmodgen.cpp.

References PerlModOutput::add(), enterText(), and m_output.

{
m_output.add(' ');
}
void PerlModDocVisitor::visit ( DocSymbol sy)
virtual

Implements DocVisitor.

Definition at line 543 of file perlmodgen.cpp.

References PerlModOutput::add(), PerlModOutput::addFieldQuotedChar(), PerlModOutput::addFieldQuotedString(), closeItem(), enterText(), err(), HtmlEntityMapper::instance(), leaveText(), m_output, openItem(), HtmlEntityMapper::perl(), DocSymbol::Perl_acute, DocSymbol::Perl_cedilla, DocSymbol::Perl_char, DocSymbol::Perl_circ, DocSymbol::Perl_grave, DocSymbol::Perl_ring, DocSymbol::Perl_slash, DocSymbol::Perl_string, DocSymbol::Perl_symbol, DocSymbol::Perl_tilde, DocSymbol::Perl_umlaut, DocSymbol::PerlSymb::symb, DocSymbol::symbol(), and DocSymbol::PerlSymb::type.

{
const char *accent=0;
if (res-> symb)
{
switch (res->type)
{
m_output.add(res->symb);
break;
m_output.add(res->symb[0]);
break;
openItem("symbol");
break;
default:
switch(res->type)
{
accent = "umlaut";
break;
accent = "acute";
break;
accent = "grave";
break;
accent = "circ";
break;
accent = "slash";
break;
accent = "tilde";
break;
accent = "cedilla";
break;
accent = "ring";
break;
default:
break;
}
if (accent)
{
openItem("accent");
.addFieldQuotedString("accent", accent)
.addFieldQuotedChar("letter", res->symb[0]);
}
break;
}
}
else
{
err("perl: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(sy->symbol(),TRUE));
}
}
void PerlModDocVisitor::visit ( DocURL u)
virtual

Implements DocVisitor.

Definition at line 613 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), closeItem(), m_output, openItem(), and DocURL::url().

{
openItem("url");
m_output.addFieldQuotedString("content", u->url());
}
void PerlModDocVisitor::visit ( DocLineBreak )
virtual

Implements DocVisitor.

Definition at line 620 of file perlmodgen.cpp.

References singleItem().

{ singleItem("linebreak"); }
void PerlModDocVisitor::visit ( DocHorRuler )
virtual

Implements DocVisitor.

Definition at line 621 of file perlmodgen.cpp.

References singleItem().

{ singleItem("hruler"); }
void PerlModDocVisitor::visit ( DocStyleChange s)
virtual

Implements DocVisitor.

Definition at line 623 of file perlmodgen.cpp.

References PerlModOutput::addFieldBoolean(), PerlModOutput::addFieldQuotedString(), DocStyleChange::Bold, DocStyleChange::Center, closeItem(), DocStyleChange::Code, DocStyleChange::Div, DocStyleChange::enable(), DocStyleChange::Italic, m_output, openItem(), DocStyleChange::Preformatted, DocStyleChange::Small, DocStyleChange::Span, DocStyleChange::style(), DocStyleChange::Subscript, and DocStyleChange::Superscript.

{
const char *style = 0;
switch (s->style())
{
case DocStyleChange::Bold: style = "bold"; break;
case DocStyleChange::Italic: style = "italic"; break;
case DocStyleChange::Code: style = "code"; break;
case DocStyleChange::Subscript: style = "subscript"; break;
case DocStyleChange::Superscript: style = "superscript"; break;
case DocStyleChange::Center: style = "center"; break;
case DocStyleChange::Small: style = "small"; break;
case DocStyleChange::Preformatted: style = "preformatted"; break;
case DocStyleChange::Div: style = "div"; break;
case DocStyleChange::Span: style = "span"; break;
}
openItem("style");
.addFieldBoolean("enable", s->enable());
}
void PerlModDocVisitor::visit ( DocVerbatim s)
virtual

Implements DocVisitor.

Definition at line 646 of file perlmodgen.cpp.

References DocNode::accept(), PerlModOutput::add(), PerlModOutput::addFieldQuotedString(), DocVerbatim::children(), closeItem(), closeSubBlock(), DocVerbatim::Code, DocVerbatim::context(), DocVerbatim::DocbookOnly, DocVerbatim::Dot, DocVerbatim::hasCaption(), DocVerbatim::HtmlOnly, DocVerbatim::LatexOnly, m_output, DocVerbatim::ManOnly, DocVerbatim::Msc, openItem(), openSubBlock(), parseCode(), DocVerbatim::PlantUML, DocVerbatim::RtfOnly, DocVerbatim::text(), DocVerbatim::type(), DocVerbatim::Verbatim, and DocVerbatim::XmlOnly.

{
const char *type = 0;
switch (s->type())
{
#if 0
m_output.add("<programlisting>");
parseCode(m_ci,s->context(),s->text(),FALSE,0);
m_output.add("</programlisting>");
return;
#endif
case DocVerbatim::Verbatim: type = "preformatted"; break;
case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::RtfOnly: type = "rtfonly"; break;
case DocVerbatim::ManOnly: type = "manonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break;
case DocVerbatim::XmlOnly: type = "xmlonly"; break;
case DocVerbatim::DocbookOnly: type = "docbookonly"; break;
case DocVerbatim::Dot: type = "dot"; break;
case DocVerbatim::Msc: type = "msc"; break;
case DocVerbatim::PlantUML: type = "plantuml"; break;
}
openItem(type);
if (s->hasCaption())
{
openSubBlock("caption");
QListIterator<DocNode> cli(s->children());
DocNode *n;
for (cli.toFirst();(n=cli.current());++cli) n->accept(this);
}
}
void PerlModDocVisitor::visit ( DocAnchor anc)
virtual

Implements DocVisitor.

Definition at line 682 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), DocAnchor::anchor(), closeItem(), DocAnchor::file(), m_output, and openItem().

{
QCString anchor = anc->file() + "_1" + anc->anchor();
openItem("anchor");
}
void PerlModDocVisitor::visit ( DocInclude inc)
virtual

Implements DocVisitor.

Definition at line 690 of file perlmodgen.cpp.

References PerlModOutput::add(), PerlModOutput::addFieldQuotedString(), closeItem(), DocInclude::context(), DocInclude::DontInclude, err(), DocInclude::exampleFile(), DocInclude::file(), DocInclude::HtmlInclude, DocInclude::Include, DocInclude::IncludeDoc, DocInclude::IncWithLines, DocInclude::isExample(), DocInclude::LatexInclude, m_output, openItem(), parseCode(), DocInclude::Snippet, DocInclude::SnippetDoc, DocInclude::text(), DocInclude::type(), and DocInclude::VerbInclude.

{
const char *type = 0;
switch(inc->type())
{
#if 0
{
m_t << "<div class=\"fragment\"><pre>";
QFileInfo cfi( inc->file() );
FileDef fd( cfi.dirPath(), cfi.fileName() );
parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile(), &fd);
m_t << "</pre></div>";
}
break;
#endif
return;
#if 0
m_output.add("<programlisting>");
parseCode(m_ci,inc->context(),inc->text(),FALSE,0);
m_output.add("</programlisting>");
#endif
return;
case DocInclude::HtmlInclude: type = "htmlonly"; break;
case DocInclude::LatexInclude: type = "latexonly"; break;
case DocInclude::VerbInclude: type = "preformatted"; break;
case DocInclude::Snippet: return;
err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
"Please create a bug report\n",__FILE__);
break;
}
openItem(type);
m_output.addFieldQuotedString("content", inc->text());
}
void PerlModDocVisitor::visit ( DocIncOperator )
virtual

Implements DocVisitor.

Definition at line 730 of file perlmodgen.cpp.

References PerlModOutput::add(), m_output, parseCode(), and DocIncOperator::Skip.

{
#if 0
//printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
m_output.add("<programlisting>");
}
if (op->type()!=DocIncOperator::Skip)
{
parseCode(m_ci,op->context(),op->text(),FALSE,0);
}
if (op->isLast())
{
m_output.add("</programlisting>");
}
else
{
m_output.add('\n');
}
#endif
}
void PerlModDocVisitor::visit ( DocFormula f)
virtual

Implements DocVisitor.

Definition at line 754 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), closeItem(), DocVisitor::id(), DocFormula::id(), m_output, openItem(), and DocFormula::text().

{
openItem("formula");
QCString id;
id += f->id();
}
void PerlModDocVisitor::visit ( DocIndexEntry )
virtual

Implements DocVisitor.

Definition at line 763 of file perlmodgen.cpp.

References PerlModOutput::add(), PerlModOutput::addQuoted(), and m_output.

{
#if 0
m_output.add("<indexentry>"
"<primaryie>");
m_output.addQuoted(ie->entry());
m_output.add("</primaryie>"
"<secondaryie></secondaryie>"
"</indexentry>");
#endif
}
void PerlModDocVisitor::visit ( DocSimpleSectSep )
virtual

Implements DocVisitor.

Definition at line 775 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visit ( DocCite cite)
virtual

Implements DocVisitor.

Definition at line 779 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), closeItem(), m_output, openItem(), and DocCite::text().

{
openItem("cite");
}
void PerlModDocVisitor::visitPost ( DocAutoList )
virtual

Implements DocVisitor.

Definition at line 798 of file perlmodgen.cpp.

References closeItem(), and closeSubBlock().

void PerlModDocVisitor::visitPost ( DocAutoListItem )
virtual

Implements DocVisitor.

Definition at line 809 of file perlmodgen.cpp.

References closeSubBlock().

void PerlModDocVisitor::visitPost ( DocPara )
virtual

Implements DocVisitor.

Definition at line 826 of file perlmodgen.cpp.

{
/*
closeSubBlock();
closeItem();
*/
}
void PerlModDocVisitor::visitPost ( DocRoot )
virtual

Implements DocVisitor.

Definition at line 838 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visitPost ( DocSimpleSect )
virtual
void PerlModDocVisitor::visitPost ( DocTitle )
virtual

Implements DocVisitor.

Definition at line 887 of file perlmodgen.cpp.

References closeItem(), and closeSubBlock().

void PerlModDocVisitor::visitPost ( DocSimpleList )
virtual

Implements DocVisitor.

Definition at line 900 of file perlmodgen.cpp.

References closeItem(), and closeSubBlock().

void PerlModDocVisitor::visitPost ( DocSimpleListItem )
virtual

Implements DocVisitor.

Definition at line 907 of file perlmodgen.cpp.

References closeSubBlock().

void PerlModDocVisitor::visitPost ( DocSection )
virtual

Implements DocVisitor.

Definition at line 917 of file perlmodgen.cpp.

References closeItem(), and closeSubBlock().

void PerlModDocVisitor::visitPost ( DocHtmlList )
virtual

Implements DocVisitor.

Definition at line 930 of file perlmodgen.cpp.

References closeItem(), and closeSubBlock().

void PerlModDocVisitor::visitPost ( DocHtmlListItem )
virtual

Implements DocVisitor.

Definition at line 937 of file perlmodgen.cpp.

References closeSubBlock().

void PerlModDocVisitor::visitPost ( DocHtmlDescList )
virtual

Implements DocVisitor.

Definition at line 960 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</variablelist>\n");
#endif
}
void PerlModDocVisitor::visitPost ( DocHtmlDescTitle )
virtual

Implements DocVisitor.

Definition at line 974 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</term></varlistentry>\n");
#endif
}
void PerlModDocVisitor::visitPost ( DocHtmlDescData )
virtual

Implements DocVisitor.

Definition at line 988 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</listitem>\n");
#endif
}
void PerlModDocVisitor::visitPost ( DocHtmlTable )
virtual

Implements DocVisitor.

Definition at line 1003 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</table>\n");
#endif
}
void PerlModDocVisitor::visitPost ( DocHtmlRow )
virtual

Implements DocVisitor.

Definition at line 1017 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</row>\n");
#endif
}
void PerlModDocVisitor::visitPost ( DocHtmlCell )
virtual

Implements DocVisitor.

Definition at line 1031 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</entry>");
#endif
}
void PerlModDocVisitor::visitPost ( DocHtmlCaption )
virtual

Implements DocVisitor.

Definition at line 1045 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</caption>\n");
#endif
}
void PerlModDocVisitor::visitPost ( DocInternal )
virtual

Implements DocVisitor.

Definition at line 1059 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</internal>");
#endif
}
void PerlModDocVisitor::visitPost ( DocHRef )
virtual

Implements DocVisitor.

Definition at line 1073 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</ulink>");
#endif
}
void PerlModDocVisitor::visitPost ( DocHtmlHeader )
virtual

Implements DocVisitor.

Definition at line 1087 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</sect"); m_output.add(header->level()); m_output.add(">\n");
#endif
}
void PerlModDocVisitor::visitPost ( DocImage )
virtual

Implements DocVisitor.

Definition at line 1129 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</image>");
#endif
}
void PerlModDocVisitor::visitPost ( DocDotFile )
virtual

Implements DocVisitor.

Definition at line 1143 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</dotfile>");
#endif
}
void PerlModDocVisitor::visitPost ( DocMscFile )
virtual

Implements DocVisitor.

Definition at line 1156 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<mscfile>");
#endif
}
void PerlModDocVisitor::visitPost ( DocDiaFile )
virtual

Implements DocVisitor.

Definition at line 1170 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</diafile>");
#endif
}
void PerlModDocVisitor::visitPost ( DocLink )
virtual

Implements DocVisitor.

Definition at line 1184 of file perlmodgen.cpp.

References closeItem().

{
}
void PerlModDocVisitor::visitPost ( DocRef )
virtual

Implements DocVisitor.

Definition at line 1197 of file perlmodgen.cpp.

References closeItem(), and closeSubBlock().

void PerlModDocVisitor::visitPost ( DocSecRefItem )
virtual

Implements DocVisitor.

Definition at line 1210 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</tocitem>");
#endif
}
void PerlModDocVisitor::visitPost ( DocSecRefList )
virtual

Implements DocVisitor.

Definition at line 1224 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("</toclist>");
#endif
}
void PerlModDocVisitor::visitPost ( DocParamSect )
virtual

Implements DocVisitor.

Definition at line 1260 of file perlmodgen.cpp.

References closeOther(), and closeSubBlock().

void PerlModDocVisitor::visitPost ( DocParamList )
virtual
void PerlModDocVisitor::visitPost ( DocXRefItem x)
virtual

Implements DocVisitor.

Definition at line 1343 of file perlmodgen.cpp.

References PerlModOutput::add(), closeItem(), closeSubBlock(), m_output, and DocXRefItem::title().

{
if (x->title().isEmpty()) return;
#if 0
m_output.add("</xrefdescription>");
m_output.add("</xrefsect>");
#endif
}
void PerlModDocVisitor::visitPost ( DocInternalRef )
virtual

Implements DocVisitor.

Definition at line 1361 of file perlmodgen.cpp.

References closeItem(), and closeSubBlock().

void PerlModDocVisitor::visitPost ( DocCopy )
virtual

Implements DocVisitor.

Definition at line 1371 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visitPost ( DocText )
virtual

Implements DocVisitor.

Definition at line 1379 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visitPost ( DocHtmlBlockQuote )
virtual

Implements DocVisitor.

Definition at line 1389 of file perlmodgen.cpp.

References closeItem(), and closeSubBlock().

void PerlModDocVisitor::visitPost ( DocVhdlFlow )
virtual

Implements DocVisitor.

Definition at line 1399 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visitPost ( DocParBlock )
virtual

Implements DocVisitor.

Definition at line 1407 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visitPre ( DocAutoList l)
virtual

Implements DocVisitor.

Definition at line 791 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), DocAutoList::isEnumList(), m_output, openItem(), and openSubBlock().

{
openItem("list");
m_output.addFieldQuotedString("style", l->isEnumList() ? "ordered" : "itemized");
openSubBlock("content");
}
void PerlModDocVisitor::visitPre ( DocAutoListItem )
virtual

Implements DocVisitor.

Definition at line 804 of file perlmodgen.cpp.

References openSubBlock().

{
}
void PerlModDocVisitor::visitPre ( DocPara )
virtual

Implements DocVisitor.

Definition at line 814 of file perlmodgen.cpp.

References m_textblockstart, and singleItem().

{
else
singleItem("parbreak");
/*
openItem("para");
openSubBlock("content");
*/
}
void PerlModDocVisitor::visitPre ( DocRoot )
virtual

Implements DocVisitor.

Definition at line 834 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visitPre ( DocSimpleSect s)
virtual

Implements DocVisitor.

Definition at line 842 of file perlmodgen.cpp.

References DocSimpleSect::Attention, DocSimpleSect::Author, DocSimpleSect::Authors, DocSimpleSect::Copyright, DocSimpleSect::Date, err(), DocSimpleSect::Invar, leaveText(), m_output, DocSimpleSect::Note, PerlModOutput::openHash(), openOther(), openSubBlock(), 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.

{
const char *type = 0;
switch (s->type())
{
case DocSimpleSect::See: type = "see"; break;
case DocSimpleSect::Return: type = "return"; break;
case DocSimpleSect::Author: type = "author"; break;
case DocSimpleSect::Authors: type = "authors"; break;
case DocSimpleSect::Version: type = "version"; break;
case DocSimpleSect::Since: type = "since"; break;
case DocSimpleSect::Date: type = "date"; break;
case DocSimpleSect::Note: type = "note"; break;
case DocSimpleSect::Warning: type = "warning"; break;
case DocSimpleSect::Pre: type = "pre"; break;
case DocSimpleSect::Post: type = "post"; break;
case DocSimpleSect::Copyright: type = "copyright"; break;
case DocSimpleSect::Invar: type = "invariant"; break;
case DocSimpleSect::Remark: type = "remark"; break;
case DocSimpleSect::Attention: type = "attention"; break;
case DocSimpleSect::User: type = "par"; break;
case DocSimpleSect::Rcs: type = "rcs"; break;
err("unknown simple section found\n");
break;
}
openSubBlock(type);
}
void PerlModDocVisitor::visitPre ( DocTitle )
virtual

Implements DocVisitor.

Definition at line 881 of file perlmodgen.cpp.

References openItem(), and openSubBlock().

{
openItem("title");
openSubBlock("content");
}
void PerlModDocVisitor::visitPre ( DocSimpleList )
virtual

Implements DocVisitor.

Definition at line 893 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), m_output, openItem(), and openSubBlock().

{
openItem("list");
m_output.addFieldQuotedString("style", "itemized");
openSubBlock("content");
}
void PerlModDocVisitor::visitPre ( DocSimpleListItem )
virtual

Implements DocVisitor.

Definition at line 906 of file perlmodgen.cpp.

References openSubBlock().

void PerlModDocVisitor::visitPre ( DocSection s)
virtual

Implements DocVisitor.

Definition at line 909 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), DocSection::level(), m_output, openItem(), openSubBlock(), and DocSection::title().

{
QCString sect = QCString().sprintf("sect%d",s->level());
openItem(sect);
openSubBlock("content");
}
void PerlModDocVisitor::visitPre ( DocHtmlList l)
virtual

Implements DocVisitor.

Definition at line 923 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), m_output, openItem(), openSubBlock(), DocHtmlList::Ordered, and DocHtmlList::type().

{
openItem("list");
m_output.addFieldQuotedString("style", (l->type() == DocHtmlList::Ordered) ? "ordered" : "itemized");
openSubBlock("content");
}
void PerlModDocVisitor::visitPre ( DocHtmlListItem )
virtual

Implements DocVisitor.

Definition at line 936 of file perlmodgen.cpp.

References openSubBlock().

void PerlModDocVisitor::visitPre ( DocHtmlDescList )
virtual

Implements DocVisitor.

Definition at line 953 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<variablelist>\n");
#endif
}
void PerlModDocVisitor::visitPre ( DocHtmlDescTitle )
virtual

Implements DocVisitor.

Definition at line 967 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<varlistentry><term>");
#endif
}
void PerlModDocVisitor::visitPre ( DocHtmlDescData )
virtual

Implements DocVisitor.

Definition at line 981 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<listitem>");
#endif
}
void PerlModDocVisitor::visitPre ( DocHtmlTable )
virtual

Implements DocVisitor.

Definition at line 995 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<table rows=\""); m_output.add(t->numRows());
m_output.add("\" cols=\""); m_output.add(t->numCols()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPre ( DocHtmlRow )
virtual

Implements DocVisitor.

Definition at line 1010 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<row>\n");
#endif
}
void PerlModDocVisitor::visitPre ( DocHtmlCell )
virtual

Implements DocVisitor.

Definition at line 1024 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
if (c->isHeading()) m_output.add("<entry thead=\"yes\">"); else m_output.add("<entry thead=\"no\">");
#endif
}
void PerlModDocVisitor::visitPre ( DocHtmlCaption )
virtual

Implements DocVisitor.

Definition at line 1038 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<caption>");
#endif
}
void PerlModDocVisitor::visitPre ( DocInternal )
virtual

Implements DocVisitor.

Definition at line 1052 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<internal>");
#endif
}
void PerlModDocVisitor::visitPre ( DocHRef )
virtual

Implements DocVisitor.

Definition at line 1066 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<ulink url=\""); m_output.add(href->url()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPre ( DocHtmlHeader )
virtual

Implements DocVisitor.

Definition at line 1080 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<sect"); m_output.add(header->level()); m_output.add(">");
#endif
}
void PerlModDocVisitor::visitPre ( DocImage )
virtual

Implements DocVisitor.

Definition at line 1094 of file perlmodgen.cpp.

References PerlModOutput::add(), PerlModOutput::addQuoted(), DocImage::Html, DocImage::Latex, m_output, and DocImage::Rtf.

{
#if 0
m_output.add("<image type=\"");
switch(img->type())
{
case DocImage::Html: m_output.add("html"); break;
case DocImage::Latex: m_output.add("latex"); break;
case DocImage::Rtf: m_output.add("rtf"); break;
}
m_output.add("\"");
QCString baseName=img->name();
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
m_output.add(" name=\""); m_output.add(baseName); m_output.add("\"");
if (!img->width().isEmpty())
{
m_output.add(" width=\"");
m_output.addQuoted(img->width());
m_output.add("\"");
}
else if (!img->height().isEmpty())
{
m_output.add(" height=\"");
m_output.addQuoted(img->height());
m_output.add("\"");
}
m_output.add(">");
#endif
}
void PerlModDocVisitor::visitPre ( DocDotFile )
virtual

Implements DocVisitor.

Definition at line 1136 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<dotfile name=\""); m_output.add(df->file()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPre ( DocMscFile )
virtual

Implements DocVisitor.

Definition at line 1149 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<mscfile name=\""); m_output.add(df->file()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPre ( DocDiaFile )
virtual

Implements DocVisitor.

Definition at line 1163 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<diafile name=\""); m_output.add(df->file()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPre ( DocLink lnk)
virtual

Implements DocVisitor.

Definition at line 1178 of file perlmodgen.cpp.

References addLink(), DocLink::anchor(), DocLink::file(), openItem(), and DocLink::ref().

{
openItem("link");
addLink(lnk->ref(), lnk->file(), lnk->anchor());
}
void PerlModDocVisitor::visitPre ( DocRef ref)
virtual
void PerlModDocVisitor::visitPre ( DocSecRefItem )
virtual

Implements DocVisitor.

Definition at line 1203 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<tocitem id=\""); m_output.add(ref->file()); m_output.add("_1"); m_output.add(ref->anchor()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPre ( DocSecRefList )
virtual

Implements DocVisitor.

Definition at line 1217 of file perlmodgen.cpp.

References PerlModOutput::add(), and m_output.

{
#if 0
m_output.add("<toclist>");
#endif
}
void PerlModDocVisitor::visitPre ( DocParamSect s)
virtual

Implements DocVisitor.

Definition at line 1242 of file perlmodgen.cpp.

References err(), DocParamSect::Exception, leaveText(), openOther(), openSubBlock(), DocParamSect::Param, DocParamSect::RetVal, DocParamSect::TemplateParam, DocParamSect::type(), and DocParamSect::Unknown.

{
const char *type = 0;
switch(s->type())
{
case DocParamSect::Param: type = "params"; break;
case DocParamSect::RetVal: type = "retvals"; break;
case DocParamSect::Exception: type = "exceptions"; break;
case DocParamSect::TemplateParam: type = "templateparam"; break;
err("unknown parameter section found\n");
break;
}
openSubBlock(type);
}
void PerlModDocVisitor::visitPre ( DocParamList pl)
virtual

Implements DocVisitor.

Definition at line 1266 of file perlmodgen.cpp.

References PerlModOutput::addFieldQuotedString(), PerlModOutput::closeHash(), PerlModOutput::closeList(), DocParamList::direction(), DocParamSect::hasInOutSpecifier(), DocParamSect::In, DocParamSect::InOut, DocNode::kind(), DocNode::Kind_LinkedWord, DocNode::Kind_ParamSect, DocNode::Kind_Word, leaveText(), m_output, PerlModOutput::openHash(), PerlModOutput::openList(), DocParamSect::Out, DocParamList::parameters(), DocNode::parent(), and DocParamSect::Unspecified.

{
.openList("parameters");
//QStrListIterator li(pl->parameters());
//const char *s;
QListIterator<DocNode> li(pl->parameters());
DocNode *param;
for (li.toFirst();(param=li.current());++li)
{
QCString name;
if (param->kind()==DocNode::Kind_Word)
{
name = ((DocWord*)param)->word();
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
name = ((DocLinkedWord*)param)->word();
}
QCString dir = "";
DocParamSect *sect = 0;
{
sect=(DocParamSect*)pl->parent();
}
if (sect && sect->hasInOutSpecifier())
{
{
{
dir = "in";
}
else if (pl->direction()==DocParamSect::Out)
{
dir = "out";
}
else if (pl->direction()==DocParamSect::InOut)
{
dir = "in,out";
}
}
}
.addFieldQuotedString("name", name).addFieldQuotedString("dir", dir)
}
.openList("doc");
}
void PerlModDocVisitor::visitPre ( DocXRefItem x)
virtual

Implements DocVisitor.

Definition at line 1327 of file perlmodgen.cpp.

References PerlModOutput::add(), PerlModOutput::addQuoted(), DocXRefItem::anchor(), DocXRefItem::file(), m_output, openItem(), openSubBlock(), and DocXRefItem::title().

{
#if 0
m_output.add("<xrefsect id=\"");
m_output.add(x->file()); m_output.add("_1"); m_output.add(x->anchor());
m_output.add("\">");
m_output.add("<xreftitle>");
m_output.add("</xreftitle>");
m_output.add("<xrefdescription>");
#endif
if (x->title().isEmpty()) return;
openItem("xrefitem");
openSubBlock("content");
}
void PerlModDocVisitor::visitPre ( DocInternalRef ref)
virtual

Implements DocVisitor.

Definition at line 1354 of file perlmodgen.cpp.

References addLink(), DocInternalRef::anchor(), DocInternalRef::file(), openItem(), and openSubBlock().

{
openItem("ref");
addLink(0,ref->file(),ref->anchor());
openSubBlock("content");
}
void PerlModDocVisitor::visitPre ( DocCopy )
virtual

Implements DocVisitor.

Definition at line 1367 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visitPre ( DocText )
virtual

Implements DocVisitor.

Definition at line 1375 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visitPre ( DocHtmlBlockQuote )
virtual

Implements DocVisitor.

Definition at line 1383 of file perlmodgen.cpp.

References openItem(), and openSubBlock().

{
openItem("blockquote");
openSubBlock("content");
}
void PerlModDocVisitor::visitPre ( DocVhdlFlow )
virtual

Implements DocVisitor.

Definition at line 1395 of file perlmodgen.cpp.

{
}
void PerlModDocVisitor::visitPre ( DocParBlock )
virtual

Implements DocVisitor.

Definition at line 1403 of file perlmodgen.cpp.

{
}

Member Data Documentation

QCString PerlModDocVisitor::m_other
private

Definition at line 427 of file perlmodgen.cpp.

Referenced by finish().

PerlModOutput& PerlModDocVisitor::m_output
private
bool PerlModDocVisitor::m_textblockstart
private

Definition at line 426 of file perlmodgen.cpp.

Referenced by openSubBlock(), and visitPre().

bool PerlModDocVisitor::m_textmode
private

Definition at line 425 of file perlmodgen.cpp.

Referenced by enterText(), and leaveText().


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