#include <types.h>
|
| int(* | append )(KSI_CalendarAuthRecList *, KSI_CalendarAuthRec *) |
| |
| int(* | removeElement )(KSI_CalendarAuthRecList *, size_t, KSI_CalendarAuthRec **) |
| |
| int(* | indexOf )(KSI_CalendarAuthRecList *, KSI_CalendarAuthRec *, size_t **) |
| |
| int(* | insertAt )(KSI_CalendarAuthRecList *, size_t, KSI_CalendarAuthRec *) |
| |
| int(* | replaceAt )(KSI_CalendarAuthRecList *, size_t, KSI_CalendarAuthRec *) |
| |
| int(* | elementAt )(KSI_CalendarAuthRecList *, size_t pos, KSI_CalendarAuthRec **) |
| |
| size_t(* | length )(KSI_CalendarAuthRecList *list) |
| |
| void(* | obj_free )(KSI_CalendarAuthRec *) |
| |
| int(* | sort )(KSI_CalendarAuthRecList *list, int(*cmp)(const KSI_CalendarAuthRec **, const KSI_CalendarAuthRec **)) |
| |
| int(* | foldl )(KSI_CalendarAuthRecList *list, void *foldCtx, int(*fn)(KSI_CalendarAuthRec *el, void *foldCtx)) |
| |
| void * | pImpl |
| |
◆ append
Appends the element to the list.
- Parameters
-
| [in] | list | Pointer to the list. |
| [in] | el | Pointer to the element being added. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
- Note
- After appending the element to the list, the element belongs to the list and it will be freed if the list is freed.
◆ elementAt
Method for accessing an element at any given position.
- Parameters
-
| [in] | list | Pointer to the list. |
| [in] | pos | Position of the element. |
| [out] | el | Pointer to the receiving pointer. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
- Note
- The returned element still belongs to the list and may not be freed by the caller.
◆ foldl
- Applies each element in the list and the foldCtx to the function fn. *
- Parameters
-
| [in] | list | Pointer to the list. * |
| [in] | foldCtx | The fold context. * |
| [in] | fn | Function to be applied. |
◆ indexOf
This function finds the index of a given element.
- Parameters
-
| [in] | list | Pointer to the list. |
| [in] | el | Pointer to the element. |
| [out] | pos | Pointer to the receiving pointer. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
◆ insertAt
Add the element to the given position in the list. All elements with equal or greater indices are shifted.
- Parameters
-
| [in] | list | Pointer to the list. |
| [in] | pos | Position where to insert the element. |
| [in] | el | Pointer to the element being added. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
- Note
- After add the element to the list, the element belongs to the list and it will be freed if the list is freed.
◆ length
Returns the list of the element.
- Parameters
-
| [in] | list | Pointer to the list. |
- Returns
- Returns the length of the list or 0 if the list is
NULL.
◆ obj_free
◆ pImpl
| void* KSI_CalendarAuthRec_list_st::pImpl |
Internal implementation of the list.
◆ removeElement
Removes an element at the given position. If the out parameter is set to NULL, the removed element is freed implicitly with type_free.
- Parameters
-
| [in] | list | Pointer to the list. |
| [in] | pos | Position of the element to be removed. |
| [out] | el | Pointer to the receiving pointer. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
- Note
- If the element is removed from the list and returned via output parameter to the caller, the caller is responsible for freeing the element.
◆ replaceAt
Replace the element at the given position in the list. The old element will be freed.
- Parameters
-
| [in] | list | Pointer to the list. |
| [in] | pos | Position where to insert the element. |
| [in] | el | Pointer to the element being added. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
- Note
- After add the element to the list, the element belongs to the list and it will be freed if the list is freed.
◆ sort
Sorts the list using the comparison function cmp. *
- Parameters
-
| [in] | list | Pointer to the list. * |
| [in] | cmp | The comparison function. |
The documentation for this struct was generated from the following file:
- /Users/henri/dev/libksi/src/ksi/types.h