-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiterator.h
More file actions
54 lines (27 loc) · 731 Bytes
/
iterator.h
File metadata and controls
54 lines (27 loc) · 731 Bytes
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
49
50
51
52
53
54
#ifudef ITERATOR_H
#define ITERATOR_H
#ifdef __cplusplus
extern "C" {
#endif
struct _iterator;
typedef struct _iterator iterator;
typedef BOOL (iterator_prev)(iterator* iter);
typedef BOOL (iterator_next)(iterator* iter);
typedef BOOL (iterator_advance)(iterator* iter, int offset);
typedef BOOL (iterator_is_valid)(iterator* iter);
typedef void* (iterator_get_data)(iterator* iter);
typedef void (iterator_destroy)(iterator* iter);
struct _iterator
{
iterator_prev prev;
iterator_next next;
iterator_advance advance;
iterator_get_data get_data;
iterator_is_valid is_valid;
iterator_destroy destroy;
char priv[1];
};
#ifdef __cplusplus
}
#endif
#endif