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

/* valafloatingtype.vala
 *
 * Copyright (C) 2009  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 "vala.h"
#include <glib.h>

static gpointer vala_floating_type_parent_class = NULL;

static ValaDataType* vala_floating_type_real_copy (ValaDataType* base);
static GType vala_floating_type_get_type_once (void);

ValaFloatingType*
vala_floating_type_construct (GType object_type,
                              ValaStruct* type_symbol,
                              ValaSourceReference* source_reference)
{
	ValaFloatingType* self = NULL;
	g_return_val_if_fail (type_symbol != NULL, NULL);
	self = (ValaFloatingType*) vala_value_type_construct (object_type, (ValaTypeSymbol*) type_symbol, source_reference);
	return self;
}

ValaFloatingType*
vala_floating_type_new (ValaStruct* type_symbol,
                        ValaSourceReference* source_reference)
{
	return vala_floating_type_construct (VALA_TYPE_FLOATING_TYPE, type_symbol, source_reference);
}

static ValaDataType*
vala_floating_type_real_copy (ValaDataType* base)
{
	ValaFloatingType * self;
	ValaFloatingType* _result_ = NULL;
	ValaTypeSymbol* _tmp0_;
	ValaTypeSymbol* _tmp1_;
	ValaSourceReference* _tmp2_;
	ValaSourceReference* _tmp3_;
	ValaFloatingType* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaDataType* result;
	self = (ValaFloatingType*) base;
	_tmp0_ = vala_data_type_get_type_symbol ((ValaDataType*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_floating_type_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALA_TYPE_STRUCT, ValaStruct), _tmp3_);
	_result_ = _tmp4_;
	_tmp5_ = vala_data_type_get_value_owned ((ValaDataType*) self);
	_tmp6_ = _tmp5_;
	vala_data_type_set_value_owned ((ValaDataType*) _result_, _tmp6_);
	_tmp7_ = vala_data_type_get_nullable ((ValaDataType*) self);
	_tmp8_ = _tmp7_;
	vala_data_type_set_nullable ((ValaDataType*) _result_, _tmp8_);
	result = (ValaDataType*) _result_;
	return result;
}

static void
vala_floating_type_class_init (ValaFloatingTypeClass * klass,
                               gpointer klass_data)
{
	vala_floating_type_parent_class = g_type_class_peek_parent (klass);
	((ValaDataTypeClass *) klass)->copy = (ValaDataType* (*) (ValaDataType*)) vala_floating_type_real_copy;
}

static void
vala_floating_type_instance_init (ValaFloatingType * self,
                                  gpointer klass)
{
}

/**
 * A floating-point type.
 */
static GType
vala_floating_type_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ValaFloatingTypeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_floating_type_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaFloatingType), 0, (GInstanceInitFunc) vala_floating_type_instance_init, NULL };
	GType vala_floating_type_type_id;
	vala_floating_type_type_id = g_type_register_static (VALA_TYPE_VALUE_TYPE, "ValaFloatingType", &g_define_type_info, 0);
	return vala_floating_type_type_id;
}

GType
vala_floating_type_get_type (void)
{
	static volatile gsize vala_floating_type_type_id__once = 0;
	if (g_once_init_enter (&vala_floating_type_type_id__once)) {
		GType vala_floating_type_type_id;
		vala_floating_type_type_id = vala_floating_type_get_type_once ();
		g_once_init_leave (&vala_floating_type_type_id__once, vala_floating_type_type_id);
	}
	return vala_floating_type_type_id__once;
}

