summaryrefslogtreecommitdiffstats
path: root/libcnary/include
diff options
context:
space:
mode:
Diffstat (limited to 'libcnary/include')
-rw-r--r--libcnary/include/iterator.h49
-rw-r--r--libcnary/include/node_iterator.h55
2 files changed, 0 insertions, 104 deletions
diff --git a/libcnary/include/iterator.h b/libcnary/include/iterator.h
deleted file mode 100644
index a33c4ff..0000000
--- a/libcnary/include/iterator.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * iterator.h
3 *
4 * Created on: Mar 8, 2011
5 * Author: posixninja
6 *
7 * Copyright (c) 2011 Joshua Hill. All Rights Reserved.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef ITERATOR_H_
25#define ITERATOR_H_
26
27struct list_t;
28struct object_t;
29
30typedef struct iterator_t {
31 struct object_t*(*next)(struct iterator_t* iterator);
32 int(*bind)(struct iterator_t* iterator, struct list_t* list);
33
34 unsigned int count;
35 unsigned int position;
36
37 struct list_t* list;
38 struct object_t* end;
39 struct object_t* begin;
40 struct object_t* value;
41} iterator_t;
42
43void iterator_destroy(struct iterator_t* iterator);
44struct iterator_t* iterator_create(struct list_t* list);
45
46struct object_t* iterator_next(struct iterator_t* iterator);
47int iterator_bind(struct iterator_t* iterator, struct list_t* list);
48
49#endif /* ITERATOR_H_ */
diff --git a/libcnary/include/node_iterator.h b/libcnary/include/node_iterator.h
deleted file mode 100644
index d3bce3a..0000000
--- a/libcnary/include/node_iterator.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * node_iterator.h
3 *
4 * Created on: Mar 8, 2011
5 * Author: posixninja
6 *
7 * Copyright (c) 2011 Joshua Hill. All Rights Reserved.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef NODE_ITERATOR_H_
25#define NODE_ITERATOR_H_
26
27#include "iterator.h"
28#include "node_list.h"
29
30// This class implements the abstract iterator class
31typedef struct node_iterator_t {
32 // Super class
33 struct iterator_t super;
34
35 // Local members
36 struct node_t*(*next)(struct node_iterator_t* iterator);
37 int(*bind)(struct node_iterator_t* iterator, struct node_list_t* list);
38
39 unsigned int count;
40 unsigned int position;
41
42 struct node_list_t* list;
43 struct node_t* end;
44 struct node_t* begin;
45 struct node_t* value;
46
47} node_iterator_t;
48
49void node_iterator_destroy(node_iterator_t* iterator);
50node_iterator_t* node_iterator_create(node_list_t* list);
51
52struct node_t* node_iterator_next(struct node_iterator_t* iterator);
53int node_iterator_bind(struct node_iterator_t* iterator, struct node_list_t* list);
54
55#endif /* NODE_ITERATOR_H_ */