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

/* valavoidtype.vala
 *
 * Copyright (C) 2007-2008  Jürg Billeter
 *
 * 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:
 * 	Jürg Billeter <j@bitron.ch>
 */

#include <glib.h>
#include <glib-object.h>
#include "vala.h"
#include <stdlib.h>
#include <string.h>



static gpointer vala_void_type_parent_class = NULL;

static gboolean vala_void_type_real_stricter (ValaDataType* base, ValaDataType* type2);
static gchar* vala_void_type_real_to_qualified_string (ValaDataType* base, ValaScope* scope);
static ValaDataType* vala_void_type_real_copy (ValaDataType* base);


ValaVoidType* vala_void_type_construct (GType object_type, ValaSourceReference* source_reference) {
	ValaVoidType* self = NULL;
	ValaSourceReference* _tmp0_;
	self = (ValaVoidType*) vala_data_type_construct (object_type);
	_tmp0_ = source_reference;
	vala_code_node_set_source_reference ((ValaCodeNode*) self, _tmp0_);
	return self;
}


ValaVoidType* vala_void_type_new (ValaSourceReference* source_reference) {
	return vala_void_type_construct (VALA_TYPE_VOID_TYPE, source_reference);
}


static gboolean vala_void_type_real_stricter (ValaDataType* base, ValaDataType* type2) {
	ValaVoidType * self;
	gboolean result = FALSE;
	ValaDataType* _tmp0_;
	self = (ValaVoidType*) base;
	g_return_val_if_fail (type2 != NULL, FALSE);
	_tmp0_ = type2;
	result = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, VALA_TYPE_VOID_TYPE);
	return result;
}


static gchar* vala_void_type_real_to_qualified_string (ValaDataType* base, ValaScope* scope) {
	ValaVoidType * self;
	gchar* result = NULL;
	gchar* _tmp0_;
	self = (ValaVoidType*) base;
	_tmp0_ = g_strdup ("void");
	result = _tmp0_;
	return result;
}


static ValaDataType* vala_void_type_real_copy (ValaDataType* base) {
	ValaVoidType * self;
	ValaDataType* result = NULL;
	ValaSourceReference* _tmp0_;
	ValaSourceReference* _tmp1_;
	ValaVoidType* _tmp2_;
	self = (ValaVoidType*) base;
	_tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_void_type_new (_tmp1_);
	result = (ValaDataType*) _tmp2_;
	return result;
}


static void vala_void_type_class_init (ValaVoidTypeClass * klass) {
	vala_void_type_parent_class = g_type_class_peek_parent (klass);
	((ValaDataTypeClass *) klass)->stricter = (gboolean (*) (ValaDataType *, ValaDataType*)) vala_void_type_real_stricter;
	((ValaDataTypeClass *) klass)->to_qualified_string = (gchar* (*) (ValaDataType *, ValaScope*)) vala_void_type_real_to_qualified_string;
	((ValaDataTypeClass *) klass)->copy = (ValaDataType* (*) (ValaDataType *)) vala_void_type_real_copy;
}


static void vala_void_type_instance_init (ValaVoidType * self) {
}


/**
 * The void type.
 */
GType vala_void_type_get_type (void) {
	static volatile gsize vala_void_type_type_id__volatile = 0;
	if (g_once_init_enter (&vala_void_type_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaVoidTypeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_void_type_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaVoidType), 0, (GInstanceInitFunc) vala_void_type_instance_init, NULL };
		GType vala_void_type_type_id;
		vala_void_type_type_id = g_type_register_static (VALA_TYPE_DATA_TYPE, "ValaVoidType", &g_define_type_info, 0);
		g_once_init_leave (&vala_void_type_type_id__volatile, vala_void_type_type_id);
	}
	return vala_void_type_type_id__volatile;
}



