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

Concrete visitor implementation for TEXT output. More...

#include <textdocvisitor.h>

Inheritance diagram for TextDocVisitor:
DocVisitor

Public Member Functions

 TextDocVisitor (FTextStream &t)
 
void visit (DocWord *w)
 
void visit (DocLinkedWord *w)
 
void visit (DocWhiteSpace *)
 
void visit (DocSymbol *)
 
void visit (DocURL *u)
 
void visit (DocLineBreak *)
 
void visit (DocHorRuler *)
 
void visit (DocStyleChange *)
 
void visit (DocVerbatim *s)
 
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 filter (const char *str)
 

Private Attributes

FTextStreamm_t
 

Detailed Description

Concrete visitor implementation for TEXT output.

Definition at line 30 of file textdocvisitor.h.

Constructor & Destructor Documentation

TextDocVisitor::TextDocVisitor ( FTextStream t)
inline

Definition at line 33 of file textdocvisitor.h.

const int DocVisitor_Text
Definition: docvisitor.h:28
FTextStream & m_t
DocVisitor(int id)
Definition: docvisitor.h:94

Member Function Documentation

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

Definition at line 41 of file textdocvisitor.cpp.

42 {
43  if (str==0) return;
44  //printf("TextDocVisitor::filter(%s)\n",str);
45  const char *p=str;
46  char c;
47  while (*p)
48  {
49  c=*p++;
50  switch(c)
51  {
52  case '\n': m_t << " "; break;
53  case '"': m_t << "&quot;"; break;
54  case '\'': m_t << "&#39;"; break;
55  case '<': m_t << "&lt;"; break;
56  case '>': m_t << "&gt;"; break;
57  case '&': m_t << "&amp;"; break;
58  default: m_t << c;
59  }
60  }
61 }
FTextStream & m_t
p
Definition: test.py:223
static QCString str
void TextDocVisitor::visit ( DocWord w)
inlinevirtual

Implements DocVisitor.

Definition at line 39 of file textdocvisitor.h.

39 { filter(w->word()); }
QCString word() const
Definition: docparser.h:199
void filter(const char *str)
void TextDocVisitor::visit ( DocLinkedWord w)
inlinevirtual

Implements DocVisitor.

Definition at line 40 of file textdocvisitor.h.

40 { filter(w->word()); }
QCString word() const
Definition: docparser.h:215
void filter(const char *str)
void TextDocVisitor::visit ( DocWhiteSpace )
inlinevirtual

Implements DocVisitor.

Definition at line 41 of file textdocvisitor.h.

41 { m_t << " "; }
FTextStream & m_t
void TextDocVisitor::visit ( DocSymbol s)
virtual

Implements DocVisitor.

Definition at line 27 of file textdocvisitor.cpp.

28 {
29  const char *res = HtmlEntityMapper::instance()->html(s->symbol());
30  if (res)
31  {
32  m_t << res;
33  }
34  else
35  {
36  err("text: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
37  }
38 }
static HtmlEntityMapper * instance()
Definition: htmlentity.cpp:341
FTextStream & m_t
const char * html(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the html code of the HTML entity.
Definition: htmlentity.cpp:386
void err(const char *fmt,...)
Definition: message.cpp:226
SymType symbol() const
Definition: docparser.h:418
const bool TRUE
Definition: qglobal.h:371
void TextDocVisitor::visit ( DocURL u)
inlinevirtual

Implements DocVisitor.

Definition at line 43 of file textdocvisitor.h.

43 { filter(u->url()); }
QCString url() const
Definition: docparser.h:239
void filter(const char *str)
void TextDocVisitor::visit ( DocLineBreak )
inlinevirtual

Implements DocVisitor.

Definition at line 44 of file textdocvisitor.h.

44 { m_t << " "; }
FTextStream & m_t
void TextDocVisitor::visit ( DocHorRuler )
inlinevirtual

Implements DocVisitor.

Definition at line 45 of file textdocvisitor.h.

45 {}
void TextDocVisitor::visit ( DocStyleChange )
inlinevirtual

Implements DocVisitor.

Definition at line 46 of file textdocvisitor.h.

46 {}
void TextDocVisitor::visit ( DocVerbatim s)
inlinevirtual

Implements DocVisitor.

Definition at line 47 of file textdocvisitor.h.

47 { filter(s->text()); }
QCString text() const
Definition: docparser.h:450
void filter(const char *str)
void TextDocVisitor::visit ( DocAnchor )
inlinevirtual

Implements DocVisitor.

Definition at line 48 of file textdocvisitor.h.

48 {}
void TextDocVisitor::visit ( DocInclude )
inlinevirtual

Implements DocVisitor.

Definition at line 49 of file textdocvisitor.h.

49 {}
void TextDocVisitor::visit ( DocIncOperator )
inlinevirtual

Implements DocVisitor.

Definition at line 50 of file textdocvisitor.h.

50 {}
void TextDocVisitor::visit ( DocFormula )
inlinevirtual

Implements DocVisitor.

Definition at line 51 of file textdocvisitor.h.

51 {}
void TextDocVisitor::visit ( DocIndexEntry )
inlinevirtual

Implements DocVisitor.

Definition at line 52 of file textdocvisitor.h.

52 {}
void TextDocVisitor::visit ( DocSimpleSectSep )
inlinevirtual

Implements DocVisitor.

Definition at line 53 of file textdocvisitor.h.

53 {}
void TextDocVisitor::visit ( DocCite )
inlinevirtual

Implements DocVisitor.

Definition at line 54 of file textdocvisitor.h.

54 {}
void TextDocVisitor::visitPost ( DocAutoList )
inlinevirtual

Implements DocVisitor.

Definition at line 61 of file textdocvisitor.h.

61 {}
void TextDocVisitor::visitPost ( DocAutoListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 63 of file textdocvisitor.h.

63 {}
void TextDocVisitor::visitPost ( DocPara )
inlinevirtual

Implements DocVisitor.

Definition at line 65 of file textdocvisitor.h.

65 {}
void TextDocVisitor::visitPost ( DocRoot )
inlinevirtual

Implements DocVisitor.

Definition at line 67 of file textdocvisitor.h.

67 {}
void TextDocVisitor::visitPost ( DocSimpleSect )
inlinevirtual

Implements DocVisitor.

Definition at line 69 of file textdocvisitor.h.

69 {}
void TextDocVisitor::visitPost ( DocTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 71 of file textdocvisitor.h.

71 {}
void TextDocVisitor::visitPost ( DocSimpleList )
inlinevirtual

Implements DocVisitor.

Definition at line 73 of file textdocvisitor.h.

73 {}
void TextDocVisitor::visitPost ( DocSimpleListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 75 of file textdocvisitor.h.

75 {}
void TextDocVisitor::visitPost ( DocSection )
inlinevirtual

Implements DocVisitor.

Definition at line 77 of file textdocvisitor.h.

77 {}
void TextDocVisitor::visitPost ( DocHtmlList )
inlinevirtual

Implements DocVisitor.

Definition at line 79 of file textdocvisitor.h.

79 {}
void TextDocVisitor::visitPost ( DocHtmlListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 81 of file textdocvisitor.h.

81 {}
void TextDocVisitor::visitPost ( DocHtmlDescList )
inlinevirtual

Implements DocVisitor.

Definition at line 83 of file textdocvisitor.h.

83 {}
void TextDocVisitor::visitPost ( DocHtmlDescTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 85 of file textdocvisitor.h.

85 {}
void TextDocVisitor::visitPost ( DocHtmlDescData )
inlinevirtual

Implements DocVisitor.

Definition at line 87 of file textdocvisitor.h.

87 {}
void TextDocVisitor::visitPost ( DocHtmlTable )
inlinevirtual

Implements DocVisitor.

Definition at line 89 of file textdocvisitor.h.

89 {}
void TextDocVisitor::visitPost ( DocHtmlRow )
inlinevirtual

Implements DocVisitor.

Definition at line 91 of file textdocvisitor.h.

91 {}
void TextDocVisitor::visitPost ( DocHtmlCell )
inlinevirtual

Implements DocVisitor.

Definition at line 93 of file textdocvisitor.h.

93 {}
void TextDocVisitor::visitPost ( DocHtmlCaption )
inlinevirtual

Implements DocVisitor.

Definition at line 95 of file textdocvisitor.h.

95 {}
void TextDocVisitor::visitPost ( DocInternal )
inlinevirtual

Implements DocVisitor.

Definition at line 97 of file textdocvisitor.h.

97 {}
void TextDocVisitor::visitPost ( DocHRef )
inlinevirtual

Implements DocVisitor.

Definition at line 99 of file textdocvisitor.h.

99 {}
void TextDocVisitor::visitPost ( DocHtmlHeader )
inlinevirtual

Implements DocVisitor.

Definition at line 101 of file textdocvisitor.h.

101 {}
void TextDocVisitor::visitPost ( DocImage )
inlinevirtual

Implements DocVisitor.

Definition at line 103 of file textdocvisitor.h.

103 {}
void TextDocVisitor::visitPost ( DocDotFile )
inlinevirtual

Implements DocVisitor.

Definition at line 105 of file textdocvisitor.h.

105 {}
void TextDocVisitor::visitPost ( DocMscFile )
inlinevirtual

Implements DocVisitor.

Definition at line 108 of file textdocvisitor.h.

108 {}
void TextDocVisitor::visitPost ( DocDiaFile )
inlinevirtual

Implements DocVisitor.

Definition at line 110 of file textdocvisitor.h.

110 {}
void TextDocVisitor::visitPost ( DocLink )
inlinevirtual

Implements DocVisitor.

Definition at line 112 of file textdocvisitor.h.

112 {}
void TextDocVisitor::visitPost ( DocRef )
inlinevirtual

Implements DocVisitor.

Definition at line 114 of file textdocvisitor.h.

114 {}
void TextDocVisitor::visitPost ( DocSecRefItem )
inlinevirtual

Implements DocVisitor.

Definition at line 116 of file textdocvisitor.h.

116 {}
void TextDocVisitor::visitPost ( DocSecRefList )
inlinevirtual

Implements DocVisitor.

Definition at line 118 of file textdocvisitor.h.

118 {}
void TextDocVisitor::visitPost ( DocParamSect )
inlinevirtual

Implements DocVisitor.

Definition at line 120 of file textdocvisitor.h.

120 {}
void TextDocVisitor::visitPost ( DocParamList )
inlinevirtual

Implements DocVisitor.

Definition at line 122 of file textdocvisitor.h.

122 {}
void TextDocVisitor::visitPost ( DocXRefItem )
inlinevirtual

Implements DocVisitor.

Definition at line 124 of file textdocvisitor.h.

124 {}
void TextDocVisitor::visitPost ( DocInternalRef )
inlinevirtual

Implements DocVisitor.

Definition at line 126 of file textdocvisitor.h.

126 {}
void TextDocVisitor::visitPost ( DocCopy )
inlinevirtual

Implements DocVisitor.

Definition at line 128 of file textdocvisitor.h.

128 {}
void TextDocVisitor::visitPost ( DocText )
inlinevirtual

Implements DocVisitor.

Definition at line 130 of file textdocvisitor.h.

130 {}
void TextDocVisitor::visitPost ( DocHtmlBlockQuote )
inlinevirtual

Implements DocVisitor.

Definition at line 132 of file textdocvisitor.h.

132 {}
void TextDocVisitor::visitPost ( DocVhdlFlow )
inlinevirtual

Implements DocVisitor.

Definition at line 134 of file textdocvisitor.h.

134 {}
void TextDocVisitor::visitPost ( DocParBlock )
inlinevirtual

Implements DocVisitor.

Definition at line 136 of file textdocvisitor.h.

136 {}
void TextDocVisitor::visitPre ( DocAutoList )
inlinevirtual

Implements DocVisitor.

Definition at line 60 of file textdocvisitor.h.

60 {}
void TextDocVisitor::visitPre ( DocAutoListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 62 of file textdocvisitor.h.

62 {}
void TextDocVisitor::visitPre ( DocPara )
inlinevirtual

Implements DocVisitor.

Definition at line 64 of file textdocvisitor.h.

64 {}
void TextDocVisitor::visitPre ( DocRoot )
inlinevirtual

Implements DocVisitor.

Definition at line 66 of file textdocvisitor.h.

66 {}
void TextDocVisitor::visitPre ( DocSimpleSect )
inlinevirtual

Implements DocVisitor.

Definition at line 68 of file textdocvisitor.h.

68 {}
void TextDocVisitor::visitPre ( DocTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 70 of file textdocvisitor.h.

70 {}
void TextDocVisitor::visitPre ( DocSimpleList )
inlinevirtual

Implements DocVisitor.

Definition at line 72 of file textdocvisitor.h.

72 {}
void TextDocVisitor::visitPre ( DocSimpleListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 74 of file textdocvisitor.h.

74 {}
void TextDocVisitor::visitPre ( DocSection )
inlinevirtual

Implements DocVisitor.

Definition at line 76 of file textdocvisitor.h.

76 {}
void TextDocVisitor::visitPre ( DocHtmlList )
inlinevirtual

Implements DocVisitor.

Definition at line 78 of file textdocvisitor.h.

78 {}
void TextDocVisitor::visitPre ( DocHtmlListItem )
inlinevirtual

Implements DocVisitor.

Definition at line 80 of file textdocvisitor.h.

80 {}
void TextDocVisitor::visitPre ( DocHtmlDescList )
inlinevirtual

Implements DocVisitor.

Definition at line 82 of file textdocvisitor.h.

82 {}
void TextDocVisitor::visitPre ( DocHtmlDescTitle )
inlinevirtual

Implements DocVisitor.

Definition at line 84 of file textdocvisitor.h.

84 {}
void TextDocVisitor::visitPre ( DocHtmlDescData )
inlinevirtual

Implements DocVisitor.

Definition at line 86 of file textdocvisitor.h.

86 {}
void TextDocVisitor::visitPre ( DocHtmlTable )
inlinevirtual

Implements DocVisitor.

Definition at line 88 of file textdocvisitor.h.

88 {}
void TextDocVisitor::visitPre ( DocHtmlRow )
inlinevirtual

Implements DocVisitor.

Definition at line 90 of file textdocvisitor.h.

90 {}
void TextDocVisitor::visitPre ( DocHtmlCell )
inlinevirtual

Implements DocVisitor.

Definition at line 92 of file textdocvisitor.h.

92 {}
void TextDocVisitor::visitPre ( DocHtmlCaption )
inlinevirtual

Implements DocVisitor.

Definition at line 94 of file textdocvisitor.h.

94 {}
void TextDocVisitor::visitPre ( DocInternal )
inlinevirtual

Implements DocVisitor.

Definition at line 96 of file textdocvisitor.h.

96 {}
void TextDocVisitor::visitPre ( DocHRef )
inlinevirtual

Implements DocVisitor.

Definition at line 98 of file textdocvisitor.h.

98 {}
void TextDocVisitor::visitPre ( DocHtmlHeader )
inlinevirtual

Implements DocVisitor.

Definition at line 100 of file textdocvisitor.h.

100 {}
void TextDocVisitor::visitPre ( DocImage )
inlinevirtual

Implements DocVisitor.

Definition at line 102 of file textdocvisitor.h.

102 {}
void TextDocVisitor::visitPre ( DocDotFile )
inlinevirtual

Implements DocVisitor.

Definition at line 104 of file textdocvisitor.h.

104 {}
void TextDocVisitor::visitPre ( DocMscFile )
inlinevirtual

Implements DocVisitor.

Definition at line 107 of file textdocvisitor.h.

107 {}
void TextDocVisitor::visitPre ( DocDiaFile )
inlinevirtual

Implements DocVisitor.

Definition at line 109 of file textdocvisitor.h.

109 {}
void TextDocVisitor::visitPre ( DocLink )
inlinevirtual

Implements DocVisitor.

Definition at line 111 of file textdocvisitor.h.

111 {}
void TextDocVisitor::visitPre ( DocRef )
inlinevirtual

Implements DocVisitor.

Definition at line 113 of file textdocvisitor.h.

113 {}
void TextDocVisitor::visitPre ( DocSecRefItem )
inlinevirtual

Implements DocVisitor.

Definition at line 115 of file textdocvisitor.h.

115 {}
void TextDocVisitor::visitPre ( DocSecRefList )
inlinevirtual

Implements DocVisitor.

Definition at line 117 of file textdocvisitor.h.

117 {}
void TextDocVisitor::visitPre ( DocParamSect )
inlinevirtual

Implements DocVisitor.

Definition at line 119 of file textdocvisitor.h.

119 {}
void TextDocVisitor::visitPre ( DocParamList )
inlinevirtual

Implements DocVisitor.

Definition at line 121 of file textdocvisitor.h.

121 {}
void TextDocVisitor::visitPre ( DocXRefItem )
inlinevirtual

Implements DocVisitor.

Definition at line 123 of file textdocvisitor.h.

123 {}
void TextDocVisitor::visitPre ( DocInternalRef )
inlinevirtual

Implements DocVisitor.

Definition at line 125 of file textdocvisitor.h.

125 {}
void TextDocVisitor::visitPre ( DocCopy )
inlinevirtual

Implements DocVisitor.

Definition at line 127 of file textdocvisitor.h.

127 {}
void TextDocVisitor::visitPre ( DocText )
inlinevirtual

Implements DocVisitor.

Definition at line 129 of file textdocvisitor.h.

129 {}
void TextDocVisitor::visitPre ( DocHtmlBlockQuote )
inlinevirtual

Implements DocVisitor.

Definition at line 131 of file textdocvisitor.h.

131 {}
void TextDocVisitor::visitPre ( DocVhdlFlow )
inlinevirtual

Implements DocVisitor.

Definition at line 133 of file textdocvisitor.h.

133 {}
void TextDocVisitor::visitPre ( DocParBlock )
inlinevirtual

Implements DocVisitor.

Definition at line 135 of file textdocvisitor.h.

135 {}

Member Data Documentation

FTextStream& TextDocVisitor::m_t
private

Definition at line 142 of file textdocvisitor.h.


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