Starlib: How the list primitives work.

(The methods explained here are detailed in list.h and astlist.h .)

Throughout starlib, there are many places where a linked list is used. In every one of those cases, the following primitive methods can be used on that list. There are really two different classes that use lists. There is the List<> class and the ASTlist<> class. ASTlist is a class derived from the base class List. Both classes are template classes.

The main difference between ASTlist and List are are so minor that as a user of this library, you can ignore the differences. The ASTlist was developed to keep track of some extra information that is needed when handling lists of nodes in a the STAR tree, but the differences do not show on the surface, and you can behave as if the two classes act the same way:

A list has a concept of its "current" position. Each list can only have one such "current" position.

(Throughout the following list, "T" refers to the type that the instantiation of List<> or ASTlist<> was created to hold.)


- previous topic - - next topic -