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

Concrete visitor implementation for LaTeX output. More...

#include <mandocvisitor.h>

Inheritance diagram for ManDocVisitor:
DocVisitor

Public Member Functions

 ManDocVisitor (FTextStream &t, CodeOutputInterface &ci, const char *langExt)
 
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 *s)
 
void visitPost (DocSection *)
 
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 *t)
 
void visitPre (DocHtmlCaption *)
 
void visitPost (DocHtmlCaption *)
 
void visitPre (DocHtmlRow *)
 
void visitPost (DocHtmlRow *)
 
void visitPre (DocHtmlCell *)
 
void visitPost (DocHtmlCell *)
 
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 *lnk)
 
void visitPost (DocLink *)
 
void visitPre (DocRef *ref)
 
void visitPost (DocRef *)
 
void visitPre (DocSecRefItem *)
 
void visitPost (DocSecRefItem *)
 
void visitPre (DocSecRefList *)
 
void visitPost (DocSecRefList *)
 
void visitPre (DocParamSect *)
 
void visitPost (DocParamSect *)
 
void visitPre (DocParamList *)
 
void visitPost (DocParamList *)
 
void visitPre (DocXRefItem *)
 
void visitPost (DocXRefItem *)
 
void visitPre (DocInternalRef *)
 
void visitPost (DocInternalRef *)
 
void visitPre (DocCopy *)
 
void visitPost (DocCopy *)
 
void visitPre (DocText *)
 
void visitPost (DocText *)
 
void visitPre (DocHtmlBlockQuote *)
 
void visitPost (DocHtmlBlockQuote *)
 
void visitPre (DocVhdlFlow *)
 
void visitPost (DocVhdlFlow *)
 
void visitPre (DocParBlock *)
 
void visitPost (DocParBlock *)
 
- Public Member Functions inherited from DocVisitor
 DocVisitor (int id)
 
virtual ~DocVisitor ()
 
int id () const
 

Private Member Functions

void filter (const char *str)
 
void pushEnabled ()
 
void popEnabled ()
 

Private Attributes

FTextStreamm_t
 
CodeOutputInterfacem_ci
 
bool m_insidePre
 
bool m_hide
 
bool m_firstCol
 
int m_indent
 
QStack< bool > m_enabled
 
QCString m_langExt
 

Detailed Description

Concrete visitor implementation for LaTeX output.

Definition at line 30 of file mandocvisitor.h.

Constructor & Destructor Documentation

ManDocVisitor::ManDocVisitor ( FTextStream t,
CodeOutputInterface ci,
const char *  langExt 
)

Definition at line 34 of file mandocvisitor.cpp.

: DocVisitor(DocVisitor_Man), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_firstCol(FALSE),
m_indent(0), m_langExt(langExt)
{
}

Member Function Documentation

void ManDocVisitor::filter ( const char *  str)
private

Definition at line 1019 of file mandocvisitor.cpp.

References m_t.

Referenced by visit(), and visitPre().

{
if (str)
{
const char *p=str;
char c=0;
while ((c=*p++))
{
switch(c)
{
case '.': m_t << "\\&."; break; // see bug652277
case '\\': m_t << "\\\\"; break;
case '"': c = '\''; // fall through
default: m_t << c; break;
}
}
}
}
void ManDocVisitor::popEnabled ( )
private

Definition at line 1043 of file mandocvisitor.cpp.

References m_enabled, and m_hide.

Referenced by visit().

{
bool *v=m_enabled.pop();
ASSERT(v!=0);
m_hide = *v;
delete v;
}
void ManDocVisitor::pushEnabled ( )
private

Definition at line 1038 of file mandocvisitor.cpp.

References m_enabled, and m_hide.

Referenced by visit().

{
m_enabled.push(new bool(m_hide));
}
void ManDocVisitor::visit ( DocWord w)
virtual

Implements DocVisitor.

Definition at line 45 of file mandocvisitor.cpp.

References filter(), m_firstCol, m_hide, and DocWord::word().

Referenced by visitPre().

{
if (m_hide) return;
filter(w->word());
m_firstCol=FALSE;
}
void ManDocVisitor::visit ( DocLinkedWord w)
virtual

Implements DocVisitor.

Definition at line 52 of file mandocvisitor.cpp.

References filter(), m_firstCol, m_hide, m_t, and DocLinkedWord::word().

{
if (m_hide) return;
m_t << "\\fB";
filter(w->word());
m_t << "\\fP";
m_firstCol=FALSE;
}
void ManDocVisitor::visit ( DocWhiteSpace w)
virtual

Implements DocVisitor.

Definition at line 61 of file mandocvisitor.cpp.

References DocWhiteSpace::chars(), m_firstCol, m_hide, m_insidePre, and m_t.

{
if (m_hide) return;
{
m_t << w->chars();
m_firstCol=w->chars().at(w->chars().length()-1)=='\n';
}
else
{
m_t << " ";
m_firstCol=FALSE;
}
}
void ManDocVisitor::visit ( DocSymbol s)
virtual

Implements DocVisitor.

Definition at line 76 of file mandocvisitor.cpp.

References HtmlEntityMapper::instance(), m_firstCol, m_hide, m_t, HtmlEntityMapper::man(), and DocSymbol::symbol().

{
if (m_hide) return;
const char *res = HtmlEntityMapper::instance()->man(s->symbol());
if (res)
{
m_t << res;
}
else
{
// no error or warning to be supplied
// err("man: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol()));
}
m_firstCol=FALSE;
}
void ManDocVisitor::visit ( DocURL u)
virtual

Implements DocVisitor.

Definition at line 92 of file mandocvisitor.cpp.

References m_firstCol, m_hide, m_t, and DocURL::url().

{
if (m_hide) return;
m_t << u->url();
m_firstCol=FALSE;
}
void ManDocVisitor::visit ( DocLineBreak )
virtual

Implements DocVisitor.

Definition at line 99 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
m_t << endl << ".br" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visit ( DocHorRuler )
virtual

Implements DocVisitor.

Definition at line 106 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visit ( DocStyleChange s)
virtual

Implements DocVisitor.

Definition at line 114 of file mandocvisitor.cpp.

References DocStyleChange::Bold, DocStyleChange::Center, DocStyleChange::Code, DocStyleChange::Div, DocStyleChange::enable(), endl(), DocStyleChange::Italic, m_firstCol, m_hide, m_insidePre, m_t, DocStyleChange::Preformatted, DocStyleChange::Small, DocStyleChange::Span, DocStyleChange::style(), DocStyleChange::Subscript, and DocStyleChange::Superscript.

{
if (m_hide) return;
switch (s->style())
{
if (s->enable()) m_t << "\\fB"; else m_t << "\\fP";
m_firstCol=FALSE;
break;
if (s->enable()) m_t << "\\fI"; else m_t << "\\fP";
m_firstCol=FALSE;
break;
if (s->enable()) m_t << "\\fC"; else m_t << "\\fP";
m_firstCol=FALSE;
break;
if (s->enable()) m_t << "\\*<"; else m_t << "\\*> ";
m_firstCol=FALSE;
break;
if (s->enable()) m_t << "\\*{"; else m_t << "\\*} ";
m_firstCol=FALSE;
break;
/* not supported */
break;
/* not supported */
break;
if (s->enable())
{
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
}
else
{
m_insidePre=FALSE;
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
break;
case DocStyleChange::Div: /* HTML only */ break;
case DocStyleChange::Span: /* HTML only */ break;
}
}
void ManDocVisitor::visit ( DocVerbatim s)
virtual

Implements DocVisitor.

Definition at line 167 of file mandocvisitor.cpp.

References DocVerbatim::Code, DocVerbatim::context(), DocVerbatim::DocbookOnly, DocVerbatim::Dot, endl(), DocVerbatim::exampleFile(), getLanguageFromFileName(), ParserManager::getParser(), DocVerbatim::HtmlOnly, DocVerbatim::isExample(), DocVerbatim::language(), DocVerbatim::LatexOnly, m_ci, m_firstCol, m_hide, m_langExt, m_t, DocVerbatim::ManOnly, DocVerbatim::Msc, ParserInterface::parseCode(), Doxygen::parserManager, DocVerbatim::PlantUML, DocVerbatim::RtfOnly, DocVerbatim::text(), DocVerbatim::type(), DocVerbatim::Verbatim, and DocVerbatim::XmlOnly.

{
if (m_hide) return;
QCString lang = m_langExt;
if (!s->language().isEmpty()) // explicit language setting
{
lang = s->language();
}
switch (s->type())
{
case DocVerbatim::Code: // fall though
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
->parseCode(m_ci,s->context(),s->text(),
langExt,
s->isExample(),s->exampleFile());
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
m_t << s->text();
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
m_t << s->text();
break;
/* nothing */
break;
}
}
void ManDocVisitor::visit ( DocAnchor )
virtual

Implements DocVisitor.

Definition at line 217 of file mandocvisitor.cpp.

{
/* no support for anchors in man pages */
}
void ManDocVisitor::visit ( DocInclude inc)
virtual

Implements DocVisitor.

Definition at line 222 of file mandocvisitor.cpp.

References DocInclude::blockId(), DocInclude::context(), DocInclude::DontInclude, endl(), err(), DocInclude::exampleFile(), DocInclude::extension(), extractBlock(), DocInclude::file(), getLanguageFromFileName(), ParserManager::getParser(), DocInclude::HtmlInclude, DocInclude::Include, DocInclude::IncludeDoc, DocInclude::IncWithLines, DocInclude::isExample(), DocInclude::LatexInclude, m_ci, m_firstCol, m_hide, m_t, parseCode(), Doxygen::parserManager, DocInclude::Snippet, DocInclude::SnippetDoc, DocInclude::text(), DocInclude::type(), and DocInclude::VerbInclude.

{
if (m_hide) return;
switch(inc->type())
{
{
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
QFileInfo cfi( inc->file() );
FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
inc->text(),
langExt,
inc->isExample(),
inc->exampleFile(),
&fd, // fileDef,
-1, // start line
-1, // end line
FALSE, // inline fragment
0, // memberDef
TRUE
);
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
break;
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
inc->text(),
langExt,
inc->isExample(),
inc->exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
TRUE, // inlineFragment
0, // memberDef
FALSE
);
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
break;
break;
break;
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
m_t << inc->text();
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
inc->isExample(),
inc->exampleFile()
);
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
"Please create a bug report\n",__FILE__);
break;
}
}
void ManDocVisitor::visit ( DocIncOperator op)
virtual

Implements DocVisitor.

Definition at line 317 of file mandocvisitor.cpp.

References DocIncOperator::context(), endl(), DocIncOperator::exampleFile(), getLanguageFromFileName(), ParserManager::getParser(), DocIncOperator::isExample(), DocIncOperator::isFirst(), DocIncOperator::isLast(), m_ci, m_firstCol, m_hide, m_langExt, m_t, ParserInterface::parseCode(), Doxygen::parserManager, popEnabled(), pushEnabled(), DocIncOperator::Skip, DocIncOperator::text(), and DocIncOperator::type().

{
//printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
if (!m_hide)
{
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
}
m_hide = TRUE;
}
{
if (!m_hide)
{
->parseCode(m_ci,op->context(),op->text(),langExt,
op->isExample(),op->exampleFile());
}
m_hide=TRUE;
}
if (op->isLast())
{
if (!m_hide)
{
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
}
else
{
if (!m_hide) m_t << endl;
}
}
void ManDocVisitor::visit ( DocFormula f)
virtual

Implements DocVisitor.

Definition at line 362 of file mandocvisitor.cpp.

References m_hide, m_t, and DocFormula::text().

{
if (m_hide) return;
m_t << f->text();
}
void ManDocVisitor::visit ( DocIndexEntry )
virtual

Implements DocVisitor.

Definition at line 368 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visit ( DocSimpleSectSep )
virtual

Implements DocVisitor.

Definition at line 372 of file mandocvisitor.cpp.

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

Implements DocVisitor.

Definition at line 376 of file mandocvisitor.cpp.

References DocCite::file(), filter(), m_hide, m_t, and DocCite::text().

{
if (m_hide) return;
m_t << "\\fB";
if (cite->file().isEmpty()) m_t << "[";
filter(cite->text());
if (cite->file().isEmpty()) m_t << "]";
m_t << "\\fP";
}
void ManDocVisitor::visitPost ( DocAutoList )
virtual

Implements DocVisitor.

Definition at line 397 of file mandocvisitor.cpp.

References endl(), m_hide, m_indent, and m_t.

{
if (m_hide) return;
m_t << ".PP" << endl;
}
void ManDocVisitor::visitPost ( DocAutoListItem )
virtual

Implements DocVisitor.

Definition at line 423 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
m_t << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocPara p)
virtual

Implements DocVisitor.

Definition at line 434 of file mandocvisitor.cpp.

References endl(), DocPara::isLast(), DocNode::kind(), DocNode::Kind_ParamSect, m_firstCol, m_hide, m_t, and DocNode::parent().

{
if (m_hide) return;
if (!p->isLast() && // omit <p> for last paragraph
!(p->parent() && // and for parameter sections
)
)
{
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
}
void ManDocVisitor::visitPost ( DocRoot )
virtual

Implements DocVisitor.

Definition at line 453 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocSimpleSect )
virtual

Implements DocVisitor.

Definition at line 511 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".RE" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocTitle )
virtual

Implements DocVisitor.

Definition at line 524 of file mandocvisitor.cpp.

References endl(), m_hide, and m_t.

{
if (m_hide) return;
m_t << "\\fP" << endl;
m_t << ".RS 4" << endl;
}
void ManDocVisitor::visitPost ( DocSimpleList )
virtual

Implements DocVisitor.

Definition at line 539 of file mandocvisitor.cpp.

References endl(), m_hide, m_indent, and m_t.

{
if (m_hide) return;
m_t << ".PP" << endl;
}
void ManDocVisitor::visitPost ( DocSimpleListItem )
virtual

Implements DocVisitor.

Definition at line 556 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
m_t << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocSection )
virtual

Implements DocVisitor.

Definition at line 575 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocHtmlList s)
virtual

Implements DocVisitor.

Definition at line 587 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, m_indent, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
}
void ManDocVisitor::visitPost ( DocHtmlListItem )
virtual

Implements DocVisitor.

Definition at line 614 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
m_t << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocHtmlDescList )
virtual

Implements DocVisitor.

Definition at line 642 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocHtmlDescTitle )
virtual

Implements DocVisitor.

Definition at line 658 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
m_t << "\\fP\" 1c" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocHtmlDescData )
virtual

Implements DocVisitor.

Definition at line 669 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocHtmlTable t)
virtual

Implements DocVisitor.

Definition at line 677 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocHtmlCaption )
virtual

Implements DocVisitor.

Definition at line 685 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocHtmlRow )
virtual

Implements DocVisitor.

Definition at line 693 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocHtmlCell )
virtual

Implements DocVisitor.

Definition at line 701 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocInternal )
virtual

Implements DocVisitor.

Definition at line 714 of file mandocvisitor.cpp.

References m_hide.

{
if (m_hide) return;
//if (!m_firstCol) m_t << endl;
//m_t << ".RE" << endl;
//m_t << ".PP" << endl;
//m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocHRef )
virtual

Implements DocVisitor.

Definition at line 729 of file mandocvisitor.cpp.

References m_hide, and m_t.

{
if (m_hide) return;
m_t << "\\fP";
}
void ManDocVisitor::visitPost ( DocHtmlHeader header)
virtual

Implements DocVisitor.

Definition at line 743 of file mandocvisitor.cpp.

References endl(), DocHtmlHeader::level(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
m_t << "\"" << endl;
if (header->level()==1) m_t << ".PP" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocImage )
virtual

Implements DocVisitor.

Definition at line 755 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocDotFile )
virtual

Implements DocVisitor.

Definition at line 763 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocMscFile )
virtual

Implements DocVisitor.

Definition at line 770 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocDiaFile )
virtual

Implements DocVisitor.

Definition at line 778 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocLink )
virtual

Implements DocVisitor.

Definition at line 788 of file mandocvisitor.cpp.

References m_hide, and m_t.

{
if (m_hide) return;
m_t << "\\fP";
}
void ManDocVisitor::visitPost ( DocRef )
virtual

Implements DocVisitor.

Definition at line 801 of file mandocvisitor.cpp.

References m_hide, and m_t.

{
if (m_hide) return;
m_t << "\\fP";
}
void ManDocVisitor::visitPost ( DocSecRefItem )
virtual

Implements DocVisitor.

Definition at line 817 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
m_t << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocSecRefList )
virtual

Implements DocVisitor.

Definition at line 830 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, m_indent, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
}
void ManDocVisitor::visitPost ( DocParamSect )
virtual

Implements DocVisitor.

Definition at line 886 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".RE" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocParamList pl)
virtual

Implements DocVisitor.

Definition at line 919 of file mandocvisitor.cpp.

References endl(), DocParamList::isLast(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
if (!pl->isLast())
{
if (!m_firstCol) m_t << endl;
m_t << ".br" << endl;
}
}
void ManDocVisitor::visitPost ( DocXRefItem x)
virtual

Implements DocVisitor.

Definition at line 944 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, m_t, and DocXRefItem::title().

{
if (m_hide) return;
if (x->title().isEmpty()) return;
if (!m_firstCol) m_t << endl;
m_t << ".RE" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocInternalRef )
virtual

Implements DocVisitor.

Definition at line 960 of file mandocvisitor.cpp.

References m_hide, and m_t.

{
if (m_hide) return;
m_t << "\\fP";
}
void ManDocVisitor::visitPost ( DocCopy )
virtual

Implements DocVisitor.

Definition at line 970 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocText )
virtual

Implements DocVisitor.

Definition at line 978 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocHtmlBlockQuote )
virtual

Implements DocVisitor.

Definition at line 993 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".RE" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost ( DocVhdlFlow )
virtual

Implements DocVisitor.

Definition at line 1006 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPost ( DocParBlock )
virtual

Implements DocVisitor.

Definition at line 1014 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocAutoList )
virtual

Implements DocVisitor.

Definition at line 391 of file mandocvisitor.cpp.

References m_hide, and m_indent.

{
if (m_hide) return;
}
void ManDocVisitor::visitPre ( DocAutoListItem li)
virtual

Implements DocVisitor.

Definition at line 404 of file mandocvisitor.cpp.

References endl(), DocAutoListItem::itemNumber(), m_firstCol, m_hide, m_indent, m_t, and DocNode::parent().

{
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << endl;
m_t << ".IP \"" << ws;
if (((DocAutoList *)li->parent())->isEnumList())
{
m_t << li->itemNumber() << ".\" " << m_indent+2;
}
else // bullet list
{
m_t << "\\(bu\" " << m_indent;
}
m_t << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPre ( DocPara )
virtual

Implements DocVisitor.

Definition at line 430 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocRoot )
virtual

Implements DocVisitor.

Definition at line 449 of file mandocvisitor.cpp.

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

Implements DocVisitor.

Definition at line 457 of file mandocvisitor.cpp.

References DocSimpleSect::Attention, DocSimpleSect::Author, DocSimpleSect::Authors, DocSimpleSect::Copyright, DocSimpleSect::Date, endl(), DocSimpleSect::Invar, m_firstCol, m_hide, m_t, DocSimpleSect::Note, DocSimpleSect::Post, DocSimpleSect::Pre, DocSimpleSect::Rcs, DocSimpleSect::Remark, DocSimpleSect::Return, DocSimpleSect::See, DocSimpleSect::Since, theTranslator, Translator::trAttention(), Translator::trAuthor(), Translator::trCopyright(), Translator::trDate(), Translator::trInvariant(), Translator::trNote(), Translator::trPostcondition(), Translator::trPrecondition(), Translator::trRemarks(), Translator::trReturns(), Translator::trSeeAlso(), Translator::trSince(), Translator::trVersion(), Translator::trWarning(), DocSimpleSect::type(), DocSimpleSect::Unknown, DocSimpleSect::User, DocSimpleSect::Version, and DocSimpleSect::Warning.

{
if (m_hide) return;
if (!m_firstCol)
{
m_t << endl;
m_t << ".PP" << endl;
}
m_t << "\\fB";
switch(s->type())
{
m_t << theTranslator->trSeeAlso(); break;
m_t << theTranslator->trReturns(); break;
m_t << theTranslator->trAuthor(TRUE,TRUE); break;
m_t << theTranslator->trAuthor(TRUE,FALSE); break;
m_t << theTranslator->trVersion(); break;
m_t << theTranslator->trSince(); break;
m_t << theTranslator->trDate(); break;
m_t << theTranslator->trNote(); break;
m_t << theTranslator->trWarning(); break;
m_t << theTranslator->trRemarks(); break;
case DocSimpleSect::User: break;
case DocSimpleSect::Rcs: break;
}
// special case 1: user defined title
{
m_t << ":\\fP" << endl;
m_t << ".RS 4" << endl;
}
}
void ManDocVisitor::visitPre ( DocTitle )
virtual

Implements DocVisitor.

Definition at line 520 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocSimpleList )
virtual

Implements DocVisitor.

Definition at line 531 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, m_indent, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".PD 0" << endl;
}
void ManDocVisitor::visitPre ( DocSimpleListItem )
virtual

Implements DocVisitor.

Definition at line 546 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, m_indent, and m_t.

{
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << endl;
m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPre ( DocSection s)
virtual

Implements DocVisitor.

Definition at line 563 of file mandocvisitor.cpp.

References endl(), filter(), DocSection::level(), m_firstCol, m_hide, m_t, and DocSection::title().

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
if (s->level()==1) m_t << ".SH"; else m_t << ".SS";
m_t << " \"";
filter(s->title());
m_t << "\"" << endl;
if (s->level()==1) m_t << ".PP" << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPre ( DocHtmlList s)
virtual

Implements DocVisitor.

Definition at line 579 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, m_indent, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".PD 0" << endl;
}
void ManDocVisitor::visitPre ( DocHtmlListItem li)
virtual

Implements DocVisitor.

Definition at line 595 of file mandocvisitor.cpp.

References endl(), DocHtmlListItem::itemNumber(), m_firstCol, m_hide, m_indent, m_t, DocHtmlList::Ordered, and DocNode::parent().

{
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << endl;
m_t << ".IP \"" << ws;
if (((DocHtmlList *)li->parent())->type()==DocHtmlList::Ordered)
{
m_t << li->itemNumber() << ".\" " << m_indent+2;
}
else // bullet list
{
m_t << "\\(bu\" " << m_indent;
}
m_t << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPre ( DocHtmlDescList )
virtual

Implements DocVisitor.

Definition at line 638 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocHtmlDescTitle )
virtual

Implements DocVisitor.

Definition at line 650 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
m_t << ".IP \"\\fB";
m_firstCol=FALSE;
}
void ManDocVisitor::visitPre ( DocHtmlDescData )
virtual

Implements DocVisitor.

Definition at line 665 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocHtmlTable t)
virtual

Implements DocVisitor.

Definition at line 673 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocHtmlCaption )
virtual

Implements DocVisitor.

Definition at line 681 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocHtmlRow )
virtual

Implements DocVisitor.

Definition at line 689 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocHtmlCell )
virtual

Implements DocVisitor.

Definition at line 697 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocInternal )
virtual

Implements DocVisitor.

Definition at line 705 of file mandocvisitor.cpp.

References m_hide.

{
if (m_hide) return;
//if (!m_firstCol) m_t << endl;
//m_t << ".PP" << endl;
//m_t << "\\fB" << theTranslator->trForInternalUseOnly() << "\\fP" << endl;
//m_t << ".RS 4" << endl;
}
void ManDocVisitor::visitPre ( DocHRef )
virtual

Implements DocVisitor.

Definition at line 723 of file mandocvisitor.cpp.

References m_hide, and m_t.

{
if (m_hide) return;
m_t << "\\fC";
}
void ManDocVisitor::visitPre ( DocHtmlHeader header)
virtual

Implements DocVisitor.

Definition at line 735 of file mandocvisitor.cpp.

References endl(), DocHtmlHeader::level(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
if (!m_firstCol) m_t << endl;
if (header->level()==1) m_t << ".SH"; else m_t << ".SS";
m_t << " \"";
}
void ManDocVisitor::visitPre ( DocImage )
virtual

Implements DocVisitor.

Definition at line 751 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocDotFile )
virtual

Implements DocVisitor.

Definition at line 759 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocMscFile )
virtual

Implements DocVisitor.

Definition at line 766 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocDiaFile )
virtual

Implements DocVisitor.

Definition at line 774 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocLink lnk)
virtual

Implements DocVisitor.

Definition at line 782 of file mandocvisitor.cpp.

References m_hide, and m_t.

{
if (m_hide) return;
m_t << "\\fB";
}
void ManDocVisitor::visitPre ( DocRef ref)
virtual

Implements DocVisitor.

Definition at line 794 of file mandocvisitor.cpp.

References filter(), DocRef::hasLinkText(), m_hide, m_t, and DocRef::targetTitle().

{
if (m_hide) return;
m_t << "\\fB";
if (!ref->hasLinkText()) filter(ref->targetTitle());
}
void ManDocVisitor::visitPre ( DocSecRefItem )
virtual

Implements DocVisitor.

Definition at line 807 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, m_indent, and m_t.

{
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << endl;
m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << endl;
m_firstCol=TRUE;
}
void ManDocVisitor::visitPre ( DocSecRefList )
virtual

Implements DocVisitor.

Definition at line 824 of file mandocvisitor.cpp.

References m_hide, and m_indent.

{
if (m_hide) return;
}
void ManDocVisitor::visitPre ( DocParamSect s)
virtual

Implements DocVisitor.

Definition at line 857 of file mandocvisitor.cpp.

References endl(), DocParamSect::Exception, m_firstCol, m_hide, m_t, DocParamSect::Param, DocParamSect::RetVal, DocParamSect::TemplateParam, theTranslator, Translator::trExceptions(), Translator::trParameters(), Translator::trReturnValues(), and DocParamSect::type().

{
if (m_hide) return;
if (!m_firstCol)
{
m_t << endl;
m_t << ".PP" << endl;
}
m_t << "\\fB";
switch(s->type())
{
/* TODO: add this
m_t << theTranslator->trTemplateParam(); break;
*/
m_t << "Template Parameters"; break;
default:
ASSERT(0);
}
m_t << ":\\fP" << endl;
m_t << ".RS 4" << endl;
}
void ManDocVisitor::visitPre ( DocParamList pl)
virtual

Implements DocVisitor.

Definition at line 895 of file mandocvisitor.cpp.

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

{
if (m_hide) return;
m_t << "\\fI";
//QStrListIterator li(pl->parameters());
//const char *s;
QListIterator<DocNode> li(pl->parameters());
DocNode *param;
bool first=TRUE;
for (li.toFirst();(param=li.current());++li)
{
if (!first) m_t << ","; else first=FALSE;
if (param->kind()==DocNode::Kind_Word)
{
visit((DocWord*)param);
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
visit((DocLinkedWord*)param);
}
}
m_t << "\\fP ";
}
void ManDocVisitor::visitPre ( DocXRefItem x)
virtual

Implements DocVisitor.

Definition at line 929 of file mandocvisitor.cpp.

References endl(), filter(), m_firstCol, m_hide, m_t, and DocXRefItem::title().

{
if (m_hide) return;
if (x->title().isEmpty()) return;
if (!m_firstCol)
{
m_t << endl;
m_t << ".PP" << endl;
}
m_t << "\\fB";
filter(x->title());
m_t << "\\fP" << endl;
m_t << ".RS 4" << endl;
}
void ManDocVisitor::visitPre ( DocInternalRef )
virtual

Implements DocVisitor.

Definition at line 954 of file mandocvisitor.cpp.

References m_hide, and m_t.

{
if (m_hide) return;
m_t << "\\fB";
}
void ManDocVisitor::visitPre ( DocCopy )
virtual

Implements DocVisitor.

Definition at line 966 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocText )
virtual

Implements DocVisitor.

Definition at line 974 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocHtmlBlockQuote )
virtual

Implements DocVisitor.

Definition at line 982 of file mandocvisitor.cpp.

References endl(), m_firstCol, m_hide, and m_t.

{
if (m_hide) return;
if (!m_firstCol)
{
m_t << endl;
m_t << ".PP" << endl;
}
m_t << ".RS 4" << endl; // TODO: add support for nested block quotes
}
void ManDocVisitor::visitPre ( DocVhdlFlow )
virtual

Implements DocVisitor.

Definition at line 1002 of file mandocvisitor.cpp.

{
}
void ManDocVisitor::visitPre ( DocParBlock )
virtual

Implements DocVisitor.

Definition at line 1010 of file mandocvisitor.cpp.

{
}

Member Data Documentation

CodeOutputInterface& ManDocVisitor::m_ci
private

Definition at line 157 of file mandocvisitor.h.

Referenced by visit().

QStack<bool> ManDocVisitor::m_enabled
private

Definition at line 162 of file mandocvisitor.h.

Referenced by popEnabled(), and pushEnabled().

bool ManDocVisitor::m_firstCol
private

Definition at line 160 of file mandocvisitor.h.

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

bool ManDocVisitor::m_hide
private

Definition at line 159 of file mandocvisitor.h.

Referenced by popEnabled(), pushEnabled(), visit(), visitPost(), and visitPre().

int ManDocVisitor::m_indent
private

Definition at line 161 of file mandocvisitor.h.

Referenced by visitPost(), and visitPre().

bool ManDocVisitor::m_insidePre
private

Definition at line 158 of file mandocvisitor.h.

Referenced by visit().

QCString ManDocVisitor::m_langExt
private

Definition at line 163 of file mandocvisitor.h.

Referenced by visit().

FTextStream& ManDocVisitor::m_t
private

Definition at line 156 of file mandocvisitor.h.

Referenced by filter(), visit(), visitPost(), and visitPre().


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