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