Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Classes | Macros | Typedefs | Functions
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_
 

Macros

#define _FTC_FACE_ID_HASH(i)   ((FT_PtrDist)(( (FT_PtrDist)(i) >> 3 ) ^ ( (FT_PtrDist)(i) << 7 )))
 
#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_NODE__TOP_FOR_HASH(cache, hash)
 
#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(list_changed)
 

Typedefs

typedef struct FTC_CacheRec_FTC_Cache
 
typedef const struct FTC_CacheClassRec_FTC_CacheClass
 
typedef struct 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, FT_Bool *list_changed)
 
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 struct FTC_CacheClassRec_ FTC_CacheClassRec
 
typedef struct FTC_CacheRec_ FTC_CacheRec
 

Functions

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

Macro Definition Documentation

◆ _FTC_FACE_ID_HASH

#define _FTC_FACE_ID_HASH (   i)    ((FT_PtrDist)(( (FT_PtrDist)(i) >> 3 ) ^ ( (FT_PtrDist)(i) << 7 )))

Definition at line 27 of file ftccache.h.

◆ FTC_CACHE

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

Definition at line 167 of file ftccache.h.

Referenced by FTC_CMapCache_Lookup(), ftc_gcache_done(), ftc_gcache_init(), and FTC_GCache_New().

◆ FTC_CACHE_LOOKUP_CMP

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

Definition at line 216 of file ftccache.h.

Referenced by FTC_CMapCache_Lookup().

◆ FTC_CACHE_P

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

Definition at line 168 of file ftccache.h.

Referenced by FTC_CMapCache_New().

◆ FTC_CACHE_TRYLOOP

#define FTC_CACHE_TRYLOOP (   cache)
Value:
{ \
FTC_Manager _try_manager = FTC_CACHE( cache )->manager; \
FT_UInt _try_count = 4; \
for (;;) \
{ \
FT_UInt _try_done;
for(n=1;n< outline->n_points;n++)
Definition: ftbbox.c:593
#define FTC_CACHE(x)
Definition: ftccache.h:167

Definition at line 318 of file ftccache.h.

Referenced by FTC_Cache_NewNode(), and ftc_snode_compare().

◆ FTC_CACHE_TRYLOOP_END

#define FTC_CACHE_TRYLOOP_END (   list_changed)
Value:
if ( !error || FT_ERR_NEQ( error, Out_Of_Memory ) ) \
break; \
\
_try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
if ( _try_done > 0 && ( list_changed ) ) \
*(FT_Bool*)( list_changed ) = TRUE; \
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; \
} \
} \
}
FTC_Manager_FlushN(FTC_Manager manager, FT_UInt count)
Definition: ftcmanag.c:626
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
FT_Error error
Definition: cffdrivr.c:411
#define FT_ERR_NEQ(x, e)
Definition: fttypes.h:589
if(!abbox) return FT_THROW(Invalid_Argument)
#define TRUE
Definition: ftobjs.h:53

Definition at line 329 of file ftccache.h.

Referenced by FTC_Cache_NewNode().

◆ FTC_NODE

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

◆ FTC_NODE__NEXT

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

Definition at line 72 of file ftccache.h.

Referenced by FTC_Manager_Reset().

◆ FTC_NODE__PREV

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

Definition at line 73 of file ftccache.h.

Referenced by FTC_Manager_Compress(), and FTC_Manager_FlushN().

◆ FTC_NODE__TOP_FOR_HASH

#define FTC_NODE__TOP_FOR_HASH (   cache,
  hash 
)
Value:
( ( cache )->buckets + \
( ( ( ( hash ) & ( cache )->mask ) < ( cache )->p ) \
? ( ( hash ) & ( ( cache )->mask * 2 + 1 ) ) \
: ( ( hash ) & ( cache )->mask ) ) )
GLfloat GLfloat p
GLenum GLint GLuint mask

Definition at line 76 of file ftccache.h.

◆ FTC_NODE_P

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

Definition at line 70 of file ftccache.h.

Typedef Documentation

◆ FTC_Cache

typedef struct FTC_CacheRec_* FTC_Cache

Definition at line 31 of file ftccache.h.

◆ FTC_Cache_DoneFunc

typedef void(* FTC_Cache_DoneFunc) (FTC_Cache cache)

Definition at line 130 of file ftccache.h.

◆ FTC_Cache_InitFunc

typedef FT_Error(* FTC_Cache_InitFunc) (FTC_Cache cache)

Definition at line 127 of file ftccache.h.

◆ FTC_CacheClass

Definition at line 34 of file ftccache.h.

◆ FTC_CacheClassRec

◆ FTC_CacheRec

typedef struct FTC_CacheRec_ FTC_CacheRec

◆ FTC_Node_CompareFunc

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

Definition at line 116 of file ftccache.h.

◆ FTC_Node_FreeFunc

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

Definition at line 123 of file ftccache.h.

◆ FTC_Node_NewFunc

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

Definition at line 106 of file ftccache.h.

◆ FTC_Node_WeightFunc

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

Definition at line 111 of file ftccache.h.

◆ FTC_NodeRec

typedef struct FTC_NodeRec_ FTC_NodeRec

Function Documentation

◆ FTC_Cache_Done()

FTC_Cache_Done ( FTC_Cache  cache)

Definition at line 413 of file ftccache.c.

References ftc_cache_done().

Referenced by ftc_gcache_done().

◆ FTC_Cache_Init()

FTC_Cache_Init ( FTC_Cache  cache)

Definition at line 332 of file ftccache.c.

References FT_LOCAL_DEF, and ftc_cache_init().

Referenced by ftc_gcache_init().

◆ FTC_Cache_NewNode()

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

◆ FTC_Cache_RemoveFaceID()

FTC_Cache_RemoveFaceID ( FTC_Cache  cache,
FTC_FaceID  face_id 
)