List classes and iterators.

This module implements list classes and iterators.

The following list types and iterators are provided:

List type          List Class   Iterator Class       Element Class
---------          ----------   --------------       -------------
Embedded list        ELIST       ELIST_ITERATOR       ELIST_LINK (Single linked)
Embedded list        ELIST2      ELIST2_ITERATOR      ELIST2_LINK (Double linked)
Cons List            CLIST       CLIST_ITERATOR       CLIST_LINK (Single linked)
Cons List            CLIST2      CLIST2_ITERATOR      CLIST2_LINK (Double linked)

An embedded list is where the list pointers are provided by a generic class. Data types to be listed inherit from the generic class. Data is thus linked in only ONE list at any one time.

A cons list has a separate structure for a "cons cell". This contains the list pointer(s) AND a pointer to the data structure held on the list. A structure can be on many cons lists at the same time, and the structure does not need to inherit from any generic class in order to be on the list.

The implementation of lists is very careful about space and speed overheads. This is why many embedded lists are provided. The same concerns mean that in-line type coercion is done, rather than use virtual functions. This is cumbersome in that each data type to be listed requires its own iterator and list class - though macros can gererate these. It also prevents heterogenous lists.


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