|
libcsem
0.2
|
Go to the source code of this file.
Defines | |
| #define | CSEM_NS_C_BEGIN |
| #define | CSEM_NS_C_END |
Typedefs | |
| typedef typedefCSEM_NS_C_BEGIN struct CSEM_List | CSEM_List |
| Array List. | |
Functions | |
| CSEM_List * | CSEM_List_Create (size_t initial_size) |
| Create a list instance. | |
| CSEM_Error | CSEM_List_Add (CSEM_List *list, const void *data) |
| Add a specified element into the list. | |
| size_t | CSEM_List_Size (const CSEM_List *list) |
| Get a length of the list array. | |
| void * | CSEM_List_Get (const CSEM_List *list, int index) |
| Get an element of the specified index. | |
| CSEM_Bool | CSEM_List_Contains (const CSEM_List *list, const void *data) |
| Test whether the list contains the specified element or not. | |
| int | CSEM_List_IndexOf (const CSEM_List *list, const void *data) |
| Get an index of the specified element. | |
| CSEM_Bool | CSEM_List_IsEmpty (const CSEM_List *list) |
| Test whether the list is empty or not. | |
| void * | CSEM_List_Remove (CSEM_List *list, int index) |
| Remove an element of the specified index. | |
| void * | CSEM_List_Replace (CSEM_List *list, int index, const void *data) |
| Replace the specified index element with the specified new one. | |
| void | CSEM_List_Clear (CSEM_List *list, CSEM_Bool free) |
| Clear all elements of the list. | |
| void | CSEM_List_Dispose (CSEM_List *list, CSEM_Bool free) |
| Dispose the list instance. | |
| #define CSEM_NS_C_BEGIN |
| #define CSEM_NS_C_END |
| CSEM_Error CSEM_List_Add | ( | CSEM_List * | list, |
| const void * | data | ||
| ) |
Add a specified element into the list.
| list | [in]list instance |
| data | [in]a element to be added |
| void CSEM_List_Clear | ( | CSEM_List * | list, |
| CSEM_Bool | free | ||
| ) |
Clear all elements of the list.
| list | [in]list instance |
| free | [in]a flag to free the elements or not |
| CSEM_Bool CSEM_List_Contains | ( | const CSEM_List * | list, |
| const void * | data | ||
| ) |
Test whether the list contains the specified element or not.
| list | [in]list instance |
| data | [in]an element to be tested |
| CSEM_List* CSEM_List_Create | ( | size_t | initial_size | ) |
Create a list instance.
| initial_size | [in]initial size of the array list |
| void CSEM_List_Dispose | ( | CSEM_List * | list, |
| CSEM_Bool | free | ||
| ) |
Dispose the list instance.
| list | [in]list instance to be freed |
| free | [in]a flag to free the elements or not |
| void* CSEM_List_Get | ( | const CSEM_List * | list, |
| int | index | ||
| ) |
Get an element of the specified index.
| list | [in]list instance |
| index | [in]index of the element |
| int CSEM_List_IndexOf | ( | const CSEM_List * | list, |
| const void * | data | ||
| ) |
Get an index of the specified element.
| list | [in]list instance |
| data | [in]an element |
| CSEM_Bool CSEM_List_IsEmpty | ( | const CSEM_List * | list | ) |
Test whether the list is empty or not.
| list | [in]list instance |
| void* CSEM_List_Remove | ( | CSEM_List * | list, |
| int | index | ||
| ) |
Remove an element of the specified index.
| list | [in]list instance |
| index | [in]index of the element to be removed |
| void* CSEM_List_Replace | ( | CSEM_List * | list, |
| int | index, | ||
| const void * | data | ||
| ) |
Replace the specified index element with the specified new one.
| list | [in]list instance |
| index | [in]index of element to be replaced |
| data | [in]an new element |
| size_t CSEM_List_Size | ( | const CSEM_List * | list | ) |
Get a length of the list array.
| list | [in]list instance |