]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/test/letest/FontTableCache.h
ICU-59152.0.1.tar.gz
[apple/icu.git] / icuSources / test / letest / FontTableCache.h
... / ...
CommitLineData
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/*
4 **********************************************************************
5 * Copyright (C) 2003-2013, International Business Machines
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
16U_NAMESPACE_USE
17
18struct FontTableCacheEntry;
19
20class FontTableCache
21{
22public:
23 FontTableCache();
24
25 virtual ~FontTableCache();
26
27 const void *find(LETag tableTag, size_t &length) const;
28
29protected:
30 virtual const void *readFontTable(LETag tableTag, size_t &length) const = 0;
31 virtual void freeFontTable(const void *table) const;
32
33private:
34
35 void add(LETag tableTag, const void *table, size_t length);
36
37 FontTableCacheEntry *fTableCache;
38 le_int32 fTableCacheCurr;
39 le_int32 fTableCacheSize;
40};
41
42#endif
43