summaryrefslogtreecommitdiffstats
path: root/libcnary/include/node_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcnary/include/node_list.h')
-rw-r--r--libcnary/include/node_list.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/libcnary/include/node_list.h b/libcnary/include/node_list.h
index 380916e..d566b00 100644
--- a/libcnary/include/node_list.h
+++ b/libcnary/include/node_list.h
@@ -24,24 +24,27 @@
24#ifndef NODE_LIST_H_ 24#ifndef NODE_LIST_H_
25#define NODE_LIST_H_ 25#define NODE_LIST_H_
26 26
27struct node_t; 27#include "node.h"
28
29typedef struct node* node_t;
28 30
29// This class implements the list_t abstract class 31// This class implements the list_t abstract class
30typedef struct node_list_t { 32struct node_list {
31 // list_t members 33 // list_t members
32 struct node_t* begin; 34 node_t begin;
33 struct node_t* end; 35 node_t end;
34 36
35 // node_list_t members 37 // node_list_t members
36 unsigned int count; 38 unsigned int count;
37 39
38} node_list_t; 40};
41typedef struct node_list* node_list_t;
39 42
40void node_list_destroy(struct node_list_t* list); 43void node_list_destroy(node_list_t list);
41struct node_list_t* node_list_create(); 44node_list_t node_list_create();
42 45
43int node_list_add(node_list_t* list, node_t* node); 46int node_list_add(node_list_t list, node_t node);
44int node_list_insert(node_list_t* list, unsigned int index, node_t* node); 47int node_list_insert(node_list_t list, unsigned int index, node_t node);
45int node_list_remove(node_list_t* list, node_t* node); 48int node_list_remove(node_list_t list, node_t node);
46 49
47#endif /* NODE_LIST_H_ */ 50#endif /* NODE_LIST_H_ */