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