Home | History | Annotate | Download | only in hb-icu-le
      1 /*
      2  **********************************************************************
      3  *   Copyright (C) 2003-2008, International Business Machines
      4  *   Corporation and others.  All Rights Reserved.
      5  **********************************************************************
      6  */
      7 
      8 #ifndef __FONTTABLECACHE_H
      9 
     10 #define __FONTTABLECACHE_H
     11 
     12 #define HB_H_IN
     13 #include <hb-blob.h>
     14 
     15 #include "layout/LETypes.h"
     16 #include "letest.h"
     17 
     18 HB_BEGIN_VISIBILITY
     19 
     20 U_NAMESPACE_USE
     21 
     22 struct FontTableCacheEntry;
     23 
     24 class FontTableCache
     25 {
     26 public:
     27     FontTableCache();
     28 
     29     virtual ~FontTableCache();
     30 
     31     const void *find(LETag tableTag) const;
     32 
     33 protected:
     34     virtual hb_blob_t *readFontTable(LETag tableTag) const = 0;
     35     virtual void freeFontTable(hb_blob_t *blob) const;
     36 
     37 private:
     38 
     39     void add(LETag tableTag, hb_blob_t *blob);
     40 
     41     FontTableCacheEntry *fTableCache;
     42     le_int32 fTableCacheCurr;
     43     le_int32 fTableCacheSize;
     44 };
     45 
     46 HB_END_VISIBILITY
     47 
     48 #endif
     49