-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathList.h
More file actions
57 lines (42 loc) · 946 Bytes
/
List.h
File metadata and controls
57 lines (42 loc) · 946 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
55
56
/*
* File: List.h
* Author: Tamaran
*
* Created on 14. Januar 2013, 18:55
*/
#ifndef LIST_H
#define LIST_H
#ifdef __cplusplus
extern "C" {
#endif
#include "std.h"
struct __Node
{
struct __Node* next;
void* element;
};
typedef struct __Node Node;
typedef struct
{
Node* first;
} List;
typedef struct
{
Node* akt;
} ListIterator;
List* List_create();
void List_delete(List* l);
uint List_count(List* l);
int List_isEmpty(List* l);
void List_add(List* list, void* e);
void* List_get(List* list, uint i);
void* List_remove(List* list);
ListIterator* List_getIterator(List* l);
Node* Node_create(void* ptr);
void Node_delete(Node* n);
void* ListIterator_next(ListIterator* l);
void ListIterator_delete(ListIterator* l);
#ifdef __cplusplus
}
#endif
#endif /* LIST_H */