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

/* Copyright © 2012-2013 Tobias Quathamer
 *
 * This file is part of libisocodes.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>


#define LIBISOCODES_TYPE_ISO_639_5_ITEM (libisocodes_iso_639_5_item_get_type ())
#define LIBISOCODES_ISO_639_5_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBISOCODES_TYPE_ISO_639_5_ITEM, libisocodesISO_639_5_Item))
#define LIBISOCODES_ISO_639_5_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBISOCODES_TYPE_ISO_639_5_ITEM, libisocodesISO_639_5_ItemClass))
#define LIBISOCODES_IS_ISO_639_5_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBISOCODES_TYPE_ISO_639_5_ITEM))
#define LIBISOCODES_IS_ISO_639_5_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBISOCODES_TYPE_ISO_639_5_ITEM))
#define LIBISOCODES_ISO_639_5_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBISOCODES_TYPE_ISO_639_5_ITEM, libisocodesISO_639_5_ItemClass))

typedef struct _libisocodesISO_639_5_Item libisocodesISO_639_5_Item;
typedef struct _libisocodesISO_639_5_ItemClass libisocodesISO_639_5_ItemClass;
typedef struct _libisocodesISO_639_5_ItemPrivate libisocodesISO_639_5_ItemPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _libisocodesISO_639_5_Item {
	GObject parent_instance;
	libisocodesISO_639_5_ItemPrivate * priv;
	gchar* id;
	gchar* parents;
	gchar* name;
};

struct _libisocodesISO_639_5_ItemClass {
	GObjectClass parent_class;
};


static gpointer libisocodes_iso_639_5_item_parent_class = NULL;

GType libisocodes_iso_639_5_item_get_type (void) G_GNUC_CONST;
enum  {
	LIBISOCODES_ISO_639_5_ITEM_DUMMY_PROPERTY
};
libisocodesISO_639_5_Item* libisocodes_iso_639_5_item_new (GeeHashMap* item);
libisocodesISO_639_5_Item* libisocodes_iso_639_5_item_construct (GType object_type, GeeHashMap* item);
static void libisocodes_iso_639_5_item_finalize (GObject* obj);


libisocodesISO_639_5_Item* libisocodes_iso_639_5_item_construct (GType object_type, GeeHashMap* item) {
	libisocodesISO_639_5_Item * self = NULL;
	GeeHashMap* _tmp0_ = NULL;
	gpointer _tmp1_ = NULL;
	GeeHashMap* _tmp2_ = NULL;
	gpointer _tmp3_ = NULL;
	GeeHashMap* _tmp4_ = NULL;
	gpointer _tmp5_ = NULL;
	g_return_val_if_fail (item != NULL, NULL);
	self = (libisocodesISO_639_5_Item*) g_object_new (object_type, NULL);
	_tmp0_ = item;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, "id");
	_g_free0 (self->id);
	self->id = (gchar*) _tmp1_;
	_tmp2_ = item;
	_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp2_, "parents");
	_g_free0 (self->parents);
	self->parents = (gchar*) _tmp3_;
	_tmp4_ = item;
	_tmp5_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, "name");
	_g_free0 (self->name);
	self->name = (gchar*) _tmp5_;
	return self;
}


libisocodesISO_639_5_Item* libisocodes_iso_639_5_item_new (GeeHashMap* item) {
	return libisocodes_iso_639_5_item_construct (LIBISOCODES_TYPE_ISO_639_5_ITEM, item);
}


static void libisocodes_iso_639_5_item_class_init (libisocodesISO_639_5_ItemClass * klass) {
	libisocodes_iso_639_5_item_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = libisocodes_iso_639_5_item_finalize;
}


static void libisocodes_iso_639_5_item_instance_init (libisocodesISO_639_5_Item * self) {
}


static void libisocodes_iso_639_5_item_finalize (GObject* obj) {
	libisocodesISO_639_5_Item * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIBISOCODES_TYPE_ISO_639_5_ITEM, libisocodesISO_639_5_Item);
	_g_free0 (self->id);
	_g_free0 (self->parents);
	_g_free0 (self->name);
	G_OBJECT_CLASS (libisocodes_iso_639_5_item_parent_class)->finalize (obj);
}


GType libisocodes_iso_639_5_item_get_type (void) {
	static volatile gsize libisocodes_iso_639_5_item_type_id__volatile = 0;
	if (g_once_init_enter (&libisocodes_iso_639_5_item_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (libisocodesISO_639_5_ItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) libisocodes_iso_639_5_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (libisocodesISO_639_5_Item), 0, (GInstanceInitFunc) libisocodes_iso_639_5_item_instance_init, NULL };
		GType libisocodes_iso_639_5_item_type_id;
		libisocodes_iso_639_5_item_type_id = g_type_register_static (G_TYPE_OBJECT, "libisocodesISO_639_5_Item", &g_define_type_info, 0);
		g_once_init_leave (&libisocodes_iso_639_5_item_type_id__volatile, libisocodes_iso_639_5_item_type_id);
	}
	return libisocodes_iso_639_5_item_type_id__volatile;
}



