Home | History | Annotate | Download | only in letest
      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 
     16 U_NAMESPACE_USE
     17 
     18 struct FontTableCacheEntry;
     19 
     20 class FontTableCache
     21 {
     22 public:
     23     FontTableCache();
     24 
     25     virtual ~FontTableCache();
     26 
     27     const void *find(LETag tableTag, size_t &length) const;
     28 
     29 protected:
     30     virtual const void *readFontTable(LETag tableTag, size_t &length) const = 0;
     31     virtual void freeFontTable(const void *table) const;
     32 
     33 private:
     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 
     44