| Name | Type | Description |
|---|---|---|
| Next | next item | |
| Prev | previous item | |
| Item | data value |
Lists can hold any data type. Special functions are available for lists of AjPStr values. In general, these functions are the same. Many are provided for ease of use to save remembering which calls need special cases.
| Name | Description |
|---|---|
| ajListNew | Creates a new general list. |
| ajListstrNew | Creates a new AjPStr list. |
| ajListNewArgs | Create a new list, create the nodes and add the other arguments as data. |
| ajListstrNewArgs | Create a new AjPStr list, create the nodes and add the other arguments as data. |
| ajListCopy | Copies a list to a new list. |
| ajListstrCopy | Copies an AjPStr list to a new list. |
| Name | Description |
|---|---|
| ajListFree | Free the list, and free the items with a simple "free". |
| ajListstrFree | Free the list, and free the items with ajStrDel |
| ajListDel | Free the list but do not try to free the nodes. Nodes should be freed first by ajListMap. |
| ajListstrDel | Free the list but do not try to free the nodes. use where nodes are still in use, e.g. in ajListToArray. |
| Name | Description |
|---|---|
| ajListPush | Add a new node at the start of a list. |
| ajListstrPush | Add a new node at the start of an AjPStr list. |
| ajListPushApp | Add a new node at the end of a list. |
| ajListstrPushApp | Add a new node at the end of an AjPStr list. |
| ajListAppend | Add a set of nodes at the end of the list |
| ajListReverse | Reverse the order of the nodes in a list |
| ajListstrReverse | Reverse the order of the nodes in an AjPStr list |
| ajListMap | Call a function for each node in a list. |
| ajListstrMap | Call a function for each node in a list. |
| ajListPushList | Merges two lists. |
| ajListstrPushList | Merges two AjPStr lists. |
| ajListSort | Sorts a list. |
| ajListPop | Removes and returns the first node. |
| ajListstrPop | Removes and returns the first AjPStr node. |
| Name | Description |
|---|---|
| ajListToArray | Create an array of the pointers to the data. |
| ajListstrToArray | Create an array of the pointers to the data. |
| ajListFirst | Set pointer to first node's data. Doesn't remove the node. |
| ajListLast | Set pointer to last node's data. Doesn't remove the node. |
| ajListLength | get the number of nodes in a linked list. |
| ajListstrLength | get the number of nodes in an AjPStr linked list. |
| ajListPeek | Returns the first node but keeps it on the list |
| ajListstrPeek | Returns the first node but keeps it on the list |
| Name | Description |
|---|---|
| ajListFind | For each node in the list call a function and return ajTrue when found. |
| ajListstrFind | For each node in the list call a function and return ajTrue when found. |
| Name | Description |
|---|---|
| ajListTrace | Traces through a list and validates it |
| ajListstrTrace | Traces through an AjPStr list and validates it |
| Name | Type | Description |
|---|---|---|
| First | first node | |
| Last | dummy last node | |
| Count | Number of nodes | |
| Type | List type (any, string, etc.) |
| Name | Type | Description |
|---|---|---|
| Head | Head of list | |
| Here | Current list node | |
| Orig | First list node | |
| Dir | Direction of last iterative move | |
| Modify | Allows iterator to modify the sequence |
| Name | Description |
|---|---|
| ajListIter | Default constructor |
| ajListIterRead | Default constructor for a read-only list iterator |
| Name | Description |
|---|---|
| ajListIterDone | Tests whether an iterator is finished. |
| Name | Description |
|---|---|
| ajListIterFree | Deletes a list iterator. |
| Name | Description |
|---|---|
| ajListIterNext | Returns next item using iterator, or steps off the end. |
| ajListRemove | Removes an item at the current iterator. |
| ajListstrRemove | Removes an AjPStr item at the current iterator. |
| ajListInsert | Inserts an item at the current iterator. |
| ajListstrInsert | Inserts an AjPStr item at the current iterator. |
| Name | Description |
|---|---|
| ajListIterMore | Tests whether iterator can return another item. |
| Name | Description |
|---|---|
| ajListIterTrace | Traces a list iterator. |
| ajListstrIterTrace | Traces an AjPStr list iterator. |