summaryrefslogtreecommitdiffstats
path: root/libcnary/include/node_iterator.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcnary/include/node_iterator.h')
-rw-r--r--libcnary/include/node_iterator.h55
1 files changed, 0 insertions, 55 deletions
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_ */