#include "ktypes.h"
Data Structures | |
| struct | _KList |
| Linked list structure. More... | |
Defines | |
| #define | KList_new() _KList_new (__K_FILE__, __K_LINE__) |
| Creates an empty list. | |
| #define | KList_create(data, next) _KList_create (data, next, __K_FILE__, __K_LINE__) |
| Creates a link and initializes it. | |
| #define | KList_clone(list) _KList_clone (list, __K_FILE__, __K_LINE__) |
| Clones a list. | |
| #define | KList_append(klist, data) _KList_append (klist, data, __K_FILE__, __K_LINE__) |
| Adds an element at the end of the list. | |
Typedefs | |
| typedef _KList | KList |
| Linked list structure. | |
Functions | |
| KTL_API KList * | _KList_new (KString file, KInt32 line) |
| Creates an empty list. | |
| KTL_API KBool | KList_init (KList *klist, KPtr data, KList *next) |
| Initializes a link of the list. | |
| KTL_API KList * | _KList_create (KPtr data, KList *next, KString file, KInt32 line) |
| Creates a link and initializes it. | |
| KTL_API KList * | _KList_clone (KList *list, KString file, KInt32 line) |
| Clones a list. | |
| KTL_API void | KList_delete (KList **klist) |
| Deletes a list and all its elements. | |
| KTL_API KList * | _KList_append (KList *klist, KPtr data, KString file, KInt32 line) |
| Adds an element at the end of the list. | |
| KTL_API KList * | KList_remove_link (KList *klist, KList *link) |
| Removes a link of the list. | |
| KTL_API KList * | KList_remove_data (KList *klist, KPtr data) |
| Removes an element of the list. | |
| KTL_API KBool | KList_contains (KList *klist, KCPtr data) |
| Searches of an element in a list. | |
| KTL_API KList * | KList_insert (KList *klist, KInt idx, KPtr data) |
| Inserts an element at a given position in a list. | |
| KTL_API KUInt32 | KList_size (KList *klist) |
| Returns the number of element of a list. | |
| KTL_API KList * | KList_concat (KList *l1, KList *l2) |
| Concatenates two list. | |
| KTL_API void | KList_print_str (KList *list) |
| Writes to the standard output all the elements of a list (Used only for the string). | |
| KTL_API KList * | KList_insert_order (KList *list, KPtr value, KFunc_cmp *cmp_func) |
| Inserts an element to a list in ascending order regarding the comparison function. | |
| KTL_API KList * | KList_remove_at (KList *list, KInt n) |
| Removes at a given position an element from a list. | |
| KTL_API KPtr | KList_data_at (KList *list, KInt n) |
| Returned an element at a given position in a list. | |
| KTL_API KInt32 | KList_indexOf (KList *list, KCPtr data) |
| Returns the index of an element. | |
|
|
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 list.
|
|
||||||||||||
|
Searches of an element in a list.
|
|
||||||||||||
|
Returned an element at a given position in a list.
|
|
|
Deletes a list and all its elements.
|
|
||||||||||||
|
Returns the index of an element.
|
|
||||||||||||||||
|
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 of the list.
|
|
||||||||||||
|
Removes a link of the list.
|
|
|
Returns the number of element of a list.
|
1.3.8