TTCache unit
Defines and implements object caches used in the FreeType library.
An object class is a structure layout that encapsulate one given type of data used by the FreeType engine. Each object class is completely described by:
A 'root' or 'leading' structure containing the first important fields of the class. The root structure is always of fixed size. It is implemented as a simple C structure, and may contain several pointers to sub-tables that can be sized and allocated dynamically.
Examples: TFace, TInstance, TGlyph and TExecution_Context (defined in TTObjs).
There is a difference between 'child' pointers and 'peer' pointers. A 'child' pointer points to a sub-table that is owned by the object, while a 'peer' pointer points to any other kind of data the object isn't responsible for. An object class is thus usually a 'tree' of 'child' tables.
Each object class needs a constructor and a destructor. A constructor is a function which receives the address of freshly allocated and zeroed object root structure and 'builds' all the valid child data that must be associated to the object before it becomes 'valid'.
A destructor does the inverse job : given the address of a valid object, it must discards all its child data and zero its main fields (essentially the pointers and array sizes found in the root fields).
Copyright 1996, 1997 by David Turner, Robert Wilhelm, and Werner Lemberg.
Classes and records
TCache | record | |
TCache_Class | record | |
TList_Element | record |
Procedures and functions
Cache_Create | function | |
Cache_Destroy | function | |
Cache_Done | function | |
Cache_New | function | |
Element_Done | procedure | |
Element_New | function | |
TTCache_Done | function | |
TTCache_Init | function |
Types
PCache | type | |
PCache_Class | type | |
PList_Element | type | |
TConstructor | procedure type | |
TDestructor | procedure type | |
TSingle_List | type |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
