#include <learning/List.h>
#include <learning/learn_debug.h>
Go to the source code of this file.
|
| LIST * | List (void) |
| | Create a new list.
|
| LISTITEM * | ListAppend (LIST *list, void *p) |
| | Append an item to the list.
|
| LISTITEM * | ListAppend (LIST *list, void *p, void(*free_obj)(void *obj)) |
| | Append an item to the list with free hook.
|
| LISTITEM * | NextListItem (LIST *list) |
| | Advance one item.
|
| LISTITEM * | FirstListItem (LIST *list) |
| | Move to the first list item.
|
| LISTITEM * | LastListItem (LIST *list) |
| | Move to the last list item.
|
| 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)
|
| int | ClearList (LIST *list) |
| | Clear the list.
|
| LISTITEM * | FindItem (LIST *list, void *ptr) |
| | Finds the LISTITEM pointer corresponding to the data.
|
| LISTITEM * | ListLinearSearchRetrieve (struct List *list, void *ptr) |
| int | ListSize (LIST *list) |
| | Get the size of the list.
|
| LISTITEM * | GetItem (LIST *list, int n) |
| | Get the nth item of the list.
|
◆ ClearList()
| int ClearList |
( |
LIST * | list | ) |
|
Clear the list.
Definition at line 291 of file List.cpp.
◆ FindItem()
◆ 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()
| LISTITEM * LinkNext |
( |
LISTITEM * | src, |
|
|
void * | ptr, |
|
|
void(* | free_obj )(void *obj) ) |
◆ LinkPrev()
| LISTITEM * LinkPrev |
( |
LISTITEM * | src, |
|
|
void * | ptr, |
|
|
void(* | free_obj )(void *obj) ) |
◆ 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(* | free_obj )(void *obj) ) |
Append an item to the list with free hook.
Definition at line 38 of file List.cpp.
◆ ListItem()
| LISTITEM * ListItem |
( |
void * | ptr, |
|
|
void(* | free_obj )(void *obj) ) |
◆ 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()