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

/* valasignaltype.vala
 *
 * Copyright (C) 2007-2011  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 <valagee.h>
#include <stdlib.h>
#include <string.h>

#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _vala_code_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_context_unref (var), NULL)))

struct _ValaSignalTypePrivate {
	ValaSignal* _signal_symbol;
	ValaMethod* connect_method;
	ValaMethod* connect_after_method;
	ValaMethod* disconnect_method;
};


static gpointer vala_signal_type_parent_class = NULL;

#define VALA_SIGNAL_TYPE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_SIGNAL_TYPE, ValaSignalTypePrivate))
static gboolean vala_signal_type_real_is_invokable (ValaDataType* base);
static ValaDataType* vala_signal_type_real_get_return_type (ValaDataType* base);
static ValaList* vala_signal_type_real_get_parameters (ValaDataType* base);
static ValaDataType* vala_signal_type_real_copy (ValaDataType* base);
static gboolean vala_signal_type_real_compatible (ValaDataType* base, ValaDataType* target_type);
static gchar* vala_signal_type_real_to_qualified_string (ValaDataType* base, ValaScope* scope);
static ValaMethod* vala_signal_type_get_connect_method (ValaSignalType* self);
static ValaMethod* vala_signal_type_get_connect_after_method (ValaSignalType* self);
static ValaMethod* vala_signal_type_get_disconnect_method (ValaSignalType* self);
static ValaSymbol* vala_signal_type_real_get_member (ValaDataType* base, const gchar* member_name);
static gboolean vala_signal_type_real_is_accessible (ValaDataType* base, ValaSymbol* sym);
static void vala_signal_type_finalize (ValaCodeNode * obj);


ValaSignalType* vala_signal_type_construct (GType object_type, ValaSignal* signal_symbol) {
	ValaSignalType* self = NULL;
	ValaSignal* _tmp0_;
	g_return_val_if_fail (signal_symbol != NULL, NULL);
	self = (ValaSignalType*) vala_callable_type_construct (object_type);
	_tmp0_ = signal_symbol;
	vala_signal_type_set_signal_symbol (self, _tmp0_);
	return self;
}


ValaSignalType* vala_signal_type_new (ValaSignal* signal_symbol) {
	return vala_signal_type_construct (VALA_TYPE_SIGNAL_TYPE, signal_symbol);
}


static gboolean vala_signal_type_real_is_invokable (ValaDataType* base) {
	ValaSignalType * self;
	gboolean result = FALSE;
	self = (ValaSignalType*) base;
	result = TRUE;
	return result;
}


static gpointer _vala_code_node_ref0 (gpointer self) {
	return self ? vala_code_node_ref (self) : NULL;
}


static ValaDataType* vala_signal_type_real_get_return_type (ValaDataType* base) {
	ValaSignalType * self;
	ValaDataType* result = NULL;
	ValaSignal* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp3_;
	self = (ValaSignalType*) base;
	_tmp0_ = self->priv->_signal_symbol;
	_tmp1_ = vala_callable_get_return_type ((ValaCallable*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (_tmp2_);
	result = _tmp3_;
	return result;
}


static ValaList* vala_signal_type_real_get_parameters (ValaDataType* base) {
	ValaSignalType * self;
	ValaList* result = NULL;
	ValaSignal* _tmp0_;
	ValaList* _tmp1_;
	self = (ValaSignalType*) base;
	_tmp0_ = self->priv->_signal_symbol;
	_tmp1_ = vala_callable_get_parameters ((ValaCallable*) _tmp0_);
	result = _tmp1_;
	return result;
}


static ValaDataType* vala_signal_type_real_copy (ValaDataType* base) {
	ValaSignalType * self;
	ValaDataType* result = NULL;
	ValaSignal* _tmp0_;
	ValaSignalType* _tmp1_;
	self = (ValaSignalType*) base;
	_tmp0_ = self->priv->_signal_symbol;
	_tmp1_ = vala_signal_type_new (_tmp0_);
	result = (ValaDataType*) _tmp1_;
	return result;
}


static gboolean vala_signal_type_real_compatible (ValaDataType* base, ValaDataType* target_type) {
	ValaSignalType * self;
	gboolean result = FALSE;
	self = (ValaSignalType*) base;
	g_return_val_if_fail (target_type != NULL, FALSE);
	result = FALSE;
	return result;
}


static gchar* vala_signal_type_real_to_qualified_string (ValaDataType* base, ValaScope* scope) {
	ValaSignalType * self;
	gchar* result = NULL;
	ValaSignal* _tmp0_;
	gchar* _tmp1_;
	self = (ValaSignalType*) base;
	_tmp0_ = self->priv->_signal_symbol;
	_tmp1_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp0_);
	result = _tmp1_;
	return result;
}


ValaDelegateType* vala_signal_type_get_handler_type (ValaSignalType* self) {
	ValaDelegateType* result = NULL;
	ValaObjectTypeSymbol* type_sym = NULL;
	ValaSignal* _tmp0_;
	ValaSymbol* _tmp1_;
	ValaSymbol* _tmp2_;
	ValaObjectTypeSymbol* _tmp3_;
	ValaDataType* sender_type = NULL;
	ValaObjectTypeSymbol* _tmp4_;
	ValaDataType* _tmp5_;
	ValaDelegateType* _result_ = NULL;
	ValaSignal* _tmp6_;
	ValaDataType* _tmp7_;
	ValaDelegate* _tmp8_;
	ValaDelegate* _tmp9_;
	ValaDelegateType* _tmp10_;
	ValaDelegateType* _tmp11_;
	ValaDelegateType* _tmp12_;
	ValaDelegateType* _tmp13_;
	ValaDelegate* _tmp14_;
	ValaDelegate* _tmp15_;
	ValaList* _tmp16_;
	ValaList* _tmp17_;
	gint _tmp18_;
	gint _tmp19_;
	gboolean _tmp20_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_signal_symbol;
	_tmp1_ = vala_symbol_get_parent_symbol ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol));
	type_sym = _tmp3_;
	_tmp4_ = type_sym;
	_tmp5_ = vala_semantic_analyzer_get_data_type_for_symbol ((ValaTypeSymbol*) _tmp4_);
	sender_type = _tmp5_;
	_tmp6_ = self->priv->_signal_symbol;
	_tmp7_ = sender_type;
	_tmp8_ = vala_signal_get_delegate (_tmp6_, _tmp7_, (ValaCodeNode*) self);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_delegate_type_new (_tmp9_);
	_tmp11_ = _tmp10_;
	_vala_code_node_unref0 (_tmp9_);
	_result_ = _tmp11_;
	_tmp12_ = _result_;
	vala_data_type_set_value_owned ((ValaDataType*) _tmp12_, TRUE);
	_tmp13_ = _result_;
	_tmp14_ = vala_delegate_type_get_delegate_symbol (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_delegate_get_type_parameters (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = vala_collection_get_size ((ValaCollection*) _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = _tmp19_ > 0;
	_vala_iterable_unref0 (_tmp17_);
	if (_tmp20_) {
		{
			ValaList* _type_param_list = NULL;
			ValaObjectTypeSymbol* _tmp21_;
			ValaList* _tmp22_;
			gint _type_param_size = 0;
			ValaList* _tmp23_;
			gint _tmp24_;
			gint _tmp25_;
			gint _type_param_index = 0;
			_tmp21_ = type_sym;
			_tmp22_ = vala_object_type_symbol_get_type_parameters (_tmp21_);
			_type_param_list = _tmp22_;
			_tmp23_ = _type_param_list;
			_tmp24_ = vala_collection_get_size ((ValaCollection*) _tmp23_);
			_tmp25_ = _tmp24_;
			_type_param_size = _tmp25_;
			_type_param_index = -1;
			while (TRUE) {
				gint _tmp26_;
				gint _tmp27_;
				gint _tmp28_;
				ValaTypeParameter* type_param = NULL;
				ValaList* _tmp29_;
				gint _tmp30_;
				gpointer _tmp31_;
				ValaGenericType* type_arg = NULL;
				ValaTypeParameter* _tmp32_;
				ValaGenericType* _tmp33_;
				ValaGenericType* _tmp34_;
				ValaDelegateType* _tmp35_;
				ValaGenericType* _tmp36_;
				_tmp26_ = _type_param_index;
				_type_param_index = _tmp26_ + 1;
				_tmp27_ = _type_param_index;
				_tmp28_ = _type_param_size;
				if (!(_tmp27_ < _tmp28_)) {
					break;
				}
				_tmp29_ = _type_param_list;
				_tmp30_ = _type_param_index;
				_tmp31_ = vala_list_get (_tmp29_, _tmp30_);
				type_param = (ValaTypeParameter*) _tmp31_;
				_tmp32_ = type_param;
				_tmp33_ = vala_generic_type_new (_tmp32_);
				type_arg = _tmp33_;
				_tmp34_ = type_arg;
				vala_data_type_set_value_owned ((ValaDataType*) _tmp34_, TRUE);
				_tmp35_ = _result_;
				_tmp36_ = type_arg;
				vala_data_type_add_type_argument ((ValaDataType*) _tmp35_, (ValaDataType*) _tmp36_);
				_vala_code_node_unref0 (type_arg);
				_vala_code_node_unref0 (type_param);
			}
			_vala_iterable_unref0 (_type_param_list);
		}
	}
	result = _result_;
	_vala_code_node_unref0 (sender_type);
	_vala_code_node_unref0 (type_sym);
	return result;
}


static ValaMethod* vala_signal_type_get_connect_method (ValaSignalType* self) {
	ValaMethod* result = NULL;
	ValaMethod* _tmp0_;
	ValaMethod* _tmp24_;
	ValaMethod* _tmp25_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->connect_method;
	if (_tmp0_ == NULL) {
		ValaIntegerType* ulong_type = NULL;
		ValaCodeContext* _tmp1_;
		ValaCodeContext* _tmp2_;
		ValaNamespace* _tmp3_;
		ValaNamespace* _tmp4_;
		ValaScope* _tmp5_;
		ValaScope* _tmp6_;
		ValaSymbol* _tmp7_;
		ValaStruct* _tmp8_;
		ValaIntegerType* _tmp9_;
		ValaIntegerType* _tmp10_;
		ValaIntegerType* _tmp11_;
		ValaMethod* _tmp12_;
		ValaMethod* _tmp13_;
		ValaMethod* _tmp14_;
		ValaMethod* _tmp15_;
		ValaSignal* _tmp16_;
		ValaScope* _tmp17_;
		ValaScope* _tmp18_;
		ValaMethod* _tmp19_;
		ValaDelegateType* _tmp20_;
		ValaDelegateType* _tmp21_;
		ValaParameter* _tmp22_;
		ValaParameter* _tmp23_;
		_tmp1_ = vala_code_context_get ();
		_tmp2_ = _tmp1_;
		_tmp3_ = vala_code_context_get_root (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = vala_symbol_get_scope ((ValaSymbol*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = vala_scope_lookup (_tmp6_, "ulong");
		_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, VALA_TYPE_STRUCT, ValaStruct);
		_tmp9_ = vala_integer_type_new (_tmp8_, NULL, NULL);
		_tmp10_ = _tmp9_;
		_vala_code_node_unref0 (_tmp8_);
		_vala_code_context_unref0 (_tmp2_);
		ulong_type = _tmp10_;
		_tmp11_ = ulong_type;
		_tmp12_ = vala_method_new ("connect", (ValaDataType*) _tmp11_, NULL, NULL);
		_vala_code_node_unref0 (self->priv->connect_method);
		self->priv->connect_method = _tmp12_;
		_tmp13_ = self->priv->connect_method;
		vala_symbol_set_access ((ValaSymbol*) _tmp13_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
		_tmp14_ = self->priv->connect_method;
		vala_symbol_set_external ((ValaSymbol*) _tmp14_, TRUE);
		_tmp15_ = self->priv->connect_method;
		_tmp16_ = self->priv->_signal_symbol;
		_tmp17_ = vala_symbol_get_scope ((ValaSymbol*) _tmp16_);
		_tmp18_ = _tmp17_;
		vala_symbol_set_owner ((ValaSymbol*) _tmp15_, _tmp18_);
		_tmp19_ = self->priv->connect_method;
		_tmp20_ = vala_signal_type_get_handler_type (self);
		_tmp21_ = _tmp20_;
		_tmp22_ = vala_parameter_new ("handler", (ValaDataType*) _tmp21_, NULL);
		_tmp23_ = _tmp22_;
		vala_callable_add_parameter ((ValaCallable*) _tmp19_, _tmp23_);
		_vala_code_node_unref0 (_tmp23_);
		_vala_code_node_unref0 (_tmp21_);
		_vala_code_node_unref0 (ulong_type);
	}
	_tmp24_ = self->priv->connect_method;
	_tmp25_ = _vala_code_node_ref0 (_tmp24_);
	result = _tmp25_;
	return result;
}


static ValaMethod* vala_signal_type_get_connect_after_method (ValaSignalType* self) {
	ValaMethod* result = NULL;
	ValaMethod* _tmp0_;
	ValaMethod* _tmp24_;
	ValaMethod* _tmp25_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->connect_after_method;
	if (_tmp0_ == NULL) {
		ValaIntegerType* ulong_type = NULL;
		ValaCodeContext* _tmp1_;
		ValaCodeContext* _tmp2_;
		ValaNamespace* _tmp3_;
		ValaNamespace* _tmp4_;
		ValaScope* _tmp5_;
		ValaScope* _tmp6_;
		ValaSymbol* _tmp7_;
		ValaStruct* _tmp8_;
		ValaIntegerType* _tmp9_;
		ValaIntegerType* _tmp10_;
		ValaIntegerType* _tmp11_;
		ValaMethod* _tmp12_;
		ValaMethod* _tmp13_;
		ValaMethod* _tmp14_;
		ValaMethod* _tmp15_;
		ValaSignal* _tmp16_;
		ValaScope* _tmp17_;
		ValaScope* _tmp18_;
		ValaMethod* _tmp19_;
		ValaDelegateType* _tmp20_;
		ValaDelegateType* _tmp21_;
		ValaParameter* _tmp22_;
		ValaParameter* _tmp23_;
		_tmp1_ = vala_code_context_get ();
		_tmp2_ = _tmp1_;
		_tmp3_ = vala_code_context_get_root (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = vala_symbol_get_scope ((ValaSymbol*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = vala_scope_lookup (_tmp6_, "ulong");
		_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, VALA_TYPE_STRUCT, ValaStruct);
		_tmp9_ = vala_integer_type_new (_tmp8_, NULL, NULL);
		_tmp10_ = _tmp9_;
		_vala_code_node_unref0 (_tmp8_);
		_vala_code_context_unref0 (_tmp2_);
		ulong_type = _tmp10_;
		_tmp11_ = ulong_type;
		_tmp12_ = vala_method_new ("connect_after", (ValaDataType*) _tmp11_, NULL, NULL);
		_vala_code_node_unref0 (self->priv->connect_after_method);
		self->priv->connect_after_method = _tmp12_;
		_tmp13_ = self->priv->connect_after_method;
		vala_symbol_set_access ((ValaSymbol*) _tmp13_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
		_tmp14_ = self->priv->connect_after_method;
		vala_symbol_set_external ((ValaSymbol*) _tmp14_, TRUE);
		_tmp15_ = self->priv->connect_after_method;
		_tmp16_ = self->priv->_signal_symbol;
		_tmp17_ = vala_symbol_get_scope ((ValaSymbol*) _tmp16_);
		_tmp18_ = _tmp17_;
		vala_symbol_set_owner ((ValaSymbol*) _tmp15_, _tmp18_);
		_tmp19_ = self->priv->connect_after_method;
		_tmp20_ = vala_signal_type_get_handler_type (self);
		_tmp21_ = _tmp20_;
		_tmp22_ = vala_parameter_new ("handler", (ValaDataType*) _tmp21_, NULL);
		_tmp23_ = _tmp22_;
		vala_callable_add_parameter ((ValaCallable*) _tmp19_, _tmp23_);
		_vala_code_node_unref0 (_tmp23_);
		_vala_code_node_unref0 (_tmp21_);
		_vala_code_node_unref0 (ulong_type);
	}
	_tmp24_ = self->priv->connect_after_method;
	_tmp25_ = _vala_code_node_ref0 (_tmp24_);
	result = _tmp25_;
	return result;
}


static ValaMethod* vala_signal_type_get_disconnect_method (ValaSignalType* self) {
	ValaMethod* result = NULL;
	ValaMethod* _tmp0_;
	ValaMethod* _tmp15_;
	ValaMethod* _tmp16_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->disconnect_method;
	if (_tmp0_ == NULL) {
		ValaVoidType* _tmp1_;
		ValaVoidType* _tmp2_;
		ValaMethod* _tmp3_;
		ValaMethod* _tmp4_;
		ValaMethod* _tmp5_;
		ValaMethod* _tmp6_;
		ValaSignal* _tmp7_;
		ValaScope* _tmp8_;
		ValaScope* _tmp9_;
		ValaMethod* _tmp10_;
		ValaDelegateType* _tmp11_;
		ValaDelegateType* _tmp12_;
		ValaParameter* _tmp13_;
		ValaParameter* _tmp14_;
		_tmp1_ = vala_void_type_new (NULL);
		_tmp2_ = _tmp1_;
		_tmp3_ = vala_method_new ("disconnect", (ValaDataType*) _tmp2_, NULL, NULL);
		_vala_code_node_unref0 (self->priv->disconnect_method);
		self->priv->disconnect_method = _tmp3_;
		_vala_code_node_unref0 (_tmp2_);
		_tmp4_ = self->priv->disconnect_method;
		vala_symbol_set_access ((ValaSymbol*) _tmp4_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
		_tmp5_ = self->priv->disconnect_method;
		vala_symbol_set_external ((ValaSymbol*) _tmp5_, TRUE);
		_tmp6_ = self->priv->disconnect_method;
		_tmp7_ = self->priv->_signal_symbol;
		_tmp8_ = vala_symbol_get_scope ((ValaSymbol*) _tmp7_);
		_tmp9_ = _tmp8_;
		vala_symbol_set_owner ((ValaSymbol*) _tmp6_, _tmp9_);
		_tmp10_ = self->priv->disconnect_method;
		_tmp11_ = vala_signal_type_get_handler_type (self);
		_tmp12_ = _tmp11_;
		_tmp13_ = vala_parameter_new ("handler", (ValaDataType*) _tmp12_, NULL);
		_tmp14_ = _tmp13_;
		vala_callable_add_parameter ((ValaCallable*) _tmp10_, _tmp14_);
		_vala_code_node_unref0 (_tmp14_);
		_vala_code_node_unref0 (_tmp12_);
	}
	_tmp15_ = self->priv->disconnect_method;
	_tmp16_ = _vala_code_node_ref0 (_tmp15_);
	result = _tmp16_;
	return result;
}


static ValaSymbol* vala_signal_type_real_get_member (ValaDataType* base, const gchar* member_name) {
	ValaSignalType * self;
	ValaSymbol* result = NULL;
	const gchar* _tmp0_;
	self = (ValaSignalType*) base;
	g_return_val_if_fail (member_name != NULL, NULL);
	_tmp0_ = member_name;
	if (g_strcmp0 (_tmp0_, "connect") == 0) {
		ValaMethod* _tmp1_;
		_tmp1_ = vala_signal_type_get_connect_method (self);
		result = (ValaSymbol*) _tmp1_;
		return result;
	} else {
		const gchar* _tmp2_;
		_tmp2_ = member_name;
		if (g_strcmp0 (_tmp2_, "connect_after") == 0) {
			ValaMethod* _tmp3_;
			_tmp3_ = vala_signal_type_get_connect_after_method (self);
			result = (ValaSymbol*) _tmp3_;
			return result;
		} else {
			const gchar* _tmp4_;
			_tmp4_ = member_name;
			if (g_strcmp0 (_tmp4_, "disconnect") == 0) {
				ValaMethod* _tmp5_;
				_tmp5_ = vala_signal_type_get_disconnect_method (self);
				result = (ValaSymbol*) _tmp5_;
				return result;
			}
		}
	}
	result = NULL;
	return result;
}


static gboolean vala_signal_type_real_is_accessible (ValaDataType* base, ValaSymbol* sym) {
	ValaSignalType * self;
	gboolean result = FALSE;
	ValaSignal* _tmp0_;
	ValaSymbol* _tmp1_;
	gboolean _tmp2_;
	self = (ValaSignalType*) base;
	g_return_val_if_fail (sym != NULL, FALSE);
	_tmp0_ = self->priv->_signal_symbol;
	_tmp1_ = sym;
	_tmp2_ = vala_symbol_is_accessible ((ValaSymbol*) _tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}


ValaSignal* vala_signal_type_get_signal_symbol (ValaSignalType* self) {
	ValaSignal* result;
	ValaSignal* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_signal_symbol;
	result = _tmp0_;
	return result;
}


void vala_signal_type_set_signal_symbol (ValaSignalType* self, ValaSignal* value) {
	ValaSignal* _tmp0_;
	ValaSignal* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_signal_symbol);
	self->priv->_signal_symbol = _tmp1_;
}


static void vala_signal_type_class_init (ValaSignalTypeClass * klass) {
	vala_signal_type_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeNodeClass *) klass)->finalize = vala_signal_type_finalize;
	g_type_class_add_private (klass, sizeof (ValaSignalTypePrivate));
	((ValaDataTypeClass *) klass)->is_invokable = (gboolean (*) (ValaDataType *)) vala_signal_type_real_is_invokable;
	((ValaDataTypeClass *) klass)->get_return_type = (ValaDataType* (*) (ValaDataType *)) vala_signal_type_real_get_return_type;
	((ValaDataTypeClass *) klass)->get_parameters = (ValaList* (*) (ValaDataType *)) vala_signal_type_real_get_parameters;
	((ValaDataTypeClass *) klass)->copy = (ValaDataType* (*) (ValaDataType *)) vala_signal_type_real_copy;
	((ValaDataTypeClass *) klass)->compatible = (gboolean (*) (ValaDataType *, ValaDataType*)) vala_signal_type_real_compatible;
	((ValaDataTypeClass *) klass)->to_qualified_string = (gchar* (*) (ValaDataType *, ValaScope*)) vala_signal_type_real_to_qualified_string;
	((ValaDataTypeClass *) klass)->get_member = (ValaSymbol* (*) (ValaDataType *, const gchar*)) vala_signal_type_real_get_member;
	((ValaDataTypeClass *) klass)->is_accessible = (gboolean (*) (ValaDataType *, ValaSymbol*)) vala_signal_type_real_is_accessible;
}


static void vala_signal_type_instance_init (ValaSignalType * self) {
	self->priv = VALA_SIGNAL_TYPE_GET_PRIVATE (self);
}


static void vala_signal_type_finalize (ValaCodeNode * obj) {
	ValaSignalType * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_SIGNAL_TYPE, ValaSignalType);
	_vala_code_node_unref0 (self->priv->_signal_symbol);
	_vala_code_node_unref0 (self->priv->connect_method);
	_vala_code_node_unref0 (self->priv->connect_after_method);
	_vala_code_node_unref0 (self->priv->disconnect_method);
	VALA_CODE_NODE_CLASS (vala_signal_type_parent_class)->finalize (obj);
}


/**
 * The type of a signal referencea.
 */
GType vala_signal_type_get_type (void) {
	static volatile gsize vala_signal_type_type_id__volatile = 0;
	if (g_once_init_enter (&vala_signal_type_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaSignalTypeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_signal_type_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaSignalType), 0, (GInstanceInitFunc) vala_signal_type_instance_init, NULL };
		GType vala_signal_type_type_id;
		vala_signal_type_type_id = g_type_register_static (VALA_TYPE_CALLABLE_TYPE, "ValaSignalType", &g_define_type_info, 0);
		g_once_init_leave (&vala_signal_type_type_id__volatile, vala_signal_type_type_id);
	}
	return vala_signal_type_type_id__volatile;
}



