#include "ktypes.h"
Data Structures | |
| struct | _KTypeList |
Declares a list of KType elements (Not used). More... | |
Typedefs | |
| typedef _KIntList | KIntList |
| Declaration of an integer list. | |
| typedef _KUIntList | KUIntList |
| Declaration of an unsigned integer list. | |
| typedef _KInt8List | KInt8List |
| Declaration of an 8 bits integer list. | |
| typedef _KUInt8List | KUInt8List |
| Declaration of an unsigned 8 bits integer list. | |
| typedef _KInt16List | KInt16List |
| Declaration of a 16 bits integer list. | |
| typedef _KUInt16List | KUInt16List |
| Declaration of an unsigned 16 bits integer list. | |
| typedef _KInt32List | KInt32List |
| Declaration of a 32 bits integer list. | |
| typedef _KUInt32List | KUInt32List |
| Declaration of an unsigned 32 bits integer list. | |
| typedef _KInt64List | KInt64List |
| Declaration of a 64 bits integer list. | |
| typedef _KUInt64List | KUInt64List |
| Declaration of an unsigned 64 bits integer list. | |
| typedef _KFloatList | KFloatList |
| Declaration of a float list. | |
| typedef _KDoubleList | KDoubleList |
| Declaration of a double list. | |
| typedef _KCharList | KCharList |
| Declaration of a char list. | |
| typedef _KUCharList | KUCharList |
| Declaration of an unsigned char list. | |
| typedef _KWCharList | KWCharList |
| Declaration of an unicode char list. | |
| typedef _KBoolList | KBoolList |
| Declaration of a boolean list. | |
| typedef _KTypeList | KTypeList |
Declares a list of KType elements (Not used). | |
| typedef KInt( | KFunc_KType_cmp )(KType, KType) |
Function type to compare two KType value. | |
Functions | |
| KTypeList * | KTypeList_new () |
| Allocates a new element of the list. | |
| KBool | KTypeList_init (KTypeList *pList, const KType iValue, KTypeList *pNext) |
| Initializes an element list. | |
| KTypeList * | KTypeList_create (const KType iValue, KTypeList *pNext) |
| Allocates and initialized a new element list. | |
| KTypeList * | KTypeList_clone (KTypeList *pList) |
| Clones a list. | |
| void | KTypeList_delete (KTypeList **ppList) |
| Destroyed a list. | |
| KTypeList * | KTypeList_append (KTypeList *pList, const KType iValue) |
| Adds an element at the end of a list. | |
| KTypeList * | KTypeList_remove_link (KTypeList *pList, KTypeList *pLink) |
| Removes an element from a list. | |
| KTypeList * | KTypeList_remove_data (KTypeList *pList, const KType iValue) |
| Removes a value from a list. | |
| KBool | KTypeList_contains (KTypeList *pList, const KType iValue) |
| Checks if a value is contained in a list. | |
| KTypeList * | KTypeList_insert (KTypeList *pList, const KUInt32 iIdx, const KType iValue) |
| Inserts a value in a list. | |
| KUInt32 | KTypeList_size (KTypeList *pList) |
| Gets the size of the list. | |
| KTypeList * | KTypeList_concat (KTypeList *pList1, KTypeList *pList2) |
| Concatenates two lists. | |
| KTypeList * | KTypeList_insert_order (KTypeList *pList, const KType iValue, KFunc_KType_cmp *fCompare) |
| Inserts a value in a list with an order. | |
| KTypeList * | KTypeList_remove_at (KTypeList *pList, const KUInt32 iIdx) |
| Removes an element. | |
| KType | KTypeList_data_at (KTypeList *pList, const KUInt32 iIdx) |
| Gets the value at an index. | |
| KInt32 | KTypeList_indexOf (KTypeList *pList, const KType iValue) |
| Gets the index of a value. | |
| KTypeList * | KTypeList_last (KTypeList *pList) |
| Gets the last element of the list. | |
All declared lists in this file have the same functions. Its differencies are the suffix. A list of element of type KType is defined as the KTypeList type and its functions are defined as KTypeList_[function_name].
For this documentation, the only documented list is KTypeList. This not a real list, but all its function are identical to every others defined lists in this file.
To find functions of a specific list, replace the word KType by the type of your list. For example, if you use a list of 16 bits integer, the type of the list is KInt16List and all its functions begin with KInt16List_. (ex: KInt16List_append, KInt16List_delete, KInt16List_contains , ...)
|
||||||||||||
|
Adds an element at the end of a list.
|
|
|
Clones a list. All elements of the list are cloned. No pointer are identical between the first list and the cloned list
|
|
||||||||||||
|
Concatenates two lists. The lists are not cloned !
|
|
||||||||||||
|
Checks if a value is contained in a list.
|
|
||||||||||||
|
Allocates and initialized a new element list.
|
|
||||||||||||
|
Gets the value at an index.
|
|
|
Destroyed a list. Destroys all elements of the list.
|
|
||||||||||||
|
Gets the index of a value. Returns the first value found in the list.
|
|
||||||||||||||||
|
Initializes an element list.
|
|
||||||||||||||||
|
Inserts a value in a list.
|
|
||||||||||||||||
|
Inserts a value in a list with an order.
|
|
|
Gets the last element of the list.
|
|
|
Allocates a new element of the list.
|
|
||||||||||||
|
Removes an element. Only the element to removed is deleted. The next elements of the removed one, are stayed in the list.
|
|
||||||||||||
|
Removes a value from a list. Only the first element the value is deleted. The next elements of the removed one, are stayed in the list.
|
|
||||||||||||
|
Removes an element from a list. Only the element to removed is deleted. The next elements of the removed one, are stayed in the list.
|
|
|
Gets the size of the list.
|
1.3.8