]> git.saurik.com Git - apple/icu.git/blob - icuSources/samples/layout/FontTableCache.h
ICU-62107.0.1.tar.gz
[apple/icu.git] / icuSources / samples / layout / FontTableCache.h
1 /*
2 *************************************************************************
3 * © 2016 and later: Unicode, Inc. and others.
4 * License & terms of use: http://www.unicode.org/copyright.html#License
5 *************************************************************************
6 **********************************************************************
7 * Copyright (C) 2003-2008, International Business Machines
8 * Corporation and others. All Rights Reserved.
9 **********************************************************************
10 */
11
12 #ifndef __FONTTABLECACHE_H
13
14 #define __FONTTABLECACHE_H
15
16 #include "layout/LETypes.h"
17
18 struct FontTableCacheEntry;
19
20 class FontTableCache
21 {
22 public:
23 FontTableCache();
24
25 virtual ~FontTableCache();
26
27 const void *find(LETag tableTag) const;
28
29 protected:
30 virtual const void *readFontTable(LETag tableTag) const = 0;
31 virtual void freeFontTable(const void *table) const;
32
33 private:
34
35 void add(LETag tableTag, const void *table);
36
37 FontTableCacheEntry *fTableCache;
38 le_int32 fTableCacheCurr;
39 le_int32 fTableCacheSize;
40 };
41
42 #endif
43