#include "ktypes.h"
Data Structures | |
| struct | _KCList |
| Linked list structure with constant elements. More... | |
Defines | |
| #define | KCList_new() _KCList_new (__K_FILE__, __K_LINE__) |
| Creates an empty list. | |
| #define | KCList_create(data, next) _KCList_create (data, next, __K_FILE__, __K_LINE__) |
| Creates a link and initializes it. | |
| #define | KCList_clone(list) _KCList_clone (list, __K_FILE__, __K_LINE__) |
| Clones a list. | |
| #define | KCList_append(klist, data) _KCList_append (klist, data, __K_FILE__, __K_LINE__) |
| Adds an element at the end of the list. | |
Typedefs | |
| typedef _KCList | KCList |
| Linked list structure with constant elements. | |
Functions | |
| KTL_API KCList * | _KCList_new (KString file, KInt32 line) |
| Creates an empty list. | |
| KTL_API KBool | KCList_init (KCList *klist, KCPtr data, KCList *next) |
| Initializes a link of the list. | |
| KTL_API KCList * | _KCList_create (KCPtr data, KCList *next, KString file, KInt32 line) |
| Creates a link and initializes it. | |
| KTL_API KCList * | _KCList_clone (KCList *list, KString file, KInt32 line) |
| Clones a list. | |
| KTL_API void | KCList_delete (KCList **klist) |
| Deletes a list and all its elements. | |
| KTL_API KCList * | _KCList_append (KCList *klist, KCPtr data, KString file, KInt32 line) |
| Adds an element at the end of the list. | |
| KTL_API KCList * | KCList_remove_link (KCList *klist, KCList *link) |
| Removes a link of the list. | |
| KTL_API KCList * | KCList_remove_data (KCList *klist, KCPtr data) |
| Removes an element from the list. | |
| KTL_API KBool | KCList_contains (KCList *klist, KCPtr data) |
| Searches of an element in a list. | |
| KTL_API KCList * | KCList_insert (KCList *klist, KInt idx, KCPtr data) |
| Inserts an element at a given position in a list. | |
| KTL_API KUInt32 | KCList_size (KCList *klist) |
| Returns the number of element of a list. | |
| KTL_API KCList * | KCList_concat (KCList *l1, KCList *l2) |
| Concatenates two lists. | |
| KTL_API void | KCList_print_str (KCList *list) |
| Writes to the standard output all the elements of a list (Used only for the string). | |
| KTL_API KCList * | KCList_insert_order (KCList *list, KCPtr value, KFunc_cmp *cmp_func) |
| Inserts an element to a list in ascending order regarding the comparison function. | |
| KTL_API KCList * | KCList_remove_at (KCList *list, KInt n) |
| Removes at a given position an element from a list. | |
| KTL_API KCPtr | KCList_data_at (KCList *list, KInt n) |
| Removes at a given position an element from a list and returns it. | |
|
|
Adds an element at the end of the list.
|
|
|
Clones a list.
|
|
|
Creates a link and initializes it.
|
|
|
Creates an empty list.
|
|
||||||||||||||||||||
|
Adds an element at the end of the list.
|
|
||||||||||||||||
|
Clones a list.
|
|
||||||||||||||||||||
|
Creates a link and initializes it.
|
|
||||||||||||
|
Creates an empty list.
|
|
||||||||||||
|
Concatenates two lists.
|
|
||||||||||||
|
Searches of an element in a list.
|
|
||||||||||||
|
Removes at a given position an element from a list and returns it.
|
|
|
Deletes a list and all its elements.
|
|
||||||||||||||||
|
Initializes a link of the list.
|
|
||||||||||||||||
|
Inserts an element at a given position in a list.
|
|
||||||||||||||||
|
Inserts an element to a list in ascending order regarding the comparison function.
|
|
|
Writes to the standard output all the elements of a list (Used only for the string).
|
|
||||||||||||
|
Removes at a given position an element from a list.
|
|
||||||||||||
|
Removes an element from the list.
|
|
||||||||||||
|
Removes a link of the list.
|
|
|
Returns the number of element of a list.
|
1.3.8