cutil/structures.h File Reference

#include "tessclas.h"
#include "oldlist.h"
#include "freelist.h"
#include "danerror.h"

Go to the source code of this file.

Defines

Functions

Variables


Define Documentation

#define makestructure ( new,
old,
print,
type,
nextfree,
blocksize,
typestring,
usecount   ) 

Allocate a chunk of memory for a particular data type.

This macro defines an allocation, deallocation, and status printing function for each new data type.

Definition at line 48 of file structures.h.

#define newstructure ( name,
type,
nextfree,
blocksize,
errorstring,
usecount   ) 

Allocate a chunk of memory for a particular data type.

Definition at line 117 of file structures.h.

#define NUM_DATA_TYPES   20

FIX:

Definition at line 32 of file structures.h.

#define oldstructure ( name,
type,
nextfree,
stringtype,
usecount   ) 

Value:

\
type *name(type* deadelement)\
{\
   type       *returnelement;       /*return next ptr*/\
\
   if (deadelement==NULL)\
   {\
      cprintf("No of %ss in use=%d\n",stringtype,usecount);\
      \
      return (type *) 0x80000000;\
   }\
   returnelement=deadelement->next;             /*return link*/\
   ((type**)deadelement)[0]=nextfree;              /*next free blob*/\
   nextfree=deadelement;\
   usecount--;\
   return returnelement;\
}
Returns a structure to the freelist.

Definition at line 168 of file structures.h.


Function Documentation

void free_cell ( LIST   ) 

Referenced by destroy(), and pop().

LIST new_cell (  ) 

Referenced by push().

TBLOB* newblob (  ) 

Referenced by assign_blobs_to_blocks2(), attempt_blob_chop(), and make_tess_blob().

EDGEPT* newedgept (  ) 

Referenced by make_edgept(), and make_tess_edgepts().

TESSLINE* newoutline (  ) 

Referenced by check_outline_mem(), make_single_split(), make_tess_outlines(), and undo_single_split().

TWERD* newword (  ) 

Referenced by make_tess_word().

TBLOB* oldblob ( TBLOB  ) 

Referenced by attempt_blob_chop(), delete_word(), free_blob(), rebuild_current_state(), and undo_seam().

EDGEPT* oldedgept ( EDGEPT  ) 

Referenced by delete_edgepts(), free_loop(), make_tess_edgepts(), restore_outline(), and unsplit_outlines().

void oldoutline ( TESSLINE  ) 

void oldword ( TWERD  ) 

Referenced by delete_word().


Variable Documentation

int max_data_types

Internal counter of data types, set by makestructure macro

Definition at line 46 of file structures.cpp.

void_void memory_print_functions[NUM_DATA_TYPES]

Internal array of functions, set by makestructure macro

Definition at line 45 of file structures.cpp.


Generated on Wed Feb 28 19:49:22 2007 for Tesseract by  doxygen 1.5.1