ajlist.c
Creates a new general list.
Synopsis
Prototype
AjPList ajListNew (
void
);
Returns
Description
Creates a new general list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Creates a new string list.
Synopsis
Prototype
AjPList ajListstrNew (
void
);
Returns
Description
Creates a new string list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Add a new node at the start of the list and add the
data pointer.
Synopsis
Prototype
void ajListPush (
AjPList thys,
void* x
);
Input & Output
| thys: | (Modify) | list to be changed. |
| x: | (Modify) | Pointer to data. |
Returns
Description
Add a new node at the start of the list and add the
data pointer.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Add a new node at the start of a string list.
Synopsis
Prototype
void ajListstrPush (
AjPList thys,
AjPStr x
);
Input & Output
| thys: | (Modify) | list to be changed. |
| x: | (Modify) | String data. |
Returns
Description
Add a new node at the start of a string list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Traces through a list and validates it
Synopsis
Prototype
void ajListTrace (
const AjPList thys
);
Input
| thys: | (Input) | list to be traced. |
Returns
Description
Traces through a list and validates it
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Traces through a string list and validates it
Synopsis
Prototype
void ajListstrTrace (
const AjPList thys
);
Input
| thys: | (Input) | list to be traced. |
Returns
Description
Traces through a string list and validates it
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Create a new list, create the nodes and add the data.
Synopsis
Prototype
AjPList ajListNewArgs (
void* x,
...
);
Input
| : | (Vararg) | Variable length argument list |
Input & Output
| x: | (Modify) | First data item |
Returns
Description
Create a new list, create the nodes and add the data.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Create a new list, create the nodes and add the data.
Synopsis
Prototype
AjPList ajListstrNewArgs (
AjPStr x,
...
);
Input
| : | (Vararg) | Variable length argument list |
Input & Output
Returns
Description
Create a new list, create the nodes and add the data.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Create new nodes (NO header) and add data.
Synopsis
Prototype
AjPListNode ajListNodesNew (
void* x,
...
);
Input
| : | (Vararg) | Variable length argument list |
Input & Output
| x: | (Modify) | First data item. |
Returns
| AjPListNode: | new list (body). |
Description
Create new nodes (NO header) and add data.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Add a new node at the end of the list and add the
data pointer.
The new node can have more nodes attached. The original node data
structure is deleted.
Synopsis
Prototype
void ajListAppend (
AjPList thys,
AjPListNode* morenodes
);
Output
| morenodes: | (Delete) | link list to append. |
Input & Output
| thys: | (Modify) | list to be changed. |
Returns
Description
Add a new node at the end of the list and add the
data pointer.
The new node can have more nodes attached. The original node data
structure is deleted.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Add a new node at the end of the list and add the
data pointer.
Synopsis
Prototype
void ajListPushApp (
AjPList thys,
void* x
);
Input & Output
| thys: | (Modify) | List to be changed. |
| x: | (Modify) | Pointer to data to append. |
Returns
Description
Add a new node at the end of the list and add the
data pointer.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Add a new node at the end of the list and add the
data pointer.
Synopsis
Prototype
void ajListstrPushApp (
AjPList thys,
AjPStr x
);
Input & Output
| thys: | (Modify) | List to be changed. |
| x: | (Modify) | String to append. |
Returns
Description
Add a new node at the end of the list and add the
data pointer.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Copy a string list.
WARNING: pointers to the data are copied, NOT the data
so be careful when cleaning up after copy.
Synopsis
Prototype
AjPList ajListstrCopy (
const AjPList thys
);
Input
| thys: | (Input) | List to be copied |
Returns
| AjPList: | New, copied, list. |
Description
Copy a string list.
WARNING: pointers to the data are copied, NOT the data
so be careful when cleaning up after copy.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Copy a list.
WARNING: pointers to the data are copied, NOT the data
so be careful when cleaning up after copy.
Synopsis
Prototype
AjPList ajListCopy (
const AjPList thys
);
Input
| thys: | (Input) | list to be copied |
Returns
Description
Copy a list.
WARNING: pointers to the data are copied, NOT the data
so be careful when cleaning up after copy.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Copy a string list. The destination list should be empty.
If it is not, new entries are appended.
WARNING: Makes new copies of the strings. No good general solution
so this is a strings-only function.
Synopsis
Prototype
ajint ajListstrClone (
const AjPList thys,
AjPList newlist
);
Input
| thys: | (Input) | list to be copied |
Input & Output
| newlist: | (Modify) | (empty) target list |
Returns
Description
Copy a string list. The destination list should be empty.
If it is not, new entries are appended.
WARNING: Makes new copies of the strings. No good general solution
so this is a strings-only function.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Set pointer to first node's data. Does NOT remove the first node.
Synopsis
Prototype
AjBool ajListFirst (
const AjPList thys,
void** x
);
Input
Output
| x: | (Output) | pointer to pointer to data |
Returns
| AjBool: | ajTrue on success. |
Description
Set pointer to first node's data. Does NOT remove the first node.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Set pointer to last node's data. Does NOT remove the last node.
Synopsis
Prototype
AjBool ajListLast (
const AjPList thys,
void** x
);
Input
Output
| x: | (Output) | pointer to pointer to data |
Returns
| AjBool: | ajTrue on success. |
Description
Set pointer to last node's data. Does NOT remove the last node.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Set pointer to last node's nth data item. 0 <= n < number of elements.
Synopsis
Prototype
AjBool ajListNth (
const AjPList thys,
ajint n,
void** x
);
Input
| thys: | (Input) | List |
| n: | (Input) | element of the list |
Output
| x: | (Output) | pointer to pointer to data |
Returns
| AjBool: | ajTrue on success. |
Description
Set pointer to last node's nth data item. 0 <= n < number of elements.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
remove the first node but set pointer to data first.
Synopsis
Prototype
AjBool ajListPop (
AjPList thys,
void** x
);
Output
| x: | (Output) | pointer to pointer to data |
Input & Output
Returns
| AjBool: | ajTrue on success. |
Description
remove the first node but set pointer to data first.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Return the first node but keep it on the list
Synopsis
Prototype
AjBool ajListPeek (
const AjPList thys,
void** x
);
Input
Output
| x: | (Output) | pointer to pointer to data |
Returns
| AjBool: | ajTrue on success. |
Description
Return the first node but keep it on the list
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Remove the first node but set pointer to data first.
Synopsis
Prototype
AjBool ajListstrPop (
AjPList thys,
AjPStr* x
);
Output
Input & Output
Returns
| AjBool: | ajTrue on success. |
Description
Remove the first node but set pointer to data first.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Return the first node but keep it on the list.
Synopsis
Prototype
AjBool ajListstrPeek (
const AjPList thys,
AjPStr* x
);
Input
Output
Returns
| AjBool: | ajTrue on success. |
Description
Return the first node but keep it on the list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Reverse the order of the nodes in an abstract list.
Synopsis
Prototype
void ajListReverse (
AjPList thys
);
Input & Output
Returns
Description
Reverse the order of the nodes in an abstract list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Reverse the order of the nodes in a string list.
Synopsis
Prototype
void ajListstrReverse (
AjPList thys
);
Input & Output
Returns
Description
Reverse the order of the nodes in a string list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
get the number of nodes in the linked list.
Synopsis
Prototype
ajint ajListLength (
const AjPList thys
);
Input
Returns
| ajint: | Number of nodes in list. |
Description
get the number of nodes in the linked list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
get the number of nodes in the linked list.
Synopsis
Prototype
ajint ajListstrLength (
const AjPList thys
);
Input
Returns
| ajint: | Number of nodes in list. |
Description
get the number of nodes in the linked list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Free all nodes in the list.
NOTE: The data is only freed with a specified list type.
For undefined data types we recommend you to
use ajListMap with a routine to free the memory.
Synopsis
Prototype
void ajListFree (
AjPList* pthis
);
Output
Returns
Description
Free all nodes in the list.
NOTE: The data is only freed with a specified list type.
For undefined data types we recommend you to
use ajListMap with a routine to free the memory.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Free all nodes in a string list.
Also deletes all the strings. If these are to be preserved,
use ajListstrDel instead.
Synopsis
Prototype
void ajListstrFree (
AjPList* pthis
);
Output
Returns
Description
Free all nodes in a string list.
Also deletes all the strings. If these are to be preserved,
use ajListstrDel instead.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Free the list. Do not attempt to free the nodes.
For use where the node data has been saved elsewhere, for example
by ajListToArray or where the list is a temporary structure
referring to permanent data.
Synopsis
Prototype
void ajListDel (
AjPList* pthis
);
Output
Returns
Description
Free the list. Do not attempt to free the nodes.
For use where the node data has been saved elsewhere, for example
by ajListToArray or where the list is a temporary structure
referring to permanent data.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Free the list. Do not attempt to free the nodes.
For use where the node data has been saved elsewhere, for example
by ajListToArray or where the list is a temporary structure
referring to permanent data.
Synopsis
Prototype
void ajListstrDel (
AjPList* pthis
);
Output
Returns
Description
Free the list. Do not attempt to free the nodes.
For use where the node data has been saved elsewhere, for example
by ajListToArray or where the list is a temporary structure
referring to permanent data.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
For each node in the list call function apply.
Synopsis
Prototype
void ajListMap (
AjPList thys,
void function apply,
void* cl
);
Input
| apply: | (Function) | Function to call for each list item. |
Input & Output
| thys: | (Modify) | List. |
| cl: | (Modify) | Standard, usually NULL. |
Returns
Description
For each node in the list call function apply.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
For each node in the list call function apply,
with the address of the string and a client pointer.
Synopsis
Prototype
void ajListstrMap (
AjPList thys,
void function apply,
void* cl
);
Input
| apply: | (Function) | Function to call for each list item. |
Input & Output
| thys: | (Modify) | List. |
| cl: | (Modify) | Standard, usually NULL. |
Returns
Description
For each node in the list call function apply,
with the address of the string and a client pointer.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
For each node in the list call function apply.
The apply function must not modify the list elements.
Synopsis
Prototype
void ajListMapRead (
const AjPList thys,
void function apply,
void* cl
);
Input
| thys: | (Input) | List. |
| apply: | (Function) | Function to call for each list item. |
Input & Output
| cl: | (Modify) | Standard, usually NULL. |
Returns
Description
For each node in the list call function apply.
The apply function must not modify the list elements.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
For each node in the list call function apply,
with the address of the string and a client pointer.
The apply function must not modify the list elements.
Synopsis
Prototype
void ajListstrMapRead (
const AjPList thys,
void function apply,
void* cl
);
Input
| thys: | (Input) | List. |
| apply: | (Function) | Function to call for each list item. |
Input & Output
| cl: | (Modify) | Standard, usually NULL. |
Returns
Description
For each node in the list call function apply,
with the address of the string and a client pointer.
The apply function must not modify the list elements.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Create an array of the pointers to the data.
Synopsis
Prototype
ajint ajListToArray (
const AjPList thys,
void*** array
);
Input
Output
| array: | (Output) | Array of pointers to list items. |
Returns
| ajint: | Size of array of pointers. |
Description
Create an array of the pointers to the data.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
create an array of the pointers to the data.
Synopsis
Prototype
ajint ajListstrToArray (
const AjPList thys,
AjPStr** array
);
Input
Output
| array: | (Output) | Array of Strings. |
Returns
| ajint: | Size of array of pointers. |
Description
create an array of the pointers to the data.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
append to an array of the pointers to the data.
Synopsis
Prototype
ajint ajListstrToArrayApp (
const AjPList thys,
AjPStr** array
);
Input
Output
| array: | (Output) | Array of Strings. |
Returns
| ajint: | Size of array of pointers. |
Description
append to an array of the pointers to the data.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
For each node in the list call function 'apply' and return
ajTrue when any node is matched by the function.
Synopsis
Prototype
AjBool ajListFind (
const AjPList thys,
AjBool function apply,
void* cl
);
Input
| thys: | (Input) | List |
| apply: | (Function) | Function to call to test each list item. |
Input & Output
| cl: | (Modify) | Standard, usually NULL. |
Returns
| AjBool: | ajTrue on success. |
Description
For each node in the list call function 'apply' and return
ajTrue when any node is matched by the function.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
For each node in the list call function apply and return
ajTrue when any node is matched by the function.
Synopsis
Prototype
AjBool ajListstrFind (
const AjPList thys,
AjBool function apply,
void* cl
);
Input
| thys: | (Input) | List |
| apply: | (Function) | Function to call to test each list item. |
Input & Output
| cl: | (Modify) | Standard, usually NULL. |
Returns
| AjBool: | ajTrue on success. |
Description
For each node in the list call function apply and return
ajTrue when any node is matched by the function.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Creates an iterator to operate from start to end of list.
Synopsis
Prototype
AjIList ajListIter (
AjPList thys
);
Input & Output
| thys: | (Modify) | List
Not const in practice - the iterator can insert
and delete entries |
Returns
| AjIList: | New list iterator |
Description
Creates an iterator to operate from start to end of list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Creates an iterator to operate from start to end of list.
Synopsis
Prototype
AjIList ajListIterRead (
const AjPList thys
);
Input
| thys: | (Input) | List
Not const in practice - the iterator can insert
and delete entries |
Returns
| AjIList: | New list iterator |
Description
Creates an iterator to operate from start to end of list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Creates an iterator to operate from end to start of the list.
Synopsis
Prototype
AjIList ajListIterBack (
AjPList thys
);
Input & Output
| thys: | (Modify) | List
Not const - the iterator can insert and delete entries |
Returns
| AjIList: | New list iterator |
Description
Creates an iterator to operate from end to start of the list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Creates an iterator to operate from end to start of the list.
Synopsis
Prototype
AjIList ajListIterBackRead (
const AjPList thys
);
Input
Returns
| AjIList: | New list iterator |
Description
Creates an iterator to operate from end to start of the list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Tests whether an iterator has completed yet.
Synopsis
Prototype
AjBool ajListIterDone (
const AjIList iter
);
Input
| iter: | (Input) | List iterator. |
Returns
| AjBool: | ajTrue if the iterator is exhausted. |
Description
Tests whether an iterator has completed yet.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Tests whether a backwards iterator has completed yet.
Synopsis
Prototype
AjBool ajListIterBackDone (
const AjIList iter
);
Input
| iter: | (Input) | List iterator. |
Returns
| AjBool: | ajTrue if the iterator is exhausted. |
Description
Tests whether a backwards iterator has completed yet.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Destructor for a list iterator.
Synopsis
Prototype
void ajListIterFree (
AjIList* iter
);
Output
| iter: | (Delete) | List iterator. |
Returns
Description
Destructor for a list iterator.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Tests whether ajListIterNext can return another item.
Synopsis
Prototype
AjBool ajListIterMore (
const AjIList iter
);
Input
| iter: | (Input) | List iterator. |
Returns
| AjBool: | ajTrue if the iterator can continue. |
Description
Tests whether ajListIterNext can return another item.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Tests whether ajListIterBackNext can return another item.
Synopsis
Prototype
AjBool ajListIterBackMore (
const AjIList iter
);
Input
| iter: | (Input) | List iterator. |
Returns
| AjBool: | ajTrue if the iterator can continue. |
Description
Tests whether ajListIterBackNext can return another item.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns next item using iterator, or steps off the end.
Synopsis
Prototype
void* ajListIterNext (
AjIList iter
);
Input & Output
| iter: | (Modify) | List iterator. |
Returns
| void*: | Data item returned. |
Description
Returns next item using iterator, or steps off the end.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Returns next item using back iterator.
Synopsis
Prototype
void* ajListIterBackNext (
AjIList iter
);
Input & Output
| iter: | (Modify) | List iterator. |
Returns
| void*: | Data item returned. |
Description
Returns next item using back iterator.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Remove an item from a list, using an iterator (if not null)
to show which item. Otherwise remove the first item.
We want to remove the item just fetched by the iterator.
Synopsis
Prototype
void ajListRemove (
AjIList iter
);
Input & Output
| iter: | (Modify) | List iterator. |
Returns
Description
Remove an item from a list, using an iterator (if not null)
to show which item. Otherwise remove the first item.
We want to remove the item just fetched by the iterator.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Remove an item from a list, using an iterator (if not null)
to show which item. Otherwise remove the first item.
We want to remove the item just fetched by the iterator.
Synopsis
Prototype
void ajListstrRemove (
AjIList iter
);
Input & Output
| iter: | (Modify) | List iterator. |
Returns
Description
Remove an item from a list, using an iterator (if not null)
to show which item. Otherwise remove the first item.
We want to remove the item just fetched by the iterator.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Insert an item in a list, using an iterator (if not null)
to show which position to insert. Otherwise, simply push.
Synopsis
Prototype
void ajListInsert (
AjIList iter,
void* x
);
Input & Output
| iter: | (Modify) | List iterator. |
| x: | (Modify) | Data item to insert. |
Returns
Description
Insert an item in a list, using an iterator (if not null)
to show which position to insert. Otherwise, simply push.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Insert an item in a list, using an iterator (if not null)
to show which position to insert. Otherwise, simply push.
Synopsis
Prototype
void ajListstrInsert (
AjIList iter,
AjPStr x
);
Input & Output
| iter: | (Modify) | List iterator. |
| x: | (Modify) | String to insert. |
Returns
Description
Insert an item in a list, using an iterator (if not null)
to show which position to insert. Otherwise, simply push.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Traces a list iterator and validates it.
Synopsis
Prototype
void ajListIterTrace (
const AjIList thys
);
Input
| thys: | (Input) | list iterator to be traced. |
Returns
Description
Traces a list iterator and validates it.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Traces a list iterator and validates it
Synopsis
Prototype
void ajListstrIterTrace (
const AjIList thys
);
Input
| thys: | (Input) | List iterator to be traced. |
Returns
Description
Traces a list iterator and validates it
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Adds a list to the start of the current list, then deletes the second list.
Synopsis
Prototype
void ajListPushList (
AjPList thys,
AjPList* pmore
);
Output
| pmore: | (Delete) | List to be merged. |
Input & Output
Returns
Description
Adds a list to the start of the current list, then deletes the second list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Adds a list to the start of the current list, then deletes the second list.
Synopsis
Prototype
void ajListstrPushList (
AjPList thys,
AjPList* pmore
);
Output
| pmore: | (Delete) | List to be merged. |
Input & Output
Returns
Description
Adds a list to the start of the current list, then deletes the second list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Sort the items in a list.
Synopsis
Prototype
void ajListSort (
AjPList thys,
int* function compar
);
Input
| compar: | (Function) | Function to compare two list items. |
Input & Output
Returns
Description
Sort the items in a list.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Sort the items in a list, and remove duplicates
Synopsis
Prototype
void ajListUnique (
AjPList thys,
int* function compar,
void function nodedelete
);
Input
| compar: | (Function) | Function to compare two list items. |
| nodedelete: | (Function) | Function to delete an item |
Input & Output
Returns
Description
Sort the items in a list, and remove duplicates
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Double-sort the items in a list, and remove duplicates
Synopsis
Prototype
void ajListUnique2 (
AjPList thys,
int* function compar1,
int* function compar2,
void function nodedelete
);
Input
| compar1: | (Function) | Function to compare two list items. |
| compar2: | (Function) | Function to compare two list items. |
| nodedelete: | (Function) | Function to delete an item |
Input & Output
Returns
Description
Double-sort the items in a list, and remove duplicates
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
remove the last node but set pointer to data first.
Synopsis
Prototype
AjBool ajListPopEnd (
AjPList thys,
void** x
);
Output
| x: | (Output) | pointer to pointer to data |
Input & Output
Returns
| AjBool: | ajTrue on success. |
Description
remove the last node but set pointer to data first.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Remove the last node but set pointer to data first.
Synopsis
Prototype
AjBool ajListstrPopEnd (
AjPList thys,
AjPStr* x
);
Output
Input & Output
Returns
| AjBool: | ajTrue on success. |
Description
Remove the last node but set pointer to data first.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Dummy function to catch all unused functions defined in ajlist
Synopsis
Prototype
void ajListDummyFunction (
void** array
);
Input
| array: | (Input) | Array needed by ajListArrayTrace |
Returns
Description
Dummy function to catch all unused functions defined in ajlist
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Garbage collect a list
Synopsis
Prototype
void ajListGarbageCollect (
AjPList list,
void* function destruct,
AjBool* function compar
);
Input
| destruct: | (Function) | Wrapper function for item destructor |
| compar: | (Function) | Function to test whether to delete |
Input & Output
Returns
Description
Garbage collect a list
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Sort the items in a list using 2 fields in the same object hierarchy.
Synopsis
Prototype
void ajListSort2 (
AjPList thys,
int* function sort1,
int* function sort2
);
Input
| sort1: | (Function) | 1st function to compare two list items. |
| sort2: | (Function) | 2nd function to compare two list items. |
Input & Output
Returns
Description
Sort the items in a list using 2 fields in the same object hierarchy.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Sort the items in a list using 3 fields in the same object hierarchy.
Synopsis
Prototype
void ajListSort3 (
AjPList thys,
int* function sort1,
int* function sort2,
int* function sort3
);
Input
| sort1: | (Function) | 1st function to compare two list items. |
| sort2: | (Function) | 2nd function to compare two list items. |
| sort3: | (Function) | 3rd function to compare two list items. |
Input & Output
Returns
Description
Sort the items in a list using 3 fields in the same object hierarchy.
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0
Prints a summary of list usage with debug calls
Synopsis
Prototype
void ajListExit (
void
);
Returns
Description
Prints a summary of list usage with debug calls
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 3.0.0