Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-10 10:23:48

0001 //========================================================================
0002 //
0003 // NameToCharCode.h
0004 //
0005 // Copyright 2001-2003 Glyph & Cog, LLC
0006 //
0007 //========================================================================
0008 
0009 //========================================================================
0010 //
0011 // Modified under the Poppler project - http://poppler.freedesktop.org
0012 //
0013 // All changes made under the Poppler project to this file are licensed
0014 // under GPL version 2 or later
0015 //
0016 // Copyright (C) 2018, 2019 Albert Astals Cid <aacid@kde.org>
0017 //
0018 // To see a description of the changes please see the Changelog file that
0019 // came with your tarball or type make ChangeLog if you are building from git
0020 //
0021 //========================================================================
0022 
0023 #ifndef NAMETOCHARCODE_H
0024 #define NAMETOCHARCODE_H
0025 
0026 #include "CharTypes.h"
0027 
0028 struct NameToCharCodeEntry;
0029 
0030 //------------------------------------------------------------------------
0031 
0032 class NameToCharCode
0033 {
0034 public:
0035     NameToCharCode();
0036     ~NameToCharCode();
0037 
0038     NameToCharCode(const NameToCharCode &) = delete;
0039     NameToCharCode &operator=(const NameToCharCode &) = delete;
0040 
0041     void add(const char *name, CharCode c);
0042     CharCode lookup(const char *name) const;
0043 
0044 private:
0045     int hash(const char *name) const;
0046 
0047     NameToCharCodeEntry *tab;
0048     int size;
0049     int len;
0050 };
0051 
0052 #endif