#include <types.h>
|
int(* | append )(KSI_AggregationRespList *, KSI_AggregationResp *) |
|
int(* | removeElement )(KSI_AggregationRespList *, size_t, KSI_AggregationResp **) |
|
int(* | indexOf )(KSI_AggregationRespList *, KSI_AggregationResp *, size_t **) |
|
int(* | insertAt )(KSI_AggregationRespList *, size_t, KSI_AggregationResp *) |
|
int(* | replaceAt )(KSI_AggregationRespList *, size_t, KSI_AggregationResp *) |
|
int(* | elementAt )(KSI_AggregationRespList *, size_t pos, KSI_AggregationResp **) |
|
size_t(* | length )(KSI_AggregationRespList *list) |
|
void(* | obj_free )(KSI_AggregationResp *) |
|
int(* | sort )(KSI_AggregationRespList *list, int(*cmp)(const KSI_AggregationResp **, const KSI_AggregationResp **)) |
|
int(* | foldl )(KSI_AggregationRespList *list, void *foldCtx, int(*fn)(KSI_AggregationResp *el, void *foldCtx)) |
|
void * | pImpl |
|
int(* | find )(KSI_AggregationRespList *list, KSI_AggregationResp *el, int *found, size_t *pos) |
|
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.
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.
- Find the index of the given element. If the element is found, the
found
output variable * will be evaluated to 1 and the index of the element is stored in pos
. If the element is * not present, the parameter found
is evaluated to 0 and the output variable pos
remains * unchanged. If the process fails with an error neither pos
nor found
will be changed. * - Parameters
-
[in] | list | Pointer to the list. * |
[in] | el | Pointer to the element. * |
[out] | found | Output pointer for a boolean value whether the object was found or not. * |
[out] | pos | Output pointer for the index value if the element was found. |
- 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. |
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).
- Note
- For fewer allocations use the *List_find function instead.
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.
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
.
void* KSI_AggregationResp_list_st::pImpl |
Internal implementation of the list.
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.
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.
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:
- /tmp/B.KSkRg3/BUILD/libksi-3.20.3025/src/ksi/types.h