|
1 /****************************************************************************** |
|
2 * |
|
3 * |
|
4 * |
|
5 * |
|
6 * Copyright (C) 1997-2008 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 "cmdmapper.h" |
|
20 |
|
21 CommandMap cmdMap[] = |
|
22 { |
|
23 { "a", CMD_EMPHASIS }, |
|
24 { "addindex", CMD_ADDINDEX }, |
|
25 { "anchor", CMD_ANCHOR }, |
|
26 { "arg", CMD_LI }, |
|
27 { "attention", CMD_ATTENTION }, |
|
28 { "author", CMD_AUTHOR }, |
|
29 { "authors", CMD_AUTHORS }, |
|
30 { "b", CMD_BOLD }, |
|
31 { "c", CMD_CODE }, |
|
32 { "code", CMD_STARTCODE }, |
|
33 { "copydoc", CMD_COPYDOC }, |
|
34 { "copybrief", CMD_COPYBRIEF }, |
|
35 { "copydetails", CMD_COPYDETAILS }, |
|
36 { "date", CMD_DATE }, |
|
37 { "dontinclude", CMD_DONTINCLUDE }, |
|
38 { "dotfile", CMD_DOTFILE }, |
|
39 { "e", CMD_EMPHASIS }, |
|
40 { "em", CMD_EMPHASIS }, |
|
41 { "endcode", CMD_ENDCODE }, |
|
42 { "endhtmlonly", CMD_ENDHTMLONLY }, |
|
43 { "endlatexonly", CMD_ENDLATEXONLY }, |
|
44 { "endlink", CMD_ENDLINK }, |
|
45 { "endsecreflist", CMD_ENDSECREFLIST }, |
|
46 { "endverbatim", CMD_ENDVERBATIM }, |
|
47 { "endxmlonly", CMD_ENDXMLONLY }, |
|
48 { "exception", CMD_EXCEPTION }, |
|
49 { "form", CMD_FORMULA }, |
|
50 { "htmlinclude", CMD_HTMLINCLUDE }, |
|
51 { "htmlonly", CMD_HTMLONLY }, |
|
52 { "image", CMD_IMAGE }, |
|
53 { "include", CMD_INCLUDE }, |
|
54 { "internal", CMD_INTERNAL }, |
|
55 { "invariant", CMD_INVARIANT }, |
|
56 { "javalink", CMD_JAVALINK }, |
|
57 { "latexonly", CMD_LATEXONLY }, |
|
58 { "li", CMD_LI }, |
|
59 { "line", CMD_LINE }, |
|
60 { "link", CMD_LINK }, |
|
61 { "n", CMD_LINEBREAK }, |
|
62 { "note", CMD_NOTE }, |
|
63 { "p", CMD_CODE }, |
|
64 { "par", CMD_PAR }, |
|
65 { "param", CMD_PARAM }, |
|
66 { "post", CMD_POST }, |
|
67 { "pre", CMD_PRE }, |
|
68 { "ref", CMD_REF }, |
|
69 { "refitem", CMD_SECREFITEM }, |
|
70 { "remark", CMD_REMARK }, |
|
71 { "remarks", CMD_REMARK }, |
|
72 { "result", CMD_RETURN }, |
|
73 { "return", CMD_RETURN }, |
|
74 { "returns", CMD_RETURN }, |
|
75 { "retval", CMD_RETVAL }, |
|
76 { "sa", CMD_SA }, |
|
77 { "secreflist", CMD_SECREFLIST }, |
|
78 { "section", CMD_SECTION }, |
|
79 { "subpage", CMD_SUBPAGE }, |
|
80 { "subsection", CMD_SUBSECTION }, |
|
81 { "subsubsection", CMD_SUBSUBSECTION }, |
|
82 { "paragraph", CMD_PARAGRAPH }, |
|
83 { "see", CMD_SA }, |
|
84 { "since", CMD_SINCE }, |
|
85 { "skip", CMD_SKIP }, |
|
86 { "skipline", CMD_SKIPLINE }, |
|
87 { "xmlonly", CMD_XMLONLY }, |
|
88 { "xrefitem", CMD_XREFITEM }, |
|
89 { "throw", CMD_EXCEPTION }, |
|
90 { "until", CMD_UNTIL }, |
|
91 { "verbatim", CMD_VERBATIM }, |
|
92 { "verbinclude", CMD_VERBINCLUDE }, |
|
93 { "version", CMD_VERSION }, |
|
94 { "warning", CMD_WARNING }, |
|
95 { "throws", CMD_EXCEPTION }, |
|
96 { "tparam", CMD_TPARAM }, |
|
97 { "\\", CMD_BSLASH }, |
|
98 { "@", CMD_AT }, |
|
99 { "<", CMD_LESS }, |
|
100 { ">", CMD_GREATER }, |
|
101 { "&", CMD_AMP }, |
|
102 { "$", CMD_DOLLAR }, |
|
103 { "#", CMD_HASH }, |
|
104 { "%", CMD_PERCENT }, |
|
105 { "\"", CMD_QUOTE }, |
|
106 { "_internalref", CMD_INTERNALREF }, |
|
107 { "dot", CMD_DOT }, |
|
108 { "msc", CMD_MSC }, |
|
109 { "enddot", CMD_ENDDOT }, |
|
110 { "endmsc", CMD_ENDMSC }, |
|
111 { "manonly", CMD_MANONLY }, |
|
112 { "endmanonly", CMD_ENDMANONLY }, |
|
113 { "includelineno", CMD_INCWITHLINES }, |
|
114 { "inheritdoc", CMD_INHERITDOC }, |
|
115 { 0, 0 } |
|
116 }; |
|
117 |
|
118 //---------------------------------------------------------------------------- |
|
119 |
|
120 CommandMap htmlTagMap[] = |
|
121 { |
|
122 { "strong", HTML_BOLD }, |
|
123 { "center", HTML_CENTER }, |
|
124 { "table", HTML_TABLE }, |
|
125 { "caption", HTML_CAPTION }, |
|
126 { "small", HTML_SMALL }, |
|
127 { "code", HTML_CODE }, |
|
128 { "dfn", HTML_CODE }, |
|
129 { "var", HTML_EMPHASIS }, |
|
130 { "img", HTML_IMG }, |
|
131 { "pre", HTML_PRE }, |
|
132 { "sub", HTML_SUB }, |
|
133 { "sup", HTML_SUP }, |
|
134 { "tr", HTML_TR }, |
|
135 { "td", HTML_TD }, |
|
136 { "th", HTML_TH }, |
|
137 { "ol", HTML_OL }, |
|
138 { "ul", HTML_UL }, |
|
139 { "li", HTML_LI }, |
|
140 { "tt", XML_C /*HTML_CODE*/ }, |
|
141 { "kbd", XML_C /*HTML_CODE*/ }, |
|
142 { "em", HTML_EMPHASIS }, |
|
143 { "hr", HTML_HR }, |
|
144 { "dl", HTML_DL }, |
|
145 { "dt", HTML_DT }, |
|
146 { "dd", HTML_DD }, |
|
147 { "br", HTML_BR }, |
|
148 { "i", HTML_EMPHASIS }, |
|
149 { "a", HTML_A }, |
|
150 { "b", HTML_BOLD }, |
|
151 { "p", HTML_P }, |
|
152 { "h1", HTML_H1 }, |
|
153 { "h2", HTML_H2 }, |
|
154 { "h3", HTML_H3 }, |
|
155 { "h4", HTML_H4 }, |
|
156 { "h5", HTML_H5 }, |
|
157 { "h6", HTML_H6 }, |
|
158 { "span", HTML_SPAN }, |
|
159 { "div", HTML_DIV }, |
|
160 |
|
161 { "c", XML_C }, |
|
162 // { "code", XML_CODE }, <= ambigious <code> is also a HTML tag |
|
163 { "description", XML_DESCRIPTION }, |
|
164 { "example", XML_EXAMPLE }, |
|
165 { "exception", XML_EXCEPTION }, |
|
166 { "include", XML_INCLUDE }, |
|
167 { "item", XML_ITEM }, |
|
168 { "list", XML_LIST }, // type="table|bullet|number" |
|
169 { "listheader", XML_LISTHEADER }, |
|
170 { "para", XML_PARA }, |
|
171 { "param", XML_PARAM }, |
|
172 { "paramref", XML_PARAMREF }, |
|
173 { "typeparam", XML_TYPEPARAM }, |
|
174 { "typeparamref", XML_TYPEPARAMREF }, |
|
175 { "permission", XML_PERMISSION }, |
|
176 { "remarks", XML_REMARKS }, |
|
177 { "returns", XML_RETURNS }, |
|
178 { "see", XML_SEE }, |
|
179 { "seealso", XML_SEEALSO }, |
|
180 { "summary", XML_SUMMARY }, |
|
181 { "term", XML_TERM }, |
|
182 { "value", XML_VALUE }, |
|
183 { 0, 0 } |
|
184 }; |
|
185 |
|
186 //---------------------------------------------------------------------------- |
|
187 |
|
188 Mapper *Mappers::cmdMapper = new Mapper(cmdMap,TRUE); |
|
189 Mapper *Mappers::htmlTagMapper = new Mapper(htmlTagMap,FALSE); |
|
190 |
|
191 void Mappers::freeMappers() |
|
192 { |
|
193 delete cmdMapper; cmdMapper = 0; |
|
194 delete htmlTagMapper; htmlTagMapper = 0; |
|
195 } |
|
196 |
|
197 |