Next: , Up: List Library


6.2.1 List Library Specifics

The list library exposes a collection of interfaces (functions) concerned with heterogenous collections handling.

Central to the library is the `list' type - the collections are identified by this type.

Data in the heterogenous collections may be of any of the data types so indicated when building the list library objects - descriptions of how data of these types is to be operation need be provided.

See struct x1f4_nodetype_type.

Reference to objects may also be included in the lists.

See Referable Objects.

Data and references to data of the `list' type may also be included in the lists - list objects may even refer themselves.

The list operations provided by the list library objects make up for a mix of array and list functionality. Lists grow and shrink as needed - in this they behave like lists. Data in the lists is to be addressed by indices - as for arrays.

The lists are constructed over self balancing binary search trees - most operations (such as insertion, deletion or data retrieval) have O(logN) complexity.

Operations on list objects holding references to other objects and / or being referred themselves by other objects may experience performance degradation related to automatic object management.

See Referable Objects.

The content of the collections is to be referred either via positive integers, with 0 referring the first item in the collection, 1 the second, 2 the third and so on, either via negative integers, with -1 referring the last item in the collection, -2 the one before the last, -3 the one before the one before the last and so on.