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

/* formalparameter.vala
 *
 * Copyright (C) 2008-2011  Florian Brosch
 *
 * 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:
 * 	Florian Brosch <flo.brosch@gmail.com>
 */

#include <glib.h>
#include <glib-object.h>
#include "valadoc.h"
#include <stdlib.h>
#include <string.h>

enum  {
	VALADOC_API_FORMAL_PARAMETER_0_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_DEFAULT_VALUE_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_IMPLICIT_ARRAY_LENGTH_CPARAMETER_NAME_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_IMPLICIT_CLOSURE_CPARAMETER_NAME_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_IMPLICIT_DESTROY_CPARAMETER_NAME_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_IS_OUT_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_IS_REF_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_HAS_DEFAULT_VALUE_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_PARAMETER_TYPE_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_ELLIPSIS_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_NODE_TYPE_PROPERTY,
	VALADOC_API_FORMAL_PARAMETER_NUM_PROPERTIES
};
static GParamSpec* valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _valadoc_api_signature_builder_unref0(var) ((var == NULL) ? NULL : (var = (valadoc_api_signature_builder_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _ValadocApiFormalParameterPrivate {
	ValadocContentRun* _default_value;
	gchar* _implicit_array_length_cparameter_name;
	gchar* _implicit_closure_cparameter_name;
	gchar* _implicit_destroy_cparameter_name;
	ValadocApiFormalParameterType type;
	ValadocApiTypeReference* _parameter_type;
	gboolean _ellipsis;
};


static gpointer valadoc_api_formal_parameter_parent_class = NULL;

#define VALADOC_API_FORMAL_PARAMETER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALADOC_API_TYPE_FORMAL_PARAMETER, ValadocApiFormalParameterPrivate))
static void valadoc_api_formal_parameter_set_ellipsis (ValadocApiFormalParameter* self, gboolean value);
static void valadoc_api_formal_parameter_real_accept (ValadocApiNode* base, ValadocApiVisitor* visitor);
static ValadocContentInline* valadoc_api_formal_parameter_real_build_signature (ValadocApiItem* base);
G_GNUC_INTERNAL const gchar* valadoc_api_formal_parameter_get_implicit_array_length_cparameter_name (ValadocApiFormalParameter* self);
G_GNUC_INTERNAL void valadoc_api_formal_parameter_set_implicit_array_length_cparameter_name (ValadocApiFormalParameter* self, const gchar* value);
G_GNUC_INTERNAL const gchar* valadoc_api_formal_parameter_get_implicit_closure_cparameter_name (ValadocApiFormalParameter* self);
G_GNUC_INTERNAL void valadoc_api_formal_parameter_set_implicit_closure_cparameter_name (ValadocApiFormalParameter* self, const gchar* value);
G_GNUC_INTERNAL const gchar* valadoc_api_formal_parameter_get_implicit_destroy_cparameter_name (ValadocApiFormalParameter* self);
G_GNUC_INTERNAL void valadoc_api_formal_parameter_set_implicit_destroy_cparameter_name (ValadocApiFormalParameter* self, const gchar* value);
static void valadoc_api_formal_parameter_finalize (GObject * obj);
static void _vala_valadoc_api_formal_parameter_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_valadoc_api_formal_parameter_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


ValadocApiFormalParameter* valadoc_api_formal_parameter_construct (GType object_type, ValadocApiNode* parent, ValadocApiSourceFile* file, const gchar* name, ValadocApiSymbolAccessibility accessibility, ValadocApiFormalParameterType type, gboolean ellipsis, void* data) {
	ValadocApiFormalParameter * self = NULL;
	ValadocApiNode* _tmp0_;
	ValadocApiSourceFile* _tmp1_;
	const gchar* _tmp2_;
	ValadocApiSymbolAccessibility _tmp3_;
	void* _tmp4_;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_;
	gboolean _tmp12_;
	ValadocApiFormalParameterType _tmp13_;
	g_return_val_if_fail (parent != NULL, NULL);
	g_return_val_if_fail (file != NULL, NULL);
	_tmp0_ = parent;
	_tmp1_ = file;
	_tmp2_ = name;
	_tmp3_ = accessibility;
	_tmp4_ = data;
	self = (ValadocApiFormalParameter*) valadoc_api_symbol_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_);
	_tmp7_ = name;
	if (_tmp7_ == NULL) {
		gboolean _tmp8_;
		_tmp8_ = ellipsis;
		_tmp6_ = _tmp8_;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		_tmp5_ = TRUE;
	} else {
		gboolean _tmp9_ = FALSE;
		const gchar* _tmp10_;
		_tmp10_ = name;
		if (_tmp10_ != NULL) {
			gboolean _tmp11_;
			_tmp11_ = ellipsis;
			_tmp9_ = !_tmp11_;
		} else {
			_tmp9_ = FALSE;
		}
		_tmp5_ = _tmp9_;
	}
	_vala_assert (_tmp5_, "(name == null && ellipsis) || (name != null && !ellipsis)");
	_tmp12_ = ellipsis;
	valadoc_api_formal_parameter_set_ellipsis (self, _tmp12_);
	_tmp13_ = type;
	self->priv->type = _tmp13_;
	return self;
}


ValadocApiFormalParameter* valadoc_api_formal_parameter_new (ValadocApiNode* parent, ValadocApiSourceFile* file, const gchar* name, ValadocApiSymbolAccessibility accessibility, ValadocApiFormalParameterType type, gboolean ellipsis, void* data) {
	return valadoc_api_formal_parameter_construct (VALADOC_API_TYPE_FORMAL_PARAMETER, parent, file, name, accessibility, type, ellipsis, data);
}


/**
 * {@inheritDoc}
 */
static void valadoc_api_formal_parameter_real_accept (ValadocApiNode* base, ValadocApiVisitor* visitor) {
	ValadocApiFormalParameter * self;
	ValadocApiVisitor* _tmp0_;
	self = (ValadocApiFormalParameter*) base;
	g_return_if_fail (visitor != NULL);
	_tmp0_ = visitor;
	valadoc_api_visitor_visit_formal_parameter (_tmp0_, self);
}


/**
 * {@inheritDoc}
 */
static ValadocContentInline* valadoc_api_formal_parameter_real_build_signature (ValadocApiItem* base) {
	ValadocApiFormalParameter * self;
	ValadocContentInline* result = NULL;
	ValadocApiSignatureBuilder* signature = NULL;
	ValadocApiSignatureBuilder* _tmp0_;
	gboolean _tmp1_;
	ValadocApiSignatureBuilder* _tmp35_;
	ValadocContentRun* _tmp36_;
	self = (ValadocApiFormalParameter*) base;
	_tmp0_ = valadoc_api_signature_builder_new ();
	signature = _tmp0_;
	_tmp1_ = self->priv->_ellipsis;
	if (_tmp1_) {
		ValadocApiSignatureBuilder* _tmp2_;
		ValadocApiSignatureBuilder* _tmp3_;
		ValadocApiSignatureBuilder* _tmp4_;
		_tmp2_ = signature;
		_tmp3_ = valadoc_api_signature_builder_append (_tmp2_, "...", TRUE);
		_tmp4_ = _tmp3_;
		_valadoc_api_signature_builder_unref0 (_tmp4_);
	} else {
		gboolean _tmp5_;
		gboolean _tmp6_;
		ValadocApiSignatureBuilder* _tmp15_;
		ValadocApiTypeReference* _tmp16_;
		ValadocContentInline* _tmp17_;
		ValadocContentInline* _tmp18_;
		ValadocApiSignatureBuilder* _tmp19_;
		ValadocApiSignatureBuilder* _tmp20_;
		ValadocApiSignatureBuilder* _tmp21_;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		ValadocApiSignatureBuilder* _tmp24_;
		ValadocApiSignatureBuilder* _tmp25_;
		gboolean _tmp26_;
		gboolean _tmp27_;
		_tmp5_ = valadoc_api_formal_parameter_get_is_out (self);
		_tmp6_ = _tmp5_;
		if (_tmp6_) {
			ValadocApiSignatureBuilder* _tmp7_;
			ValadocApiSignatureBuilder* _tmp8_;
			ValadocApiSignatureBuilder* _tmp9_;
			_tmp7_ = signature;
			_tmp8_ = valadoc_api_signature_builder_append_keyword (_tmp7_, "out", TRUE);
			_tmp9_ = _tmp8_;
			_valadoc_api_signature_builder_unref0 (_tmp9_);
		} else {
			gboolean _tmp10_;
			gboolean _tmp11_;
			_tmp10_ = valadoc_api_formal_parameter_get_is_ref (self);
			_tmp11_ = _tmp10_;
			if (_tmp11_) {
				ValadocApiSignatureBuilder* _tmp12_;
				ValadocApiSignatureBuilder* _tmp13_;
				ValadocApiSignatureBuilder* _tmp14_;
				_tmp12_ = signature;
				_tmp13_ = valadoc_api_signature_builder_append_keyword (_tmp12_, "ref", TRUE);
				_tmp14_ = _tmp13_;
				_valadoc_api_signature_builder_unref0 (_tmp14_);
			}
		}
		_tmp15_ = signature;
		_tmp16_ = self->priv->_parameter_type;
		_tmp17_ = valadoc_api_item_get_signature ((ValadocApiItem*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = valadoc_api_signature_builder_append_content (_tmp15_, _tmp18_, TRUE);
		_tmp20_ = _tmp19_;
		_valadoc_api_signature_builder_unref0 (_tmp20_);
		_tmp21_ = signature;
		_tmp22_ = valadoc_api_node_get_name ((ValadocApiNode*) self);
		_tmp23_ = _tmp22_;
		_tmp24_ = valadoc_api_signature_builder_append (_tmp21_, _tmp23_, TRUE);
		_tmp25_ = _tmp24_;
		_valadoc_api_signature_builder_unref0 (_tmp25_);
		_tmp26_ = valadoc_api_formal_parameter_get_has_default_value (self);
		_tmp27_ = _tmp26_;
		if (_tmp27_) {
			ValadocApiSignatureBuilder* _tmp28_;
			ValadocApiSignatureBuilder* _tmp29_;
			ValadocApiSignatureBuilder* _tmp30_;
			ValadocApiSignatureBuilder* _tmp31_;
			ValadocContentRun* _tmp32_;
			ValadocApiSignatureBuilder* _tmp33_;
			ValadocApiSignatureBuilder* _tmp34_;
			_tmp28_ = signature;
			_tmp29_ = valadoc_api_signature_builder_append (_tmp28_, "=", TRUE);
			_tmp30_ = _tmp29_;
			_valadoc_api_signature_builder_unref0 (_tmp30_);
			_tmp31_ = signature;
			_tmp32_ = self->priv->_default_value;
			_tmp33_ = valadoc_api_signature_builder_append_content (_tmp31_, (ValadocContentInline*) _tmp32_, TRUE);
			_tmp34_ = _tmp33_;
			_valadoc_api_signature_builder_unref0 (_tmp34_);
		}
	}
	_tmp35_ = signature;
	_tmp36_ = valadoc_api_signature_builder_get (_tmp35_);
	result = (ValadocContentInline*) _tmp36_;
	_valadoc_api_signature_builder_unref0 (signature);
	return result;
}


ValadocContentRun* valadoc_api_formal_parameter_get_default_value (ValadocApiFormalParameter* self) {
	ValadocContentRun* result;
	ValadocContentRun* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_default_value;
	result = _tmp0_;
	return result;
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


void valadoc_api_formal_parameter_set_default_value (ValadocApiFormalParameter* self, ValadocContentRun* value) {
	g_return_if_fail (self != NULL);
	if (valadoc_api_formal_parameter_get_default_value (self) != value) {
		ValadocContentRun* _tmp0_;
		ValadocContentRun* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_default_value);
		self->priv->_default_value = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_DEFAULT_VALUE_PROPERTY]);
	}
}


G_GNUC_INTERNAL const gchar* valadoc_api_formal_parameter_get_implicit_array_length_cparameter_name (ValadocApiFormalParameter* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_implicit_array_length_cparameter_name;
	result = _tmp0_;
	return result;
}


G_GNUC_INTERNAL void valadoc_api_formal_parameter_set_implicit_array_length_cparameter_name (ValadocApiFormalParameter* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, valadoc_api_formal_parameter_get_implicit_array_length_cparameter_name (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		_g_free0 (self->priv->_implicit_array_length_cparameter_name);
		self->priv->_implicit_array_length_cparameter_name = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_IMPLICIT_ARRAY_LENGTH_CPARAMETER_NAME_PROPERTY]);
	}
}


G_GNUC_INTERNAL const gchar* valadoc_api_formal_parameter_get_implicit_closure_cparameter_name (ValadocApiFormalParameter* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_implicit_closure_cparameter_name;
	result = _tmp0_;
	return result;
}


G_GNUC_INTERNAL void valadoc_api_formal_parameter_set_implicit_closure_cparameter_name (ValadocApiFormalParameter* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, valadoc_api_formal_parameter_get_implicit_closure_cparameter_name (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		_g_free0 (self->priv->_implicit_closure_cparameter_name);
		self->priv->_implicit_closure_cparameter_name = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_IMPLICIT_CLOSURE_CPARAMETER_NAME_PROPERTY]);
	}
}


G_GNUC_INTERNAL const gchar* valadoc_api_formal_parameter_get_implicit_destroy_cparameter_name (ValadocApiFormalParameter* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_implicit_destroy_cparameter_name;
	result = _tmp0_;
	return result;
}


G_GNUC_INTERNAL void valadoc_api_formal_parameter_set_implicit_destroy_cparameter_name (ValadocApiFormalParameter* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, valadoc_api_formal_parameter_get_implicit_destroy_cparameter_name (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		_g_free0 (self->priv->_implicit_destroy_cparameter_name);
		self->priv->_implicit_destroy_cparameter_name = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_IMPLICIT_DESTROY_CPARAMETER_NAME_PROPERTY]);
	}
}


gboolean valadoc_api_formal_parameter_get_is_out (ValadocApiFormalParameter* self) {
	gboolean result;
	ValadocApiFormalParameterType _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->type;
	result = _tmp0_ == VALADOC_API_FORMAL_PARAMETER_TYPE_OUT;
	return result;
}


gboolean valadoc_api_formal_parameter_get_is_ref (ValadocApiFormalParameter* self) {
	gboolean result;
	ValadocApiFormalParameterType _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->type;
	result = _tmp0_ == VALADOC_API_FORMAL_PARAMETER_TYPE_REF;
	return result;
}


gboolean valadoc_api_formal_parameter_get_has_default_value (ValadocApiFormalParameter* self) {
	gboolean result;
	ValadocContentRun* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_default_value;
	result = _tmp0_ != NULL;
	return result;
}


ValadocApiTypeReference* valadoc_api_formal_parameter_get_parameter_type (ValadocApiFormalParameter* self) {
	ValadocApiTypeReference* result;
	ValadocApiTypeReference* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_parameter_type;
	result = _tmp0_;
	return result;
}


void valadoc_api_formal_parameter_set_parameter_type (ValadocApiFormalParameter* self, ValadocApiTypeReference* value) {
	g_return_if_fail (self != NULL);
	if (valadoc_api_formal_parameter_get_parameter_type (self) != value) {
		ValadocApiTypeReference* _tmp0_;
		ValadocApiTypeReference* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_parameter_type);
		self->priv->_parameter_type = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_PARAMETER_TYPE_PROPERTY]);
	}
}


gboolean valadoc_api_formal_parameter_get_ellipsis (ValadocApiFormalParameter* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_ellipsis;
	result = _tmp0_;
	return result;
}


static void valadoc_api_formal_parameter_set_ellipsis (ValadocApiFormalParameter* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (valadoc_api_formal_parameter_get_ellipsis (self) != value) {
		gboolean _tmp0_;
		_tmp0_ = value;
		self->priv->_ellipsis = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_ELLIPSIS_PROPERTY]);
	}
}


static ValadocApiNodeType valadoc_api_formal_parameter_real_get_node_type (ValadocApiNode* base) {
	ValadocApiNodeType result;
	ValadocApiFormalParameter* self;
	self = (ValadocApiFormalParameter*) base;
	result = VALADOC_API_NODE_TYPE_FORMAL_PARAMETER;
	return result;
}


static void valadoc_api_formal_parameter_class_init (ValadocApiFormalParameterClass * klass) {
	valadoc_api_formal_parameter_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ValadocApiFormalParameterPrivate));
	((ValadocApiNodeClass *) klass)->accept = (void (*) (ValadocApiNode *, ValadocApiVisitor*)) valadoc_api_formal_parameter_real_accept;
	((ValadocApiItemClass *) klass)->build_signature = (ValadocContentInline* (*) (ValadocApiItem *)) valadoc_api_formal_parameter_real_build_signature;
	VALADOC_API_NODE_CLASS (klass)->get_node_type = valadoc_api_formal_parameter_real_get_node_type;
	G_OBJECT_CLASS (klass)->get_property = _vala_valadoc_api_formal_parameter_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_valadoc_api_formal_parameter_set_property;
	G_OBJECT_CLASS (klass)->finalize = valadoc_api_formal_parameter_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_DEFAULT_VALUE_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_DEFAULT_VALUE_PROPERTY] = g_param_spec_object ("default-value", "default-value", "default-value", VALADOC_CONTENT_TYPE_RUN, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * Used to translate imported C-documentation
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_IMPLICIT_ARRAY_LENGTH_CPARAMETER_NAME_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_IMPLICIT_ARRAY_LENGTH_CPARAMETER_NAME_PROPERTY] = g_param_spec_string ("implicit-array-length-cparameter-name", "implicit-array-length-cparameter-name", "implicit-array-length-cparameter-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * Used to translate imported C-documentation
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_IMPLICIT_CLOSURE_CPARAMETER_NAME_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_IMPLICIT_CLOSURE_CPARAMETER_NAME_PROPERTY] = g_param_spec_string ("implicit-closure-cparameter-name", "implicit-closure-cparameter-name", "implicit-closure-cparameter-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * Used to translate imported C-documentation
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_IMPLICIT_DESTROY_CPARAMETER_NAME_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_IMPLICIT_DESTROY_CPARAMETER_NAME_PROPERTY] = g_param_spec_string ("implicit-destroy-cparameter-name", "implicit-destroy-cparameter-name", "implicit-destroy-cparameter-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * Specifies whether the parameter direction is out
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_IS_OUT_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_IS_OUT_PROPERTY] = g_param_spec_boolean ("is-out", "is-out", "is-out", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * Specifies whether the parameter direction is ref
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_IS_REF_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_IS_REF_PROPERTY] = g_param_spec_boolean ("is-ref", "is-ref", "is-ref", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * Specifies whether the parameter has a default value
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_HAS_DEFAULT_VALUE_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_HAS_DEFAULT_VALUE_PROPERTY] = g_param_spec_boolean ("has-default-value", "has-default-value", "has-default-value", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * The parameter type.
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_PARAMETER_TYPE_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_PARAMETER_TYPE_PROPERTY] = g_param_spec_object ("parameter-type", "parameter-type", "parameter-type", VALADOC_API_TYPE_TYPEREFERENCE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * Specifies whether the methods accepts a variable number of arguments
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_ELLIPSIS_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_ELLIPSIS_PROPERTY] = g_param_spec_boolean ("ellipsis", "ellipsis", "ellipsis", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * {@inheritDoc}
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_FORMAL_PARAMETER_NODE_TYPE_PROPERTY, valadoc_api_formal_parameter_properties[VALADOC_API_FORMAL_PARAMETER_NODE_TYPE_PROPERTY] = g_param_spec_enum ("node-type", "node-type", "node-type", VALADOC_API_TYPE_NODE_TYPE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void valadoc_api_formal_parameter_instance_init (ValadocApiFormalParameter * self) {
	self->priv = VALADOC_API_FORMAL_PARAMETER_GET_PRIVATE (self);
}


static void valadoc_api_formal_parameter_finalize (GObject * obj) {
	ValadocApiFormalParameter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_API_TYPE_FORMAL_PARAMETER, ValadocApiFormalParameter);
	_g_object_unref0 (self->priv->_default_value);
	_g_free0 (self->priv->_implicit_array_length_cparameter_name);
	_g_free0 (self->priv->_implicit_closure_cparameter_name);
	_g_free0 (self->priv->_implicit_destroy_cparameter_name);
	_g_object_unref0 (self->priv->_parameter_type);
	G_OBJECT_CLASS (valadoc_api_formal_parameter_parent_class)->finalize (obj);
}


/**
 * Represents a formal parameter in method, signal and delegate signatures.
 */
GType valadoc_api_formal_parameter_get_type (void) {
	static volatile gsize valadoc_api_formal_parameter_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_api_formal_parameter_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocApiFormalParameterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_api_formal_parameter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocApiFormalParameter), 0, (GInstanceInitFunc) valadoc_api_formal_parameter_instance_init, NULL };
		GType valadoc_api_formal_parameter_type_id;
		valadoc_api_formal_parameter_type_id = g_type_register_static (VALADOC_API_TYPE_SYMBOL, "ValadocApiFormalParameter", &g_define_type_info, 0);
		g_once_init_leave (&valadoc_api_formal_parameter_type_id__volatile, valadoc_api_formal_parameter_type_id);
	}
	return valadoc_api_formal_parameter_type_id__volatile;
}


static void _vala_valadoc_api_formal_parameter_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ValadocApiFormalParameter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_API_TYPE_FORMAL_PARAMETER, ValadocApiFormalParameter);
	switch (property_id) {
		case VALADOC_API_FORMAL_PARAMETER_DEFAULT_VALUE_PROPERTY:
		g_value_set_object (value, valadoc_api_formal_parameter_get_default_value (self));
		break;
		case VALADOC_API_FORMAL_PARAMETER_IMPLICIT_ARRAY_LENGTH_CPARAMETER_NAME_PROPERTY:
		g_value_set_string (value, valadoc_api_formal_parameter_get_implicit_array_length_cparameter_name (self));
		break;
		case VALADOC_API_FORMAL_PARAMETER_IMPLICIT_CLOSURE_CPARAMETER_NAME_PROPERTY:
		g_value_set_string (value, valadoc_api_formal_parameter_get_implicit_closure_cparameter_name (self));
		break;
		case VALADOC_API_FORMAL_PARAMETER_IMPLICIT_DESTROY_CPARAMETER_NAME_PROPERTY:
		g_value_set_string (value, valadoc_api_formal_parameter_get_implicit_destroy_cparameter_name (self));
		break;
		case VALADOC_API_FORMAL_PARAMETER_IS_OUT_PROPERTY:
		g_value_set_boolean (value, valadoc_api_formal_parameter_get_is_out (self));
		break;
		case VALADOC_API_FORMAL_PARAMETER_IS_REF_PROPERTY:
		g_value_set_boolean (value, valadoc_api_formal_parameter_get_is_ref (self));
		break;
		case VALADOC_API_FORMAL_PARAMETER_HAS_DEFAULT_VALUE_PROPERTY:
		g_value_set_boolean (value, valadoc_api_formal_parameter_get_has_default_value (self));
		break;
		case VALADOC_API_FORMAL_PARAMETER_PARAMETER_TYPE_PROPERTY:
		g_value_set_object (value, valadoc_api_formal_parameter_get_parameter_type (self));
		break;
		case VALADOC_API_FORMAL_PARAMETER_ELLIPSIS_PROPERTY:
		g_value_set_boolean (value, valadoc_api_formal_parameter_get_ellipsis (self));
		break;
		case VALADOC_API_FORMAL_PARAMETER_NODE_TYPE_PROPERTY:
		g_value_set_enum (value, valadoc_api_node_get_node_type ((ValadocApiNode*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_valadoc_api_formal_parameter_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ValadocApiFormalParameter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_API_TYPE_FORMAL_PARAMETER, ValadocApiFormalParameter);
	switch (property_id) {
		case VALADOC_API_FORMAL_PARAMETER_DEFAULT_VALUE_PROPERTY:
		valadoc_api_formal_parameter_set_default_value (self, g_value_get_object (value));
		break;
		case VALADOC_API_FORMAL_PARAMETER_IMPLICIT_ARRAY_LENGTH_CPARAMETER_NAME_PROPERTY:
		valadoc_api_formal_parameter_set_implicit_array_length_cparameter_name (self, g_value_get_string (value));
		break;
		case VALADOC_API_FORMAL_PARAMETER_IMPLICIT_CLOSURE_CPARAMETER_NAME_PROPERTY:
		valadoc_api_formal_parameter_set_implicit_closure_cparameter_name (self, g_value_get_string (value));
		break;
		case VALADOC_API_FORMAL_PARAMETER_IMPLICIT_DESTROY_CPARAMETER_NAME_PROPERTY:
		valadoc_api_formal_parameter_set_implicit_destroy_cparameter_name (self, g_value_get_string (value));
		break;
		case VALADOC_API_FORMAL_PARAMETER_PARAMETER_TYPE_PROPERTY:
		valadoc_api_formal_parameter_set_parameter_type (self, g_value_get_object (value));
		break;
		case VALADOC_API_FORMAL_PARAMETER_ELLIPSIS_PROPERTY:
		valadoc_api_formal_parameter_set_ellipsis (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



