Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
doxygen-1.8.11
src
textdocvisitor.cpp
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
*
4
*
5
*
6
* Copyright (C) 1997-2015 by Dimitri van Heesch.
7
*
8
* Permission to use, copy, modify, and distribute this software and its
9
* documentation under the terms of the GNU General Public License is hereby
10
* granted. No representations are made about the suitability of this software
11
* for any purpose. It is provided "as is" without express or implied warranty.
12
* See the GNU General Public License for more details.
13
*
14
* Documents produced by Doxygen are derivative works derived from the
15
* input used in their production; they are not affected by this license.
16
*
17
*/
18
19
#include <
qdir.h
>
20
#include "
textdocvisitor.h
"
21
#include "
message.h
"
22
#include "
util.h
"
23
#include "
htmlentity.h
"
24
25
//-------------------------------------------------------------------------
26
27
void
TextDocVisitor::visit
(
DocSymbol
*
s
)
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
}
39
40
41
void
TextDocVisitor::filter
(
const
char
*
str
)
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
<<
"""
;
break
;
54
case
'\''
:
m_t
<<
"'"
;
break
;
55
case
'<'
:
m_t
<<
"<"
;
break
;
56
case
'>'
:
m_t
<<
">"
;
break
;
57
case
'&'
:
m_t
<<
"&"
;
break
;
58
default
:
m_t
<<
c
;
59
}
60
}
61
}
62
HtmlEntityMapper::instance
static HtmlEntityMapper * instance()
Definition:
htmlentity.cpp:341
message.h
DocSymbol
Definition:
docparser.h:344
TextDocVisitor::visit
void visit(DocWord *w)
Definition:
textdocvisitor.h:39
htmlentity.h
TextDocVisitor::m_t
FTextStream & m_t
Definition:
textdocvisitor.h:142
qdir.h
ValidateOpDetSimulation.c
dictionary c
Definition:
ValidateOpDetSimulation.py:57
test.p
p
Definition:
test.py:223
util.h
A bunch of utility functions.
HtmlEntityMapper::html
const char * html(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the html code of the HTML entity.
Definition:
htmlentity.cpp:386
textdocvisitor.h
err
void err(const char *fmt,...)
Definition:
message.cpp:226
DocSymbol::symbol
SymType symbol() const
Definition:
docparser.h:418
s
static QCString * s
Definition:
config.cpp:1042
TRUE
const bool TRUE
Definition:
qglobal.h:371
TextDocVisitor::filter
void filter(const char *str)
Definition:
textdocvisitor.cpp:41
str
static QCString str
Definition:
fortrancode.cpp:27098
Generated by
1.8.11