1//========================================================================
2//
3// NameToCharCode.h
4//
5// Copyright 2001-2003 Glyph & Cog, LLC
6//
7//========================================================================
8
9//========================================================================
10//
11// Modified under the Poppler project - http://poppler.freedesktop.org
12//
13// All changes made under the Poppler project to this file are licensed
14// under GPL version 2 or later
15//
16// Copyright (C) 2018, 2019 Albert Astals Cid <aacid@kde.org>
17//
18// To see a description of the changes please see the Changelog file that
19// came with your tarball or type make ChangeLog if you are building from git
20//
21//========================================================================
22
23#ifndef NAMETOCHARCODE_H
24#define NAMETOCHARCODE_H
25
26#include "CharTypes.h"
27
28struct NameToCharCodeEntry;
29
30//------------------------------------------------------------------------
31
32class NameToCharCode
33{
34public:
35 NameToCharCode();
36 ~NameToCharCode();
37
38 NameToCharCode(const NameToCharCode &) = delete;
39 NameToCharCode &operator=(const NameToCharCode &) = delete;
40
41 void add(const char *name, CharCode c);
42 CharCode lookup(const char *name) const;
43
44private:
45 int hash(const char *name) const;
46
47 NameToCharCodeEntry *tab;
48 int size;
49 int len;
50};
51
52#endif
53

source code of poppler/poppler/NameToCharCode.h