Go to the documentation of this file.
84 #ifndef _NO_OS_LIST_H_
85 #define _NO_OS_LIST_H_
116 struct no_os_iterator;
130 typedef int32_t (*
f_cmp)(
void *data1,
void *data2);
321 #endif // _NO_OS_LIST_H_
int32_t no_os_list_read_last(struct no_os_list_desc *list_desc, void **data)
Structure storing the list and function wrapper for usual list types.
Definition: no_os_list.h:228
int32_t no_os_list_get_last(struct no_os_list_desc *list_desc, void **data)
int32_t no_os_list_read_find(struct no_os_list_desc *list_desc, void **data, void *cmp_data)
int32_t(* f_read)(struct no_os_list_desc *list_desc, void **data)
Read an element from the list.
Definition: no_os_list.h:174
int32_t no_os_iterator_get(struct no_os_iterator *iter, void **data)
int32_t no_os_list_get_size(struct no_os_list_desc *list_desc, uint32_t *out_size)
int32_t(* f_edit)(struct no_os_list_desc *list_desc, void *new_data)
Edit an element in the list. The content is replaced by new_data.
Definition: no_os_list.h:161
@ NO_OS_LIST_DEFAULT
Definition: no_os_list.h:195
int32_t no_os_list_get_find(struct no_os_list_desc *list_desc, void **data, void *cmp_data)
int32_t no_os_list_add_find(struct no_os_list_desc *list_desc, void *data)
int32_t no_os_list_get_first(struct no_os_list_desc *list_desc, void **data)
int32_t no_os_iterator_insert(struct no_os_iterator *iter, void *data, bool after)
f_add push
Definition: no_os_list.h:230
int32_t no_os_list_add_idx(struct no_os_list_desc *list_desc, void *data, uint32_t idx)
int32_t no_os_list_get_idx(struct no_os_list_desc *list_desc, void **data, uint32_t idx)
int32_t no_os_list_read_idx(struct no_os_list_desc *list_desc, void **data, uint32_t idx)
@ NO_OS_LIST_PRIORITY_LIST
Definition: no_os_list.h:225
f_read back
Definition: no_os_list.h:236
@ NO_OS_LIST_STACK
Definition: no_os_list.h:215
int32_t(* f_cmp)(void *data1, void *data2)
Prototype of the compare function.
Definition: no_os_list.h:130
int32_t no_os_iterator_move(struct no_os_iterator *iter, int32_t steps)
void * priv_desc
Definition: no_os_list.h:240
int32_t no_os_list_add_first(struct no_os_list_desc *list_desc, void *data)
int32_t no_os_list_edit_find(struct no_os_list_desc *list_desc, void *new_data, void *cmp_data)
int32_t no_os_list_remove(struct no_os_list_desc *list_desc)
int32_t no_os_list_read_first(struct no_os_list_desc *list_desc, void **data)
no_os_adapter_type
Selects functionalities for functions in no_os_list_desc.
Definition: no_os_list.h:193
f_get pop
Definition: no_os_list.h:232
f_read top_next
Definition: no_os_list.h:234
int32_t no_os_iterator_remove(struct no_os_iterator *iter)
int32_t no_os_iterator_move_to_idx(struct no_os_iterator *iter, int32_t idx)
f_edit swap
Definition: no_os_list.h:238
int32_t no_os_iterator_read(struct no_os_iterator *iter, void **data)
int32_t no_os_iterator_edit(struct no_os_iterator *iter, void *new_data)
int32_t no_os_list_edit_first(struct no_os_list_desc *list_desc, void *new_data)
int32_t no_os_list_edit_last(struct no_os_list_desc *list_desc, void *new_data)
int32_t no_os_list_edit_idx(struct no_os_list_desc *list_desc, void *new_data, uint32_t idx)
int32_t(* f_add)(struct no_os_list_desc *list_desc, void *data)
Add an element in the list.
Definition: no_os_list.h:151
@ NO_OS_LIST_QUEUE
Definition: no_os_list.h:205
int32_t no_os_list_add_last(struct no_os_list_desc *list_desc, void *data)
int32_t no_os_list_init(struct no_os_list_desc **list_desc, enum no_os_adapter_type type, f_cmp comparator)
int32_t no_os_iterator_init(struct no_os_iterator **iter, struct no_os_list_desc *list_desc, bool start)
int32_t no_os_iterator_find(struct no_os_iterator *iter, void *cmp_data)
int32_t(* f_get)(struct no_os_list_desc *list_desc, void **data)
Read and remove an element from the list.
Definition: no_os_list.h:185