#include <learning/List.h>
#include <learning/learn_debug.h>
Go to the source code of this file.
|
| LIST * | List (void) |
| | Create a new list. More...
|
| |
| LISTITEM * | ListAppend (LIST *list, void *p) |
| | Append an item to the list. More...
|
| |
| LISTITEM * | ListAppend (LIST *list, void *p, void(*free_obj)(void *obj)) |
| | Append an item to the list with free hook. More...
|
| |
| LISTITEM * | NextListItem (LIST *list) |
| | Advance one item. More...
|
| |
| LISTITEM * | FirstListItem (LIST *list) |
| | Move to the first list item. More...
|
| |
| LISTITEM * | LastListItem (LIST *list) |
| | Move to the last list item. More...
|
| |
| LISTITEM * | GetNextItem (LISTITEM *ptr) |
| |
| LISTITEM * | GetPrevItem (LISTITEM *ptr) |
| |
| LISTITEM * | LinkNext (LISTITEM *src, void *ptr, void(*free_obj)(void *obj)) |
| |
| LISTITEM * | LinkPrev (LISTITEM *src, void *ptr, void(*free_obj)(void *obj)) |
| |
| LISTITEM * | ListItem (void *ptr, void(*free_obj)(void *obj)) |
| |
| int | FreeListItem (LIST *list, LISTITEM *ptr) |
| |
| int | RemoveListItem (LIST *list, LISTITEM *ptr) |
| |
| int | PopItem (LIST *list) |
| | Remove the topmost item of the list (also frees obj memory) More...
|
| |
| int | ClearList (LIST *list) |
| | Clear the list. More...
|
| |
| LISTITEM * | FindItem (LIST *list, void *ptr) |
| | Finds the LISTITEM pointer corresponding to the data. More...
|
| |
| LISTITEM * | ListLinearSearchRetrieve (struct List *list, void *ptr) |
| |
| int | ListSize (LIST *list) |
| | Get the size of the list. More...
|
| |
| LISTITEM * | GetItem (LIST *list, int n) |
| | Get the nth item of the list. More...
|
| |
◆ ClearList()
| int ClearList |
( |
LIST * |
list | ) |
|
Clear the list.
Definition at line 291 of file List.cpp.
◆ FindItem()
Finds the LISTITEM pointer corresponding to the data.
Definition at line 318 of file List.cpp.
◆ FirstListItem()
Move to the first list item.
Definition at line 81 of file List.cpp.
◆ FreeListItem()
◆ GetItem()
Get the nth item of the list.
Definition at line 345 of file List.cpp.
◆ GetNextItem()
◆ GetPrevItem()
◆ LastListItem()
Move to the last list item.
Definition at line 98 of file List.cpp.
◆ LinkNext()
◆ LinkPrev()
◆ List()
Create a new list.
Definition at line 16 of file List.cpp.
◆ ListAppend() [1/2]
Append an item to the list.
Definition at line 34 of file List.cpp.
◆ ListAppend() [2/2]
| LISTITEM* ListAppend |
( |
LIST * |
list, |
|
|
void * |
p, |
|
|
void(*)(void *obj) |
free_obj |
|
) |
| |
Append an item to the list with free hook.
Definition at line 38 of file List.cpp.
◆ ListItem()
◆ ListLinearSearchRetrieve()
| LISTITEM* ListLinearSearchRetrieve |
( |
struct List * |
list, |
|
|
void * |
ptr |
|
) |
| |
◆ ListSize()
| int ListSize |
( |
LIST * |
list | ) |
|
Get the size of the list.
Definition at line 341 of file List.cpp.
◆ NextListItem()
Advance one item.
Definition at line 67 of file List.cpp.
◆ PopItem()
| int PopItem |
( |
LIST * |
list | ) |
|
Remove the topmost item of the list (also frees obj memory)
Definition at line 252 of file List.cpp.
◆ RemoveListItem()