root / proj / libs / classes / include / list.h @ 312
History | View | Annotate | Download (992 Bytes)
1 | 226 | up20180642 | #ifndef LIST_H_INCLUDED
|
---|---|---|---|
2 | #define LIST_H_INCLUDED
|
||
3 | |||
4 | struct list_node;
|
||
5 | typedef struct list_node list_node_t; |
||
6 | |||
7 | list_node_t* (list_node_ctor)(list_node_t *p, list_node_t *n, void *val);
|
||
8 | void (list_node_dtor)(list_node_t *p);
|
||
9 | list_node_t* (list_node_next)(const list_node_t *p);
|
||
10 | list_node_t* (list_node_prev)(const list_node_t *p);
|
||
11 | void** (list_node_val )(list_node_t *p);
|
||
12 | |||
13 | struct list;
|
||
14 | typedef struct list list_t; |
||
15 | |||
16 | list_t* (list_ctor)(void);
|
||
17 | int (list_dtor)(list_t *l);
|
||
18 | list_node_t* (list_begin )(list_t *l); |
||
19 | list_node_t* (list_end )(list_t *l); |
||
20 | size_t (list_size )(const list_t *l);
|
||
21 | 275 | up20180642 | int (list_empty )(const list_t *l); |
22 | 226 | up20180642 | list_node_t* (list_insert)(list_t *l, list_node_t *position, void *val);
|
23 | void* (list_erase )(list_t *l, list_node_t *position);
|
||
24 | 275 | up20180642 | void (list_push_back)(list_t *l, void *val); |
25 | void** (list_front)(list_t *l);
|
||
26 | void (list_pop_front)(list_t *l);
|
||
27 | 301 | up20180642 | list_node_t* (list_find)(list_t *l, void *val);
|
28 | 226 | up20180642 | |
29 | #endif //LIST_H_INCLUDED |