ftccache.h File Reference

#include "ftcmru.h"

Go to the source code of this file.

Classes

struct  FTC_NodeRec_
struct  FTC_CacheClassRec_
struct  FTC_CacheRec_

Defines

#define FTC_NODE(x)   ( (FTC_Node)(x) )
#define FTC_NODE_P(x)   ( (FTC_Node*)(x) )
#define FTC_NODE__NEXT(x)   FTC_NODE( (x)->mru.next )
#define FTC_NODE__PREV(x)   FTC_NODE( (x)->mru.prev )
#define FTC_CACHE(x)   ( (FTC_Cache)(x) )
#define FTC_CACHE_P(x)   ( (FTC_Cache*)(x) )
#define FTC_CACHE_LOOKUP_CMP(cache, nodecmp, hash, query, node, error)
#define FTC_CACHE_TRYLOOP(cache)
#define FTC_CACHE_TRYLOOP_END()

Typedefs

typedef typedefFT_BEGIN_HEADER
struct FTC_CacheRec_
FTC_Cache
typedef FTC_CacheClassRec_FTC_CacheClass
typedef FTC_NodeRec_ FTC_NodeRec
typedef FT_Error(*) FTC_Node_NewFunc (FTC_Node *pnode, FT_Pointer query, FTC_Cache cache)
typedef FT_Offset(*) FTC_Node_WeightFunc (FTC_Node node, FTC_Cache cache)
typedef FT_Bool(*) FTC_Node_CompareFunc (FTC_Node node, FT_Pointer key, FTC_Cache cache)
typedef void(*) FTC_Node_FreeFunc (FTC_Node node, FTC_Cache cache)
typedef FT_Error(*) FTC_Cache_InitFunc (FTC_Cache cache)
typedef void(*) FTC_Cache_DoneFunc (FTC_Cache cache)
typedef FTC_CacheClassRec_ FTC_CacheClassRec
typedef FTC_CacheRec_ FTC_CacheRec

Functions

 FTC_Cache_Init (FTC_Cache cache)
 FTC_Cache_Done (FTC_Cache cache)
 FTC_Cache_NewNode (FTC_Cache cache, FT_UInt32 hash, FT_Pointer query, FTC_Node *anode)
 FTC_Cache_RemoveFaceID (FTC_Cache cache, FTC_FaceID face_id)


Define Documentation

#define FTC_CACHE ( x   )     ( (FTC_Cache)(x) )

Definition at line 150 of file ftccache.h.

Referenced by FTC_CMapCache_Lookup(), and ftc_gcache_init().

#define FTC_CACHE_LOOKUP_CMP ( cache,
nodecmp,
hash,
query,
node,
error   ) 

Definition at line 199 of file ftccache.h.

Referenced by FTC_CMapCache_Lookup().

#define FTC_CACHE_P ( x   )     ( (FTC_Cache*)(x) )

Definition at line 151 of file ftccache.h.

Referenced by FTC_CMapCache_New().

#define FTC_CACHE_TRYLOOP ( cache   ) 

Value:

{                                                          \
    FTC_Manager  _try_manager = FTC_CACHE( cache )->manager; \
    FT_UInt      _try_count   = 4;                           \
                                                             \
                                                             \
    for (;;)                                                 \
    {                                                        \
      FT_UInt  _try_done;

Definition at line 279 of file ftccache.h.

Referenced by FTC_Cache_NewNode(), and ftc_snode_compare().

 
#define FTC_CACHE_TRYLOOP_END (  ) 

Value:

if ( !error || error != FT_Err_Out_Of_Memory )              \
        break;                                                    \
                                                                  \
      _try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
      if ( _try_done == 0 )                                       \
        break;                                                    \
                                                                  \
      if ( _try_done == _try_count )                              \
      {                                                           \
        _try_count *= 2;                                          \
        if ( _try_count < _try_done              ||               \
            _try_count > _try_manager->num_nodes )                \
          _try_count = _try_manager->num_nodes;                   \
      }                                                           \
    }                                                             \
  }

Definition at line 290 of file ftccache.h.

Referenced by FTC_Cache_NewNode(), and ftc_snode_compare().

#define FTC_NODE ( x   )     ( (FTC_Node)(x) )

Definition at line 66 of file ftccache.h.

Referenced by FTC_GNode_Compare(), FTC_INode_Free(), FTC_SNode_Compare(), and FTC_SNode_Free().

#define FTC_NODE__NEXT ( x   )     FTC_NODE( (x)->mru.next )

Definition at line 69 of file ftccache.h.

#define FTC_NODE__PREV ( x   )     FTC_NODE( (x)->mru.prev )

Definition at line 70 of file ftccache.h.

Referenced by FTC_Manager_Compress(), and FTC_Manager_FlushN().

#define FTC_NODE_P ( x   )     ( (FTC_Node*)(x) )

Definition at line 67 of file ftccache.h.


Typedef Documentation

typedef typedefFT_BEGIN_HEADER struct FTC_CacheRec_* FTC_Cache

Definition at line 28 of file ftccache.h.

typedef void(*) FTC_Cache_DoneFunc(FTC_Cache cache)

Definition at line 113 of file ftccache.h.

typedef FT_Error(*) FTC_Cache_InitFunc(FTC_Cache cache)

Definition at line 110 of file ftccache.h.

typedef struct FTC_CacheClassRec_* FTC_CacheClass

Definition at line 31 of file ftccache.h.

typedef struct FTC_CacheClassRec_ FTC_CacheClassRec

typedef struct FTC_CacheRec_ FTC_CacheRec

typedef FT_Bool(*) FTC_Node_CompareFunc(FTC_Node node, FT_Pointer key, FTC_Cache cache)

Definition at line 100 of file ftccache.h.

typedef void(*) FTC_Node_FreeFunc(FTC_Node node, FTC_Cache cache)

Definition at line 106 of file ftccache.h.

typedef FT_Error(*) FTC_Node_NewFunc(FTC_Node *pnode, FT_Pointer query, FTC_Cache cache)

Definition at line 90 of file ftccache.h.

typedef FT_Offset(*) FTC_Node_WeightFunc(FTC_Node node, FTC_Cache cache)

Definition at line 95 of file ftccache.h.

typedef struct FTC_NodeRec_ FTC_NodeRec


Function Documentation

FTC_Cache_Done ( FTC_Cache  cache  ) 

Definition at line 405 of file ftccache.c.

References ftc_cache_done().

Referenced by ftc_gcache_done().

FTC_Cache_Init ( FTC_Cache  cache  ) 

Definition at line 324 of file ftccache.c.

References ftc_cache_init().

Referenced by ftc_gcache_init().

FTC_Cache_NewNode ( FTC_Cache  cache,
FT_UInt32  hash,
FT_Pointer  query,
FTC_Node anode 
)

Definition at line 440 of file ftccache.c.

References error, ftc_cache_add(), FTC_CACHE_TRYLOOP, FTC_CACHE_TRYLOOP_END, and NULL.

FTC_Cache_RemoveFaceID ( FTC_Cache  cache,
FTC_FaceID  face_id 
)

Definition at line 540 of file ftccache.c.

References FTC_ManagerRec_::cur_weight, for(), ftc_cache_resize(), ftc_node_mru_unlink(), i, FTC_NodeRec_::link, and NULL.

Referenced by FTC_Manager_RemoveFaceID().


Generated on Tue Jul 5 15:58:22 2011 for ROOT_528-00b_version by  doxygen 1.5.1