My Project
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
cmdmapper.h
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
#ifndef _CMDMAPPER_H
20
#define _CMDMAPPER_H
21
22
#include <qdict.h>
23
24
struct
CommandMap
;
25
26
const
int
SIMPLESECT_BIT
= 0x1000;
27
28
enum
CommandType
29
{
30
CMD_UNKNOWN
= 0,
31
CMD_ADDINDEX
= 1,
32
CMD_AMP
= 2,
33
CMD_ANCHOR
= 3,
34
CMD_AT
= 4,
35
CMD_ATTENTION
= 5 |
SIMPLESECT_BIT
,
36
CMD_AUTHOR
= 6 |
SIMPLESECT_BIT
,
37
CMD_AUTHORS
= 7 |
SIMPLESECT_BIT
,
38
CMD_BOLD
= 8,
39
CMD_BSLASH
= 9,
40
CMD_CODE
= 10,
41
CMD_COPYDOC
= 11,
42
CMD_DATE
= 12 |
SIMPLESECT_BIT
,
43
CMD_DOLLAR
= 13,
44
CMD_DONTINCLUDE
= 14,
45
CMD_DOTFILE
= 15,
46
CMD_EMPHASIS
= 16,
47
CMD_ENDCODE
= 17,
48
CMD_ENDHTMLONLY
= 18,
49
CMD_ENDLATEXONLY
= 19,
50
CMD_ENDLINK
= 20,
51
CMD_ENDSECREFLIST
= 21,
52
CMD_ENDVERBATIM
= 22,
53
CMD_ENDXMLONLY
= 23,
54
CMD_EXCEPTION
= 24 |
SIMPLESECT_BIT
,
55
CMD_FORMULA
= 25,
56
CMD_GREATER
= 26,
57
CMD_HASH
= 27,
58
CMD_HTMLINCLUDE
= 28,
59
CMD_HTMLONLY
= 29,
60
CMD_IMAGE
= 30,
61
CMD_INCLUDE
= 31,
62
CMD_INTERNAL
= 32,
63
CMD_INTERNALREF
= 33,
64
CMD_INVARIANT
= 34 |
SIMPLESECT_BIT
,
65
CMD_LATEXONLY
= 35,
66
CMD_LESS
= 36,
67
CMD_LI
= 37,
68
CMD_LINE
= 38,
69
CMD_LINEBREAK
= 39,
70
CMD_LINK
= 40,
71
CMD_NOTE
= 41 |
SIMPLESECT_BIT
,
72
CMD_PAR
= 42 |
SIMPLESECT_BIT
,
73
CMD_PARAM
= 43 |
SIMPLESECT_BIT
,
74
CMD_PERCENT
= 44,
75
CMD_POST
= 45 |
SIMPLESECT_BIT
,
76
CMD_PRE
= 46 |
SIMPLESECT_BIT
,
77
CMD_REF
= 47,
78
CMD_SECREFITEM
= 48,
79
CMD_REMARK
= 49 |
SIMPLESECT_BIT
,
80
CMD_RETURN
= 50 |
SIMPLESECT_BIT
,
81
CMD_RETVAL
= 51 |
SIMPLESECT_BIT
,
82
CMD_SA
= 52 |
SIMPLESECT_BIT
,
83
CMD_SECREFLIST
= 53,
84
CMD_SECTION
= 54,
85
CMD_SUBPAGE
= 55,
86
CMD_SUBSECTION
= 56,
87
CMD_SUBSUBSECTION
= 57,
88
CMD_PARAGRAPH
= 58,
89
CMD_SINCE
= 59 |
SIMPLESECT_BIT
,
90
CMD_SKIP
= 60,
91
CMD_SKIPLINE
= 61,
92
CMD_STARTCODE
= 62,
93
CMD_JAVALINK
= 63,
94
CMD_UNTIL
= 64,
95
CMD_VERBATIM
= 65,
96
CMD_VERBINCLUDE
= 66,
97
CMD_VERSION
= 67 |
SIMPLESECT_BIT
,
98
CMD_WARNING
= 68 |
SIMPLESECT_BIT
,
99
CMD_XREFITEM
= 69 |
SIMPLESECT_BIT
,
100
CMD_XMLONLY
= 70,
101
CMD_DOT
= 71,
102
CMD_ENDDOT
= 72,
103
CMD_MSC
= 73,
104
CMD_ENDMSC
= 74,
105
CMD_MANONLY
= 75,
106
CMD_ENDMANONLY
= 76,
107
CMD_INCWITHLINES
= 77,
108
CMD_INHERITDOC
= 78,
109
CMD_TPARAM
= 79 |
SIMPLESECT_BIT
,
110
CMD_COPYBRIEF
= 80,
111
CMD_COPYDETAILS
= 81,
112
CMD_QUOTE
= 82,
113
CMD_MSCFILE
= 83,
114
CMD_DCOLON
= 84,
115
CMD_COPYRIGHT
= 85 |
SIMPLESECT_BIT
,
116
CMD_CITE
= 86,
117
CMD_SNIPPET
= 87,
118
CMD_RTFONLY
= 88,
119
CMD_ENDRTFONLY
= 89,
120
CMD_PIPE
= 90,
121
CMD_VHDLFLOW
= 91,
122
CMD_DBONLY
= 92,
123
CMD_ENDDBONLY
= 93,
124
CMD_ENDINTERNAL
= 94,
125
CMD_PARBLOCK
= 95,
126
CMD_ENDPARBLOCK
= 96,
127
CMD_DIAFILE
= 97,
128
CMD_LATEXINCLUDE
= 98,
129
CMD_NDASH
= 99,
130
CMD_MDASH
= 100,
131
CMD_STARTUML
= 101,
132
CMD_ENDUML
= 102,
133
CMD_SETSCOPE
= 103,
134
CMD_PUNT
= 104,
135
CMD_PLUS
= 105,
136
CMD_MINUS
= 106,
137
CMD_INCLUDEDOC
= 107,
138
CMD_SNIPPETDOC
= 108
139
};
140
141
enum
HtmlTagType
142
{
143
HTML_UNKNOWN
= 0,
144
HTML_CENTER
= 1,
145
HTML_TABLE
= 2,
146
HTML_CAPTION
= 3,
147
HTML_SMALL
= 4,
148
HTML_CODE
= 5,
149
HTML_IMG
= 6,
150
HTML_PRE
= 7,
151
HTML_SUB
= 8,
152
HTML_SUP
= 9,
153
HTML_TR
= 10,
154
HTML_TD
= 11,
155
HTML_TH
= 12,
156
HTML_OL
= 13,
157
HTML_UL
= 14,
158
HTML_LI
= 15,
159
HTML_EMPHASIS
= 16,
160
HTML_HR
= 17,
161
HTML_DL
= 18,
162
HTML_DT
= 19,
163
HTML_DD
= 20,
164
HTML_BR
= 21,
165
HTML_A
= 22,
166
HTML_BOLD
= 23,
167
HTML_P
= 24,
168
HTML_H1
= 25,
169
HTML_H2
= 26,
170
HTML_H3
= 27,
171
HTML_H4
= 28,
172
HTML_H5
= 29,
173
HTML_H6
= 30,
174
HTML_SPAN
= 31,
175
HTML_DIV
= 32,
176
HTML_BLOCKQUOTE
= 33,
177
178
XML_CmdMask
= 0x100,
179
180
XML_C
=
XML_CmdMask
+ 0,
181
XML_CODE
=
XML_CmdMask
+ 1,
182
XML_DESCRIPTION
=
XML_CmdMask
+ 2,
183
XML_EXAMPLE
=
XML_CmdMask
+ 3,
184
XML_EXCEPTION
=
XML_CmdMask
+ 4,
185
XML_INCLUDE
=
XML_CmdMask
+ 5,
186
XML_ITEM
=
XML_CmdMask
+ 6,
187
XML_LIST
=
XML_CmdMask
+ 7,
188
XML_LISTHEADER
=
XML_CmdMask
+ 8,
189
XML_PARA
=
XML_CmdMask
+ 9,
190
XML_PARAM
=
XML_CmdMask
+ 10,
191
XML_PARAMREF
=
XML_CmdMask
+ 11,
192
XML_PERMISSION
=
XML_CmdMask
+ 12,
193
XML_REMARKS
=
XML_CmdMask
+ 13,
194
XML_RETURNS
=
XML_CmdMask
+ 14,
195
XML_SEE
=
XML_CmdMask
+ 15,
196
XML_SEEALSO
=
XML_CmdMask
+ 16,
197
XML_SUMMARY
=
XML_CmdMask
+ 17,
198
XML_TERM
=
XML_CmdMask
+ 18,
199
XML_TYPEPARAM
=
XML_CmdMask
+ 19,
200
XML_TYPEPARAMREF
=
XML_CmdMask
+ 20,
201
XML_VALUE
=
XML_CmdMask
+ 21,
202
XML_INHERITDOC
=
XML_CmdMask
+ 22
203
};
204
206
class
Mapper
207
{
208
public
:
209
int
map
(
const
char
*n);
210
QString
find
(
const
int
n);
211
Mapper
(
const
CommandMap
*cm,
bool
caseSensitive);
212
private
:
213
QDict<int>
m_map
;
214
bool
m_cs
;
215
};
216
218
struct
Mappers
219
{
220
static
void
freeMappers
();
221
static
Mapper
*
cmdMapper
;
222
static
Mapper
*
htmlTagMapper
;
223
};
224
225
226
#endif