summaryrefslogtreecommitdiffstats
path: root/src/cmdmapper.h
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2012-06-10 09:28:22 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2012-06-10 09:28:22 (GMT)
commit0ce3aea886f4e95da56d164b3944fd54d3d68f89 (patch)
tree6709ddc7b1764dc3b20bbac7eb36c05edcc91e03 /src/cmdmapper.h
parent1983c30b71bf92b3fa6bfedbb98451c3b7f74498 (diff)
downloadDoxygen-0ce3aea886f4e95da56d164b3944fd54d3d68f89.zip
Doxygen-0ce3aea886f4e95da56d164b3944fd54d3d68f89.tar.gz
Doxygen-0ce3aea886f4e95da56d164b3944fd54d3d68f89.tar.bz2
Release-1.8.1.1
Diffstat (limited to 'src/cmdmapper.h')
-rw-r--r--src/cmdmapper.h28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index deb5f50..c53e2b1 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -21,11 +21,7 @@
#include <qdict.h>
-struct CommandMap
-{
- const char *cmdName;
- int cmdId;
-};
+struct CommandMap;
const int SIMPLESECT_BIT = 0x1000;
@@ -187,32 +183,18 @@ enum HtmlTagType
XML_INHERITDOC = XML_CmdMask + 22
};
+/** Class representing a mapping from command names to command IDs. */
class Mapper
{
public:
- int map(const char *n)
- {
- QCString name=n;
- if (!m_cs) name=name.lower();
- int *result;
- return !name.isEmpty() && (result=m_map.find(name)) ? *result: 0;
- }
-
- Mapper(const CommandMap *cm,bool caseSensitive) : m_map(89), m_cs(caseSensitive)
- {
- m_map.setAutoDelete(TRUE);
- const CommandMap *p = cm;
- while (p->cmdName)
- {
- m_map.insert(p->cmdName,new int(p->cmdId));
- p++;
- }
- }
+ int map(const char *n);
+ Mapper(const CommandMap *cm,bool caseSensitive);
private:
QDict<int> m_map;
bool m_cs;
};
+/** Class representing a namespace for the doxygen and HTML command mappers. */
struct Mappers
{
static void freeMappers();