ICU-66108.tar.gz
[apple/icu.git] / icuSources / samples / layout / FontTableCache.h
CommitLineData
b75a7d8f 1/*
f3c0d7a5
A
2 *************************************************************************
3 * © 2016 and later: Unicode, Inc. and others.
4 * License & terms of use: http://www.unicode.org/copyright.html#License
5 *************************************************************************
b75a7d8f 6 **********************************************************************
46f4442e 7 * Copyright (C) 2003-2008, International Business Machines
b75a7d8f
A
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
18struct FontTableCacheEntry;
19
20class FontTableCache
21{
22public:
23 FontTableCache();
24
25 virtual ~FontTableCache();
26
27 const void *find(LETag tableTag) const;
28
29protected:
30 virtual const void *readFontTable(LETag tableTag) const = 0;
46f4442e 31 virtual void freeFontTable(const void *table) const;
b75a7d8f
A
32
33private:
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