2 * Copyright (C) 2007-2010 Gary Kramlich <grim@reaperworld.com>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef GPLATE_ITERATOR_H
18 #define GPLATE_ITERATOR_H
21 #include <glib-object.h>
23 #define GPLATE_TYPE_ITERATOR (gplate_iterator_get_gtype())
24 #define GPLATE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLATE_TYPE_ITERATOR, GPlateIterator))
25 #define GPLATE_IS_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLATE_TYPE_ITERATOR))
26 #define GPLATE_ITERATOR_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), GPLATE_TYPE_ITERATOR, GPlateIteratorIface))
28 typedef struct _GPlateIterator GPlateIterator;
29 typedef struct _GPlateIteratorIface GPlateIteratorIface;
31 #include <gplate/gplate-variable.h>
33 struct _GPlateIteratorIface {
34 GTypeInterface gparent;
36 gboolean (*has_next)(const GPlateIterator *iter);
37 GPlateVariable *(*next)(GPlateIterator *iter);
39 void (*_gplate_reserved1)(void);
40 void (*_gplate_reserved2)(void);
41 void (*_gplate_reserved3)(void);
42 void (*_gplate_reserved4)(void);
47 GType gplate_iterator_get_gtype(void);
49 gboolean gplate_iterator_has_next(const GPlateIterator *iter);
50 GPlateVariable *gplate_iterator_next(GPlateIterator *iter);
54 #endif /* GPLATE_ITERATOR_H */