summaryrefslogtreecommitdiffstats
path: root/src/cmdmapper.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2005-06-15 19:21:39 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2005-06-15 19:21:39 (GMT)
commit7e2f4c794ab68b3e14cca2f40ed1b19926c3de05 (patch)
tree3f2be46d34910503ef3532aa95aa0422e86cd993 /src/cmdmapper.cpp
parent365d0dd98ec1e2cbd7f732a5a9a963e5cf2fbde2 (diff)
downloadDoxygen-7e2f4c794ab68b3e14cca2f40ed1b19926c3de05.zip
Doxygen-7e2f4c794ab68b3e14cca2f40ed1b19926c3de05.tar.gz
Doxygen-7e2f4c794ab68b3e14cca2f40ed1b19926c3de05.tar.bz2
Release-1.4.3-20050615
Diffstat (limited to 'src/cmdmapper.cpp')
-rw-r--r--src/cmdmapper.cpp91
1 files changed, 24 insertions, 67 deletions
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index 51c41eb..dddfcfd 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -100,7 +100,6 @@ CommandMap cmdMap[] =
{ "$", CMD_DOLLAR },
{ "#", CMD_HASH },
{ "%", CMD_PERCENT },
- //{ "~", CMD_LANGSWITCH },
{ "_internalref", CMD_INTERNALREF },
{ "dot", CMD_DOT },
{ "enddot", CMD_ENDDOT },
@@ -112,42 +111,6 @@ CommandMap cmdMap[] =
//----------------------------------------------------------------------------
-int CmdMapper::map(const char *name)
-{
- return instance()->find(name);
-}
-
-void CmdMapper::freeInstance()
-{
- delete m_instance; m_instance=0;
-}
-
-CmdMapper *CmdMapper::instance()
-{
- if (m_instance==0) m_instance = new CmdMapper;
- return m_instance;
-}
-
-CmdMapper::CmdMapper() : m_map(89)
-{
- m_map.setAutoDelete(TRUE);
- CommandMap *p = cmdMap;
- while (p->cmdName)
- {
- m_map.insert(p->cmdName,new int(p->cmdId));
- p++;
- }
-}
-int CmdMapper::find(const char *name)
-{
- int *result = m_map.find(name);
- if (result) return *result; else return CMD_UNKNOWN;
-}
-
-CmdMapper *CmdMapper::m_instance=0;
-
-//----------------------------------------------------------------------------
-
CommandMap htmlTagMap[] =
{
{ "strong", HTML_BOLD },
@@ -188,43 +151,37 @@ CommandMap htmlTagMap[] =
{ "h6", HTML_H6 },
{ "span", HTML_SPAN },
{ "div", HTML_DIV },
+
+ { "c", XML_C },
+ // { "code", XML_CODE }, <= ambigious <code> is also a HTML tag
+ { "description",XML_DESCRIPTION },
+ { "example", XML_EXAMPLE },
+ { "exception", XML_EXCEPTION },
+ { "include", XML_INCLUDE },
+ { "item", XML_ITEM },
+ { "list", XML_LIST },
+ { "para", XML_PARA },
+ { "param", XML_PARAM },
+ { "paramref", XML_PARAMREF },
+ { "permission", XML_PERMISSION },
+ { "remarks", XML_REMARKS },
+ { "returns", XML_RETURNS },
+ { "see", XML_SEE },
+ { "seealso", XML_SEEALSO },
+ { "summary", XML_SUMMARY },
+ { "value", XML_VALUE },
{ 0, 0 }
};
//----------------------------------------------------------------------------
-int HtmlTagMapper::map(const char *name)
-{
- return instance()->find(name);
-}
-
-void HtmlTagMapper::freeInstance()
-{
- delete m_instance; m_instance=0;
-}
-
-HtmlTagMapper *HtmlTagMapper::instance()
-{
- if (m_instance==0) m_instance = new HtmlTagMapper;
- return m_instance;
-}
+Mapper *Mappers::cmdMapper = new Mapper(cmdMap);
+Mapper *Mappers::htmlTagMapper = new Mapper(htmlTagMap);
-HtmlTagMapper::HtmlTagMapper() : m_map(89)
+void Mappers::freeMappers()
{
- m_map.setAutoDelete(TRUE);
- CommandMap *p = htmlTagMap;
- while (p->cmdName)
- {
- m_map.insert(p->cmdName,new int(p->cmdId));
- p++;
- }
-}
-int HtmlTagMapper::find(const char *name)
-{
- int *result = m_map.find(name);
- if (result) return *result; else return HTML_UNKNOWN;
+ delete cmdMapper; cmdMapper = 0;
+ delete htmlTagMapper; htmlTagMapper = 0;
}
-HtmlTagMapper *HtmlTagMapper::m_instance=0;
-//----------------------------------------------------------------------------