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

/* valavartype.vala
 *
 * Copyright (C) 2019  Rico Tzschichholz
 *
 * 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:
 * 	Rico Tzschichholz <ricotz@ubuntu.com>
 */

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

static gpointer vala_var_type_parent_class = NULL;

static gchar* vala_var_type_real_to_qualified_string (ValaDataType* base,
                                               ValaScope* scope);
static ValaDataType* vala_var_type_real_copy (ValaDataType* base);
static GType vala_var_type_get_type_once (void);

ValaVarType*
vala_var_type_construct (GType object_type,
                         gboolean value_owned)
{
	ValaVarType* self = NULL;
	self = (ValaVarType*) vala_data_type_construct (object_type);
	vala_data_type_set_value_owned ((ValaDataType*) self, value_owned);
	return self;
}

ValaVarType*
vala_var_type_new (gboolean value_owned)
{
	return vala_var_type_construct (VALA_TYPE_VAR_TYPE, value_owned);
}

static gchar*
vala_var_type_real_to_qualified_string (ValaDataType* base,
                                        ValaScope* scope)
{
	ValaVarType * self;
	gchar* _tmp0_;
	gchar* result;
	self = (ValaVarType*) base;
	_tmp0_ = g_strdup ("var");
	result = _tmp0_;
	return result;
}

static ValaDataType*
vala_var_type_real_copy (ValaDataType* base)
{
	ValaVarType * self;
	ValaVarType* _result_ = NULL;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ValaVarType* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	ValaDataType* result;
	self = (ValaVarType*) base;
	_tmp0_ = vala_data_type_get_value_owned ((ValaDataType*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_var_type_new (_tmp1_);
	_result_ = _tmp2_;
	_tmp3_ = vala_data_type_get_nullable ((ValaDataType*) self);
	_tmp4_ = _tmp3_;
	vala_data_type_set_nullable ((ValaDataType*) _result_, _tmp4_);
	_tmp5_ = vala_data_type_get_is_dynamic ((ValaDataType*) self);
	_tmp6_ = _tmp5_;
	vala_data_type_set_is_dynamic ((ValaDataType*) _result_, _tmp6_);
	result = (ValaDataType*) _result_;
	return result;
}

static void
vala_var_type_class_init (ValaVarTypeClass * klass,
                          gpointer klass_data)
{
	vala_var_type_parent_class = g_type_class_peek_parent (klass);
	((ValaDataTypeClass *) klass)->to_qualified_string = (gchar* (*) (ValaDataType*, ValaScope*)) vala_var_type_real_to_qualified_string;
	((ValaDataTypeClass *) klass)->copy = (ValaDataType* (*) (ValaDataType*)) vala_var_type_real_copy;
}

static void
vala_var_type_instance_init (ValaVarType * self,
                             gpointer klass)
{
}

/**
 * A to be inferred data type.
 */
static GType
vala_var_type_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ValaVarTypeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_var_type_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaVarType), 0, (GInstanceInitFunc) vala_var_type_instance_init, NULL };
	GType vala_var_type_type_id;
	vala_var_type_type_id = g_type_register_static (VALA_TYPE_DATA_TYPE, "ValaVarType", &g_define_type_info, 0);
	return vala_var_type_type_id;
}

GType
vala_var_type_get_type (void)
{
	static volatile gsize vala_var_type_type_id__once = 0;
	if (g_once_init_enter (&vala_var_type_type_id__once)) {
		GType vala_var_type_type_id;
		vala_var_type_type_id = vala_var_type_get_type_once ();
		g_once_init_leave (&vala_var_type_type_id__once, vala_var_type_type_id);
	}
	return vala_var_type_type_id__once;
}

