aboutsummaryrefslogtreecommitdiff
path: root/xpdf/NameToCharCode.h
diff options
context:
space:
mode:
Diffstat (limited to 'xpdf/NameToCharCode.h')
-rw-r--r--xpdf/NameToCharCode.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/xpdf/NameToCharCode.h b/xpdf/NameToCharCode.h
new file mode 100644
index 0000000..6548133
--- /dev/null
+++ b/xpdf/NameToCharCode.h
@@ -0,0 +1,42 @@
+//========================================================================
+//
+// NameToCharCode.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef NAMETOCHARCODE_H
+#define NAMETOCHARCODE_H
+
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "CharTypes.h"
+
+struct NameToCharCodeEntry;
+
+//------------------------------------------------------------------------
+
+class NameToCharCode {
+public:
+
+ NameToCharCode();
+ ~NameToCharCode();
+
+ void add(const char *name, CharCode c);
+ CharCode lookup(const char *name);
+
+private:
+
+ int hash(const char *name);
+
+ NameToCharCodeEntry *tab;
+ int size;
+ int len;
+};
+
+#endif