Modules | |
| The List Interface | |
Typedefs | |
| typedef Cmaid_Container | Cmaid_List |
| Type definition of the List Class. | |
Functions | |
| CMAID_INLINE void * | cmaid_list_append (Cmaid_List *t, void *data) |
| Appends a new data node. | |
| CMAID_INLINE void * | cmaid_list_prepend (Cmaid_List *t, void *data) |
| Prepends a new data node. | |
| CMAID_INLINE void | cmaid_list_first_remove (Cmaid_List *t) |
| Remove the first node of the list. | |
| CMAID_INLINE void | cmaid_list_last_remove (Cmaid_List *t) |
| Remove the last node of the list. | |
| CMAID_INLINE void * | cmaid_list_first (Cmaid_List *t) |
| Retrieve the value of the first node. | |
| CMAID_INLINE void * | cmaid_list_last (Cmaid_List *t) |
| Retrieve the value of the last node. | |
| CMAID_INLINE void * | cmaid_list_insert_before (Cmaid_List *t, Cmaid_Iter *iter, void *data) |
| Insert a new data node. | |
| CMAID_INLINE void * | cmaid_list_insert_after (Cmaid_List *t, Cmaid_Iter *iter, void *data) |
| Insert a new data node. | |
| CMAID_INLINE void | cmaid_list_sort (Cmaid_List *t) |
| Sorts the list. | |
| CMAID_INLINE void | cmaid_list_reverse (Cmaid_List *t) |
| Reverse the list. | |
The list provides an interface for a container to manage objects in an ordered collection. Duplications are possible and the order is preserved in the same way they were added to the container.
It provides functions to append and prepend objects, to sort and reverse the order. It is also possible to insert object, with an iterator defining the position.
| CMAID_INLINE void* cmaid_list_append | ( | Cmaid_List * | t, | |
| void * | data | |||
| ) |
Appends a new data node.
| t | the list to append the new data | |
| data | the data to append |
data pointer passed to the functions. The data parameter must not be NULL. | CMAID_INLINE void* cmaid_list_first | ( | Cmaid_List * | t | ) |
Retrieve the value of the first node.
| t | the list to work with |
NULL will be returned. | CMAID_INLINE void cmaid_list_first_remove | ( | Cmaid_List * | t | ) |
Remove the first node of the list.
| t | the list to work with |
| CMAID_INLINE void* cmaid_list_insert_after | ( | Cmaid_List * | t, | |
| Cmaid_Iter * | iter, | |||
| void * | data | |||
| ) |
Insert a new data node.
| t | the list to insert the new data | |
| data | the data to insert | |
| iter | the iterator which defines the position |
data pointer passed to the functions. The data parameter must not be NULL. | CMAID_INLINE void* cmaid_list_insert_before | ( | Cmaid_List * | t, | |
| Cmaid_Iter * | iter, | |||
| void * | data | |||
| ) |
Insert a new data node.
| t | the list to insert the new data | |
| data | the data to insert | |
| iter | the iterator which defines the position |
data pointer passed to the functions. The data parameter must not be NULL. | CMAID_INLINE void* cmaid_list_last | ( | Cmaid_List * | t | ) |
Retrieve the value of the last node.
| t | the list to work with |
NULL will be returned. | CMAID_INLINE void cmaid_list_last_remove | ( | Cmaid_List * | t | ) |
Remove the last node of the list.
| t | the list to work with |
| CMAID_INLINE void* cmaid_list_prepend | ( | Cmaid_List * | t, | |
| void * | data | |||
| ) |
Prepends a new data node.
| t | the list to prepend the new data | |
| data | the data to prepend |
data pointer passed to the functions. The data parameter must not be NULL. | CMAID_INLINE void cmaid_list_reverse | ( | Cmaid_List * | t | ) |
Reverse the list.
| t | the list to reverse |
| CMAID_INLINE void cmaid_list_sort | ( | Cmaid_List * | t | ) |
Sorts the list.
| t | the list to sort |
1.5.8