filters

NameToCharCode.h
1//========================================================================
2//
3// NameToCharCode.h
4//
5// Copyright 2001-2002 Glyph & Cog, LLC
6//
7//========================================================================
8
9#ifndef NAMETOCHARCODE_H
10#define NAMETOCHARCODE_H
11
12#include <aconf.h>
13
14#ifdef USE_GCC_PRAGMAS
15#pragma interface
16#endif
17
18#include "CharTypes.h"
19
20struct NameToCharCodeEntry;
21
22//------------------------------------------------------------------------
23
24class NameToCharCode {
25public:
26
27 NameToCharCode();
28 ~NameToCharCode();
29
30 void add(const char *name, CharCode c);
31 CharCode lookup(const char *name);
32
33private:
34
35 int hash(const char *name);
36
37 NameToCharCodeEntry *tab;
38 int size;
39 int len;
40};
41
42#endif