gplate/gplate-iterator.h
author Gary Kramlich <grim@reaperworld.com>
Sat Jul 03 23:24:33 2010 -0500 (22 months ago)
changeset 394 ad26d98e20e6
parent 291 310b912b92c7
permissions -rw-r--r--
Changed the license from gplv2 to gplv3
Updated copyrights to be 2007-2010 rather than 2007-2008 (since just about everything has been touched recently
Ignored the top level tests/ directory for now since that is slowly being replaced
grim@241
     1
/*
grim@394
     2
 * Copyright (C) 2007-2010 Gary Kramlich <grim@reaperworld.com>
grim@241
     3
 *
grim@394
     4
 * This program is free software: you can redistribute it and/or modify
grim@394
     5
 * it under the terms of the GNU General Public License as published by
grim@394
     6
 * the Free Software Foundation, either version 3 of the License, or
grim@394
     7
 * (at your option) any later version.
grim@241
     8
 *
grim@394
     9
 * This program is distributed in the hope that it will be useful,
grim@394
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
grim@394
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
grim@394
    12
 * GNU General Public License for more details.
grim@394
    13
 *
grim@394
    14
 * You should have received a copy of the GNU General Public License
grim@394
    15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
grim@241
    16
 */
grim@241
    17
#ifndef GPLATE_ITERATOR_H
grim@241
    18
#define GPLATE_ITERATOR_H
grim@241
    19
grim@241
    20
#include <glib.h>
grim@241
    21
#include <glib-object.h>
grim@241
    22
grim@241
    23
#define GPLATE_TYPE_ITERATOR			(gplate_iterator_get_gtype())
grim@241
    24
#define GPLATE_ITERATOR(obj)			(G_TYPE_CHECK_INSTANCE_CAST((obj), GPLATE_TYPE_ITERATOR, GPlateIterator))
grim@241
    25
#define GPLATE_IS_ITERATOR(obj)			(G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLATE_TYPE_ITERATOR))
grim@241
    26
#define GPLATE_ITERATOR_GET_IFACE(obj)	(G_TYPE_INSTANCE_GET_INTERFACE((obj), GPLATE_TYPE_ITERATOR, GPlateIteratorIface))
grim@241
    27
grim@241
    28
typedef struct _GPlateIterator			GPlateIterator;
grim@241
    29
typedef struct _GPlateIteratorIface		GPlateIteratorIface;
grim@241
    30
grim@291
    31
#include <gplate/gplate-variable.h>
grim@291
    32
grim@241
    33
struct _GPlateIteratorIface {
grim@241
    34
	GTypeInterface gparent;
grim@241
    35
grim@241
    36
	gboolean (*has_next)(const GPlateIterator *iter);
grim@291
    37
	GPlateVariable *(*next)(GPlateIterator *iter);
grim@241
    38
grim@241
    39
	void (*_gplate_reserved1)(void);
grim@241
    40
	void (*_gplate_reserved2)(void);
grim@241
    41
	void (*_gplate_reserved3)(void);
grim@241
    42
	void (*_gplate_reserved4)(void);
grim@241
    43
};
grim@241
    44
grim@241
    45
G_BEGIN_DECLS
grim@241
    46
grim@241
    47
GType gplate_iterator_get_gtype(void);
grim@241
    48
grim@241
    49
gboolean gplate_iterator_has_next(const GPlateIterator *iter);
grim@291
    50
GPlateVariable *gplate_iterator_next(GPlateIterator *iter);
grim@241
    51
grim@241
    52
G_END_DECLS
grim@241
    53
grim@241
    54
#endif /* GPLATE_ITERATOR_H */