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

/* valabooleantype.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-object.h>
#include <glib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

static gpointer vala_boolean_type_parent_class = NULL;

static ValaDataType* vala_boolean_type_real_copy (ValaDataType* base);
static GType vala_boolean_type_get_type_once (void);

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

ValaBooleanType*
vala_boolean_type_new (ValaStruct* type_symbol,
                       ValaSourceReference* source_reference)
{
	return vala_boolean_type_construct (VALA_TYPE_BOOLEAN_TYPE, type_symbol, source_reference);
}

static ValaDataType*
vala_boolean_type_real_copy (ValaDataType* base)
{
	ValaBooleanType * self;
	ValaBooleanType* _result_ = NULL;
	ValaTypeSymbol* _tmp0_;
	ValaTypeSymbol* _tmp1_;
	ValaSourceReference* _tmp2_;
	ValaSourceReference* _tmp3_;
	ValaBooleanType* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaDataType* result;
	self = (ValaBooleanType*) 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_boolean_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_boolean_type_class_init (ValaBooleanTypeClass * klass,
                              gpointer klass_data)
{
	vala_boolean_type_parent_class = g_type_class_peek_parent (klass);
	((ValaDataTypeClass *) klass)->copy = (ValaDataType* (*) (ValaDataType*)) vala_boolean_type_real_copy;
}

static void
vala_boolean_type_instance_init (ValaBooleanType * self,
                                 gpointer klass)
{
}

/**
 * A boolean type.
 */
static GType
vala_boolean_type_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ValaBooleanTypeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_boolean_type_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaBooleanType), 0, (GInstanceInitFunc) vala_boolean_type_instance_init, NULL };
	GType vala_boolean_type_type_id;
	vala_boolean_type_type_id = g_type_register_static (VALA_TYPE_VALUE_TYPE, "ValaBooleanType", &g_define_type_info, 0);
	return vala_boolean_type_type_id;
}

GType
vala_boolean_type_get_type (void)
{
	static volatile gsize vala_boolean_type_type_id__once = 0;
	if (g_once_init_enter (&vala_boolean_type_type_id__once)) {
		GType vala_boolean_type_type_id;
		vala_boolean_type_type_id = vala_boolean_type_get_type_once ();
		g_once_init_leave (&vala_boolean_type_type_id__once, vala_boolean_type_type_id);
	}
	return vala_boolean_type_type_id__once;
}

