You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
726 B
42 lines
726 B
//======================================================================== |
|
// |
|
// 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
|
|
|