next up previous contents
Next: The Source: charsllist.c Up: Experiments in Object Oriented Previous: The Basic List Class:

   
The CELL DATA TYPE:

\framebox{\parbox{6.55in}{\mbox{}\vspace{5.5in}}}

We will base our implementation of the pointer based list objects on an auxiliary data type called CELLS. The CHAR_CELL type is implemented with an abstract class CHAR_CELL_CORE and its two child derivations CHAR_SL_CELL and CHAR_DL_CELL (derived from CHAR_CELL_CORE).

We introduce some additional diagnostic conveniences in this class. Note that we have added a new protected element char *name which we will use to label the type of template we instantiate. For example,

CHAR\_SL_CELL("char");

constructs a CHAR_SL_CELL object with label name name = "char". This will be convenient for debugging and tutorial purposes.



 

Jim Peterson
1999-04-22