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

/* valafieldprototype.vala
 *
 * Copyright (C) 2018  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_property_prototype_parent_class = NULL;

static ValaDataType* vala_property_prototype_real_copy (ValaDataType* base);
static gchar* vala_property_prototype_real_to_qualified_string (ValaDataType* base,
                                                         ValaScope* scope);
static GType vala_property_prototype_get_type_once (void);

ValaProperty*
vala_property_prototype_get_property_symbol (ValaPropertyPrototype* self)
{
	ValaProperty* result;
	ValaSymbol* _tmp0_;
	ValaSymbol* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = vala_data_type_get_symbol ((ValaDataType*) self);
	_tmp1_ = _tmp0_;
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALA_TYPE_PROPERTY, ValaProperty);
	return result;
}

ValaPropertyPrototype*
vala_property_prototype_construct (GType object_type,
                                   ValaProperty* property_symbol,
                                   ValaSourceReference* source_reference)
{
	ValaPropertyPrototype* self = NULL;
	g_return_val_if_fail (property_symbol != NULL, NULL);
	self = (ValaPropertyPrototype*) vala_data_type_construct_with_symbol (object_type, (ValaSymbol*) property_symbol, source_reference);
	return self;
}

ValaPropertyPrototype*
vala_property_prototype_new (ValaProperty* property_symbol,
                             ValaSourceReference* source_reference)
{
	return vala_property_prototype_construct (VALA_TYPE_PROPERTY_PROTOTYPE, property_symbol, source_reference);
}

static ValaDataType*
vala_property_prototype_real_copy (ValaDataType* base)
{
	ValaPropertyPrototype * self;
	ValaPropertyPrototype* _result_ = NULL;
	ValaProperty* _tmp0_;
	ValaProperty* _tmp1_;
	ValaSourceReference* _tmp2_;
	ValaSourceReference* _tmp3_;
	ValaPropertyPrototype* _tmp4_;
	ValaDataType* result;
	self = (ValaPropertyPrototype*) base;
	_tmp0_ = vala_property_prototype_get_property_symbol (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_property_prototype_new (_tmp1_, _tmp3_);
	_result_ = _tmp4_;
	result = (ValaDataType*) _result_;
	return result;
}

static gchar*
vala_property_prototype_real_to_qualified_string (ValaDataType* base,
                                                  ValaScope* scope)
{
	ValaPropertyPrototype * self;
	ValaProperty* _tmp0_;
	ValaProperty* _tmp1_;
	gchar* _tmp2_;
	gchar* result;
	self = (ValaPropertyPrototype*) base;
	_tmp0_ = vala_property_prototype_get_property_symbol (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp1_);
	result = _tmp2_;
	return result;
}

static void
vala_property_prototype_class_init (ValaPropertyPrototypeClass * klass,
                                    gpointer klass_data)
{
	vala_property_prototype_parent_class = g_type_class_peek_parent (klass);
	((ValaDataTypeClass *) klass)->copy = (ValaDataType* (*) (ValaDataType*)) vala_property_prototype_real_copy;
	((ValaDataTypeClass *) klass)->to_qualified_string = (gchar* (*) (ValaDataType*, ValaScope*)) vala_property_prototype_real_to_qualified_string;
}

static void
vala_property_prototype_instance_init (ValaPropertyPrototype * self,
                                       gpointer klass)
{
}

/**
 * A reference to an instance property without a specific instance.
 */
static GType
vala_property_prototype_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ValaPropertyPrototypeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_property_prototype_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaPropertyPrototype), 0, (GInstanceInitFunc) vala_property_prototype_instance_init, NULL };
	GType vala_property_prototype_type_id;
	vala_property_prototype_type_id = g_type_register_static (VALA_TYPE_DATA_TYPE, "ValaPropertyPrototype", &g_define_type_info, 0);
	return vala_property_prototype_type_id;
}

GType
vala_property_prototype_get_type (void)
{
	static volatile gsize vala_property_prototype_type_id__once = 0;
	if (g_once_init_enter (&vala_property_prototype_type_id__once)) {
		GType vala_property_prototype_type_id;
		vala_property_prototype_type_id = vala_property_prototype_get_type_once ();
		g_once_init_leave (&vala_property_prototype_type_id__once, vala_property_prototype_type_id);
	}
	return vala_property_prototype_type_id__once;
}

