blob: 8290df382a691f0d3721c9bf4a50556e2eed5b3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#ifndef CR_LIST_H
#define CR_LIST_H
#include <iprt/cdefs.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct CRList CRList;
typedef struct CRListIterator CRListIterator;
typedef int ( *CRListCompareFunc ) ( const void *element1, const void *element2 );
typedef void ( *CRListApplyFunc ) ( void *element, void *arg );
DECLEXPORT(CRList *) crAllocList( void );
DECLEXPORT(void) crFreeList( CRList *l );
DECLEXPORT(unsigned) crListSize( const CRList *l );
DECLEXPORT(int) crListIsEmpty( const CRList *l );
DECLEXPORT(void) crListInsert( CRList *l, CRListIterator *iter, void *elem );
DECLEXPORT(void) crListErase( CRList *l, CRListIterator *iter );
DECLEXPORT(void) crListClear( CRList *l );
DECLEXPORT(void) crListPushBack( CRList *l, void *elem );
DECLEXPORT(void) crListPushFront( CRList *l, void *elem );
DECLEXPORT(void) crListPopBack( CRList *l );
DECLEXPORT(void) crListPopFront( CRList *l );
DECLEXPORT(void *) crListFront( CRList *l );
DECLEXPORT(void *) crListBack( CRList *l );
DECLEXPORT(CRListIterator *) crListBegin( CRList *l );
DECLEXPORT(CRListIterator *) crListEnd( CRList *l );
DECLEXPORT(CRListIterator *) crListNext( CRListIterator *iter );
DECLEXPORT(CRListIterator *) crListPrev( CRListIterator *iter );
DECLEXPORT(void *) crListElement( CRListIterator *iter );
DECLEXPORT(CRListIterator *) crListFind( CRList *l, void *element, CRListCompareFunc compare );
DECLEXPORT(void) crListApply( CRList *l, CRListApplyFunc apply, void *arg );
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* CR_LIST_H */
|