/* bidirlistiterator.c generated by valac 0.56.0, the Vala compiler
 * generated from bidirlistiterator.vala, do not modify */

/* bidirlistiterator.vala
 *
 * Copyright (C) 2011  Maciej Piechotka
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Maciej Piechotka <uzytkownik2@gmail.com>
 */

#include "gee.h"
#include <glib-object.h>
#include <glib.h>

static GType gee_bidir_list_iterator_get_type_once (void);

/**
 * Inserts the specified item before the current item in the iteration. The
 * iterator points to the same element as before.
 *
 * Please note that if iterator points in-between elements the element
 * is added between neighbouring elements and the iterator point between
 * added element and the next one.
 */
void
gee_bidir_list_iterator_insert (GeeBidirListIterator* self,
                                gconstpointer item)
{
	GeeBidirListIteratorIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GEE_BIDIR_LIST_ITERATOR_GET_INTERFACE (self);
	if (_iface_->insert) {
		_iface_->insert (self, item);
	}
}

static void
gee_bidir_list_iterator_default_init (GeeBidirListIteratorIface * iface,
                                      gpointer iface_data)
{
}

static GType
gee_bidir_list_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeBidirListIteratorIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_bidir_list_iterator_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gee_bidir_list_iterator_type_id;
	gee_bidir_list_iterator_type_id = g_type_register_static (G_TYPE_INTERFACE, "GeeBidirListIterator", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gee_bidir_list_iterator_type_id, GEE_TYPE_BIDIR_ITERATOR);
	g_type_interface_add_prerequisite (gee_bidir_list_iterator_type_id, GEE_TYPE_LIST_ITERATOR);
	return gee_bidir_list_iterator_type_id;
}

GType
gee_bidir_list_iterator_get_type (void)
{
	static volatile gsize gee_bidir_list_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_bidir_list_iterator_type_id__once)) {
		GType gee_bidir_list_iterator_type_id;
		gee_bidir_list_iterator_type_id = gee_bidir_list_iterator_get_type_once ();
		g_once_init_leave (&gee_bidir_list_iterator_type_id__once, gee_bidir_list_iterator_type_id);
	}
	return gee_bidir_list_iterator_type_id__once;
}

