cmdmapper.cpp

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * 
00004  *
00005  *
00006  * Copyright (C) 1997-2008 by Dimitri van Heesch.
00007  *
00008  * Permission to use, copy, modify, and distribute this software and its
00009  * documentation under the terms of the GNU General Public License is hereby 
00010  * granted. No representations are made about the suitability of this software 
00011  * for any purpose. It is provided "as is" without express or implied warranty.
00012  * See the GNU General Public License for more details.
00013  *
00014  * Documents produced by Doxygen are derivative works derived from the
00015  * input used in their production; they are not affected by this license.
00016  *
00017  */
00018 
00019 #include "cmdmapper.h"
00020 
00021 CommandMap cmdMap[] =
00022 {
00023   { "a",             CMD_EMPHASIS },
00024   { "addindex",      CMD_ADDINDEX },
00025   { "anchor",        CMD_ANCHOR },
00026   { "arg",           CMD_LI },
00027   { "attention",     CMD_ATTENTION },
00028   { "author",        CMD_AUTHOR },
00029   { "authors",       CMD_AUTHORS },
00030   { "b",             CMD_BOLD },
00031   { "c",             CMD_CODE },
00032   { "code",          CMD_STARTCODE },
00033   { "copydoc",       CMD_COPYDOC },
00034   { "date",          CMD_DATE },
00035   { "dontinclude",   CMD_DONTINCLUDE },
00036   { "dotfile",       CMD_DOTFILE },
00037   { "e",             CMD_EMPHASIS },
00038   { "em",            CMD_EMPHASIS },
00039   { "endcode",       CMD_ENDCODE },
00040   { "endhtmlonly",   CMD_ENDHTMLONLY },
00041   { "endlatexonly",  CMD_ENDLATEXONLY },
00042   { "endlink",       CMD_ENDLINK },
00043   { "endsecreflist", CMD_ENDSECREFLIST },
00044   { "endverbatim",   CMD_ENDVERBATIM },
00045   { "endxmlonly",    CMD_ENDXMLONLY },
00046   { "exception",     CMD_EXCEPTION },
00047   { "form",          CMD_FORMULA },
00048   { "htmlinclude",   CMD_HTMLINCLUDE },
00049   { "htmlonly",      CMD_HTMLONLY },
00050   { "image",         CMD_IMAGE },
00051   { "include",       CMD_INCLUDE },
00052   { "internal",      CMD_INTERNAL },
00053   { "invariant",     CMD_INVARIANT },
00054   { "javalink",      CMD_JAVALINK },
00055   { "latexonly",     CMD_LATEXONLY },
00056   { "li",            CMD_LI },
00057   { "line",          CMD_LINE },
00058   { "link",          CMD_LINK },
00059   { "n",             CMD_LINEBREAK },
00060   { "note",          CMD_NOTE },
00061   { "p",             CMD_CODE },
00062   { "par",           CMD_PAR },
00063   { "param",         CMD_PARAM },
00064   { "post",          CMD_POST },
00065   { "pre",           CMD_PRE },
00066   { "ref",           CMD_REF },
00067   { "refitem",       CMD_SECREFITEM },
00068   { "remark",        CMD_REMARK },
00069   { "remarks",       CMD_REMARK },
00070   { "result",        CMD_RETURN },
00071   { "return",        CMD_RETURN },
00072   { "returns",       CMD_RETURN },
00073   { "retval",        CMD_RETVAL },
00074   { "sa",            CMD_SA },
00075   { "secreflist",    CMD_SECREFLIST },
00076   { "section",       CMD_SECTION },
00077   { "subpage",       CMD_SUBPAGE },
00078   { "subsection",    CMD_SUBSECTION },
00079   { "subsubsection", CMD_SUBSUBSECTION },
00080   { "paragraph",     CMD_PARAGRAPH },
00081   { "see",           CMD_SA },
00082   { "since",         CMD_SINCE },
00083   { "skip",          CMD_SKIP },
00084   { "skipline",      CMD_SKIPLINE },
00085   { "xmlonly",       CMD_XMLONLY },
00086   { "xrefitem",      CMD_XREFITEM },
00087   { "throw",         CMD_EXCEPTION },
00088   { "until",         CMD_UNTIL },
00089   { "verbatim",      CMD_VERBATIM },
00090   { "verbinclude",   CMD_VERBINCLUDE },
00091   { "version",       CMD_VERSION },
00092   { "warning",       CMD_WARNING },
00093   { "throws",        CMD_EXCEPTION },
00094   { "tparam",        CMD_TPARAM },
00095   { "\\",            CMD_BSLASH },
00096   { "@",             CMD_AT },
00097   { "<",             CMD_LESS },
00098   { ">",             CMD_GREATER },
00099   { "&",             CMD_AMP },
00100   { "$",             CMD_DOLLAR },
00101   { "#",             CMD_HASH },
00102   { "%",             CMD_PERCENT },
00103   { "_internalref",  CMD_INTERNALREF },
00104   { "dot",           CMD_DOT },
00105   { "msc",           CMD_MSC },
00106   { "enddot",        CMD_ENDDOT },
00107   { "endmsc",        CMD_ENDMSC },
00108   { "manonly",       CMD_MANONLY },
00109   { "endmanonly",    CMD_ENDMANONLY },
00110   { "includelineno", CMD_INCWITHLINES },
00111   { "inheritdoc",    CMD_INHERITDOC },
00112   { 0,               0 }
00113 };
00114 
00115 //----------------------------------------------------------------------------
00116 
00117 CommandMap htmlTagMap[] =
00118 {
00119   { "strong",     HTML_BOLD },
00120   { "center",     HTML_CENTER },
00121   { "table",      HTML_TABLE },
00122   { "caption",    HTML_CAPTION },
00123   { "small",      HTML_SMALL },
00124   { "code",       HTML_CODE },
00125   { "dfn",        HTML_CODE },
00126   { "var",        HTML_EMPHASIS },
00127   { "img",        HTML_IMG },
00128   { "pre",        HTML_PRE },
00129   { "sub",        HTML_SUB },
00130   { "sup",        HTML_SUP },
00131   { "tr",         HTML_TR },
00132   { "td",         HTML_TD },
00133   { "th",         HTML_TH },
00134   { "ol",         HTML_OL },
00135   { "ul",         HTML_UL },
00136   { "li",         HTML_LI },
00137   { "tt",         XML_C /*HTML_CODE*/ },
00138   { "kbd",        XML_C /*HTML_CODE*/ },
00139   { "em",         HTML_EMPHASIS },
00140   { "hr",         HTML_HR },
00141   { "dl",         HTML_DL },
00142   { "dt",         HTML_DT },
00143   { "dd",         HTML_DD },
00144   { "br",         HTML_BR },
00145   { "i",          HTML_EMPHASIS },
00146   { "a",          HTML_A },
00147   { "b",          HTML_BOLD },
00148   { "p",          HTML_P },
00149   { "h1",         HTML_H1 },
00150   { "h2",         HTML_H2 },
00151   { "h3",         HTML_H3 },
00152   { "h4",         HTML_H4 },
00153   { "h5",         HTML_H5 },
00154   { "h6",         HTML_H6 },
00155   { "span",       HTML_SPAN },
00156   { "div",        HTML_DIV },
00157 
00158   { "c",            XML_C },
00159   // { "code",       XML_CODE },  <= ambigious <code> is also a HTML tag
00160   { "description",  XML_DESCRIPTION },
00161   { "example",      XML_EXAMPLE },
00162   { "exception",    XML_EXCEPTION },
00163   { "include",      XML_INCLUDE },
00164   { "item",         XML_ITEM },
00165   { "list",         XML_LIST }, // type="table|bullet|number"
00166   { "listheader",   XML_LISTHEADER },
00167   { "para",         XML_PARA },
00168   { "param",        XML_PARAM },
00169   { "paramref",     XML_PARAMREF },
00170   { "typeparam",    XML_TYPEPARAM },
00171   { "typeparamref", XML_TYPEPARAMREF },
00172   { "permission",   XML_PERMISSION },
00173   { "remarks",      XML_REMARKS },
00174   { "returns",      XML_RETURNS },
00175   { "see",          XML_SEE },
00176   { "seealso",      XML_SEEALSO },
00177   { "summary",      XML_SUMMARY },
00178   { "term",         XML_TERM },
00179   { "value",        XML_VALUE },
00180   { 0,              0 }
00181 };
00182 
00183 //----------------------------------------------------------------------------
00184 
00185 Mapper *Mappers::cmdMapper     = new Mapper(cmdMap,TRUE);
00186 Mapper *Mappers::htmlTagMapper = new Mapper(htmlTagMap,FALSE);
00187 
00188 void Mappers::freeMappers()
00189 {
00190   delete cmdMapper;     cmdMapper     = 0;
00191   delete htmlTagMapper; htmlTagMapper = 0;
00192 }
00193 
00194 



Generated on Mon Mar 31 10:58:32 2008 by  doxygen 1.5.1