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

/* property.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_PROPERTY_0_PROPERTY,
	VALADOC_API_PROPERTY_PROPERTY_TYPE_PROPERTY,
	VALADOC_API_PROPERTY_IS_VIRTUAL_PROPERTY,
	VALADOC_API_PROPERTY_IS_ABSTRACT_PROPERTY,
	VALADOC_API_PROPERTY_IS_OVERRIDE_PROPERTY,
	VALADOC_API_PROPERTY_IS_DBUS_VISIBLE_PROPERTY,
	VALADOC_API_PROPERTY_SETTER_PROPERTY,
	VALADOC_API_PROPERTY_GETTER_PROPERTY,
	VALADOC_API_PROPERTY_BASE_PROPERTY_PROPERTY,
	VALADOC_API_PROPERTY_NODE_TYPE_PROPERTY,
	VALADOC_API_PROPERTY_NUM_PROPERTIES
};
static GParamSpec* valadoc_api_property_properties[VALADOC_API_PROPERTY_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _valadoc_api_signature_builder_unref0(var) ((var == NULL) ? NULL : (var = (valadoc_api_signature_builder_unref (var), NULL)))

struct _ValadocApiPropertyPrivate {
	ValadocApiPropertyBindingType binding_type;
	gchar* dbus_name;
	gchar* cname;
	ValadocApiTypeReference* _property_type;
	gboolean _is_dbus_visible;
	ValadocApiPropertyAccessor* _setter;
	ValadocApiPropertyAccessor* _getter;
	ValadocApiProperty* _base_property;
};


static gpointer valadoc_api_property_parent_class = NULL;

#define VALADOC_API_PROPERTY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALADOC_API_TYPE_PROPERTY, ValadocApiPropertyPrivate))
static void valadoc_api_property_set_is_dbus_visible (ValadocApiProperty* self, gboolean value);
static void valadoc_api_property_real_parse_comments (ValadocApiItem* base, ValadocSettings* settings, ValadocDocumentationParser* parser);
G_GNUC_INTERNAL void valadoc_api_item_parse_comments (ValadocApiItem* self, ValadocSettings* settings, ValadocDocumentationParser* parser);
static void valadoc_api_property_real_check_comments (ValadocApiItem* base, ValadocSettings* settings, ValadocDocumentationParser* parser);
G_GNUC_INTERNAL void valadoc_api_item_check_comments (ValadocApiItem* self, ValadocSettings* settings, ValadocDocumentationParser* parser);
static ValadocContentInline* valadoc_api_property_real_build_signature (ValadocApiItem* base);
static void valadoc_api_property_real_accept (ValadocApiNode* base, ValadocApiVisitor* visitor);
static void valadoc_api_property_finalize (GObject * obj);
static void _vala_valadoc_api_property_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_valadoc_api_property_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


ValadocApiProperty* valadoc_api_property_construct (GType object_type, ValadocApiNode* parent, ValadocApiSourceFile* file, const gchar* name, ValadocApiSymbolAccessibility accessibility, ValadocApiSourceComment* comment, const gchar* cname, const gchar* dbus_name, gboolean is_dbus_visible, ValadocApiPropertyBindingType binding_type, void* data) {
	ValadocApiProperty * self = NULL;
	ValadocApiNode* _tmp0_;
	ValadocApiSourceFile* _tmp1_;
	const gchar* _tmp2_;
	ValadocApiSymbolAccessibility _tmp3_;
	ValadocApiSourceComment* _tmp4_;
	void* _tmp5_;
	gboolean _tmp6_;
	ValadocApiPropertyBindingType _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	g_return_val_if_fail (parent != NULL, NULL);
	g_return_val_if_fail (file != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = parent;
	_tmp1_ = file;
	_tmp2_ = name;
	_tmp3_ = accessibility;
	_tmp4_ = comment;
	_tmp5_ = data;
	self = (ValadocApiProperty*) valadoc_api_member_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_);
	_tmp6_ = is_dbus_visible;
	valadoc_api_property_set_is_dbus_visible (self, _tmp6_);
	_tmp7_ = binding_type;
	self->priv->binding_type = _tmp7_;
	_tmp8_ = dbus_name;
	_tmp9_ = g_strdup (_tmp8_);
	_g_free0 (self->priv->dbus_name);
	self->priv->dbus_name = _tmp9_;
	_tmp10_ = cname;
	_tmp11_ = g_strdup (_tmp10_);
	_g_free0 (self->priv->cname);
	self->priv->cname = _tmp11_;
	return self;
}


ValadocApiProperty* valadoc_api_property_new (ValadocApiNode* parent, ValadocApiSourceFile* file, const gchar* name, ValadocApiSymbolAccessibility accessibility, ValadocApiSourceComment* comment, const gchar* cname, const gchar* dbus_name, gboolean is_dbus_visible, ValadocApiPropertyBindingType binding_type, void* data) {
	return valadoc_api_property_construct (VALADOC_API_TYPE_PROPERTY, parent, file, name, accessibility, comment, cname, dbus_name, is_dbus_visible, binding_type, data);
}


/**
 * Returns the name of this method as it is used in C.
 */
gchar* valadoc_api_property_get_cname (ValadocApiProperty* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->cname;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * Returns the dbus-name.
 */
gchar* valadoc_api_property_get_dbus_name (ValadocApiProperty* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->dbus_name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * {@inheritDoc}
 */
static void valadoc_api_property_real_parse_comments (ValadocApiItem* base, ValadocSettings* settings, ValadocDocumentationParser* parser) {
	ValadocApiProperty * self;
	gboolean _tmp0_ = FALSE;
	ValadocApiPropertyAccessor* _tmp1_;
	gboolean _tmp8_ = FALSE;
	ValadocApiPropertyAccessor* _tmp9_;
	ValadocSettings* _tmp16_;
	ValadocDocumentationParser* _tmp17_;
	self = (ValadocApiProperty*) base;
	g_return_if_fail (settings != NULL);
	g_return_if_fail (parser != NULL);
	_tmp1_ = self->priv->_getter;
	if (_tmp1_ != NULL) {
		ValadocApiPropertyAccessor* _tmp2_;
		ValadocSettings* _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->priv->_getter;
		_tmp3_ = settings;
		_tmp4_ = valadoc_api_node_is_browsable ((ValadocApiNode*) _tmp2_, _tmp3_);
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ValadocApiPropertyAccessor* _tmp5_;
		ValadocSettings* _tmp6_;
		ValadocDocumentationParser* _tmp7_;
		_tmp5_ = self->priv->_getter;
		_tmp6_ = settings;
		_tmp7_ = parser;
		valadoc_api_item_parse_comments ((ValadocApiItem*) _tmp5_, _tmp6_, _tmp7_);
	}
	_tmp9_ = self->priv->_setter;
	if (_tmp9_ != NULL) {
		ValadocApiPropertyAccessor* _tmp10_;
		ValadocSettings* _tmp11_;
		gboolean _tmp12_;
		_tmp10_ = self->priv->_setter;
		_tmp11_ = settings;
		_tmp12_ = valadoc_api_node_is_browsable ((ValadocApiNode*) _tmp10_, _tmp11_);
		_tmp8_ = _tmp12_;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		ValadocApiPropertyAccessor* _tmp13_;
		ValadocSettings* _tmp14_;
		ValadocDocumentationParser* _tmp15_;
		_tmp13_ = self->priv->_setter;
		_tmp14_ = settings;
		_tmp15_ = parser;
		valadoc_api_item_parse_comments ((ValadocApiItem*) _tmp13_, _tmp14_, _tmp15_);
	}
	_tmp16_ = settings;
	_tmp17_ = parser;
	VALADOC_API_ITEM_CLASS (valadoc_api_property_parent_class)->parse_comments ((ValadocApiItem*) G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_API_TYPE_MEMBER, ValadocApiMember), _tmp16_, _tmp17_);
}


/**
 * {@inheritDoc}
 */
static void valadoc_api_property_real_check_comments (ValadocApiItem* base, ValadocSettings* settings, ValadocDocumentationParser* parser) {
	ValadocApiProperty * self;
	gboolean _tmp0_ = FALSE;
	ValadocApiPropertyAccessor* _tmp1_;
	gboolean _tmp8_ = FALSE;
	ValadocApiPropertyAccessor* _tmp9_;
	ValadocSettings* _tmp16_;
	ValadocDocumentationParser* _tmp17_;
	self = (ValadocApiProperty*) base;
	g_return_if_fail (settings != NULL);
	g_return_if_fail (parser != NULL);
	_tmp1_ = self->priv->_getter;
	if (_tmp1_ != NULL) {
		ValadocApiPropertyAccessor* _tmp2_;
		ValadocSettings* _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->priv->_getter;
		_tmp3_ = settings;
		_tmp4_ = valadoc_api_node_is_browsable ((ValadocApiNode*) _tmp2_, _tmp3_);
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ValadocApiPropertyAccessor* _tmp5_;
		ValadocSettings* _tmp6_;
		ValadocDocumentationParser* _tmp7_;
		_tmp5_ = self->priv->_getter;
		_tmp6_ = settings;
		_tmp7_ = parser;
		valadoc_api_item_check_comments ((ValadocApiItem*) _tmp5_, _tmp6_, _tmp7_);
	}
	_tmp9_ = self->priv->_setter;
	if (_tmp9_ != NULL) {
		ValadocApiPropertyAccessor* _tmp10_;
		ValadocSettings* _tmp11_;
		gboolean _tmp12_;
		_tmp10_ = self->priv->_setter;
		_tmp11_ = settings;
		_tmp12_ = valadoc_api_node_is_browsable ((ValadocApiNode*) _tmp10_, _tmp11_);
		_tmp8_ = _tmp12_;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		ValadocApiPropertyAccessor* _tmp13_;
		ValadocSettings* _tmp14_;
		ValadocDocumentationParser* _tmp15_;
		_tmp13_ = self->priv->_setter;
		_tmp14_ = settings;
		_tmp15_ = parser;
		valadoc_api_item_check_comments ((ValadocApiItem*) _tmp13_, _tmp14_, _tmp15_);
	}
	_tmp16_ = settings;
	_tmp17_ = parser;
	VALADOC_API_ITEM_CLASS (valadoc_api_property_parent_class)->check_comments ((ValadocApiItem*) G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_API_TYPE_MEMBER, ValadocApiMember), _tmp16_, _tmp17_);
}


/**
 * {@inheritDoc}
 */
static ValadocContentInline* valadoc_api_property_real_build_signature (ValadocApiItem* base) {
	ValadocApiProperty * self;
	ValadocContentInline* result = NULL;
	ValadocApiSignatureBuilder* signature = NULL;
	ValadocApiSignatureBuilder* _tmp0_;
	ValadocApiSignatureBuilder* _tmp1_;
	ValadocApiSymbolAccessibility _tmp2_;
	ValadocApiSymbolAccessibility _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ValadocApiSignatureBuilder* _tmp6_;
	ValadocApiSignatureBuilder* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	ValadocApiSignatureBuilder* _tmp23_;
	ValadocApiTypeReference* _tmp24_;
	ValadocContentInline* _tmp25_;
	ValadocContentInline* _tmp26_;
	ValadocApiSignatureBuilder* _tmp27_;
	ValadocApiSignatureBuilder* _tmp28_;
	ValadocApiSignatureBuilder* _tmp29_;
	ValadocApiSignatureBuilder* _tmp30_;
	ValadocApiSignatureBuilder* _tmp31_;
	ValadocApiSignatureBuilder* _tmp32_;
	ValadocApiSignatureBuilder* _tmp33_;
	ValadocApiSignatureBuilder* _tmp34_;
	gboolean _tmp35_ = FALSE;
	ValadocApiPropertyAccessor* _tmp36_;
	gboolean _tmp45_ = FALSE;
	ValadocApiPropertyAccessor* _tmp46_;
	ValadocApiSignatureBuilder* _tmp55_;
	ValadocApiSignatureBuilder* _tmp56_;
	ValadocApiSignatureBuilder* _tmp57_;
	ValadocApiSignatureBuilder* _tmp58_;
	ValadocContentRun* _tmp59_;
	self = (ValadocApiProperty*) base;
	_tmp0_ = valadoc_api_signature_builder_new ();
	signature = _tmp0_;
	_tmp1_ = signature;
	_tmp2_ = valadoc_api_symbol_get_accessibility ((ValadocApiSymbol*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = valadoc_api_symbol_accessibility_to_string (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_api_signature_builder_append_keyword (_tmp1_, _tmp5_, TRUE);
	_tmp7_ = _tmp6_;
	_valadoc_api_signature_builder_unref0 (_tmp7_);
	_g_free0 (_tmp5_);
	_tmp8_ = valadoc_api_property_get_is_abstract (self);
	_tmp9_ = _tmp8_;
	if (_tmp9_) {
		ValadocApiSignatureBuilder* _tmp10_;
		ValadocApiSignatureBuilder* _tmp11_;
		ValadocApiSignatureBuilder* _tmp12_;
		_tmp10_ = signature;
		_tmp11_ = valadoc_api_signature_builder_append_keyword (_tmp10_, "abstract", TRUE);
		_tmp12_ = _tmp11_;
		_valadoc_api_signature_builder_unref0 (_tmp12_);
	} else {
		gboolean _tmp13_;
		gboolean _tmp14_;
		_tmp13_ = valadoc_api_property_get_is_override (self);
		_tmp14_ = _tmp13_;
		if (_tmp14_) {
			ValadocApiSignatureBuilder* _tmp15_;
			ValadocApiSignatureBuilder* _tmp16_;
			ValadocApiSignatureBuilder* _tmp17_;
			_tmp15_ = signature;
			_tmp16_ = valadoc_api_signature_builder_append_keyword (_tmp15_, "override", TRUE);
			_tmp17_ = _tmp16_;
			_valadoc_api_signature_builder_unref0 (_tmp17_);
		} else {
			gboolean _tmp18_;
			gboolean _tmp19_;
			_tmp18_ = valadoc_api_property_get_is_virtual (self);
			_tmp19_ = _tmp18_;
			if (_tmp19_) {
				ValadocApiSignatureBuilder* _tmp20_;
				ValadocApiSignatureBuilder* _tmp21_;
				ValadocApiSignatureBuilder* _tmp22_;
				_tmp20_ = signature;
				_tmp21_ = valadoc_api_signature_builder_append_keyword (_tmp20_, "virtual", TRUE);
				_tmp22_ = _tmp21_;
				_valadoc_api_signature_builder_unref0 (_tmp22_);
			}
		}
	}
	_tmp23_ = signature;
	_tmp24_ = self->priv->_property_type;
	_tmp25_ = valadoc_api_item_get_signature ((ValadocApiItem*) _tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = valadoc_api_signature_builder_append_content (_tmp23_, _tmp26_, TRUE);
	_tmp28_ = _tmp27_;
	_valadoc_api_signature_builder_unref0 (_tmp28_);
	_tmp29_ = signature;
	_tmp30_ = valadoc_api_signature_builder_append_symbol (_tmp29_, (ValadocApiNode*) self, TRUE);
	_tmp31_ = _tmp30_;
	_valadoc_api_signature_builder_unref0 (_tmp31_);
	_tmp32_ = signature;
	_tmp33_ = valadoc_api_signature_builder_append (_tmp32_, "{", TRUE);
	_tmp34_ = _tmp33_;
	_valadoc_api_signature_builder_unref0 (_tmp34_);
	_tmp36_ = self->priv->_setter;
	if (_tmp36_ != NULL) {
		ValadocApiPropertyAccessor* _tmp37_;
		gboolean _tmp38_;
		_tmp37_ = self->priv->_setter;
		_tmp38_ = ((ValadocApiNode*) _tmp37_)->do_document;
		_tmp35_ = _tmp38_;
	} else {
		_tmp35_ = FALSE;
	}
	if (_tmp35_) {
		ValadocApiSignatureBuilder* _tmp39_;
		ValadocApiPropertyAccessor* _tmp40_;
		ValadocContentInline* _tmp41_;
		ValadocContentInline* _tmp42_;
		ValadocApiSignatureBuilder* _tmp43_;
		ValadocApiSignatureBuilder* _tmp44_;
		_tmp39_ = signature;
		_tmp40_ = self->priv->_setter;
		_tmp41_ = valadoc_api_item_get_signature ((ValadocApiItem*) _tmp40_);
		_tmp42_ = _tmp41_;
		_tmp43_ = valadoc_api_signature_builder_append_content (_tmp39_, _tmp42_, TRUE);
		_tmp44_ = _tmp43_;
		_valadoc_api_signature_builder_unref0 (_tmp44_);
	}
	_tmp46_ = self->priv->_getter;
	if (_tmp46_ != NULL) {
		ValadocApiPropertyAccessor* _tmp47_;
		gboolean _tmp48_;
		_tmp47_ = self->priv->_getter;
		_tmp48_ = ((ValadocApiNode*) _tmp47_)->do_document;
		_tmp45_ = _tmp48_;
	} else {
		_tmp45_ = FALSE;
	}
	if (_tmp45_) {
		ValadocApiSignatureBuilder* _tmp49_;
		ValadocApiPropertyAccessor* _tmp50_;
		ValadocContentInline* _tmp51_;
		ValadocContentInline* _tmp52_;
		ValadocApiSignatureBuilder* _tmp53_;
		ValadocApiSignatureBuilder* _tmp54_;
		_tmp49_ = signature;
		_tmp50_ = self->priv->_getter;
		_tmp51_ = valadoc_api_item_get_signature ((ValadocApiItem*) _tmp50_);
		_tmp52_ = _tmp51_;
		_tmp53_ = valadoc_api_signature_builder_append_content (_tmp49_, _tmp52_, TRUE);
		_tmp54_ = _tmp53_;
		_valadoc_api_signature_builder_unref0 (_tmp54_);
	}
	_tmp55_ = signature;
	_tmp56_ = valadoc_api_signature_builder_append (_tmp55_, "}", TRUE);
	_tmp57_ = _tmp56_;
	_valadoc_api_signature_builder_unref0 (_tmp57_);
	_tmp58_ = signature;
	_tmp59_ = valadoc_api_signature_builder_get (_tmp58_);
	result = (ValadocContentInline*) _tmp59_;
	_valadoc_api_signature_builder_unref0 (signature);
	return result;
}


/**
 * {@inheritDoc}
 */
static void valadoc_api_property_real_accept (ValadocApiNode* base, ValadocApiVisitor* visitor) {
	ValadocApiProperty * self;
	ValadocApiVisitor* _tmp0_;
	self = (ValadocApiProperty*) base;
	g_return_if_fail (visitor != NULL);
	_tmp0_ = visitor;
	valadoc_api_visitor_visit_property (_tmp0_, self);
}


ValadocApiTypeReference* valadoc_api_property_get_property_type (ValadocApiProperty* self) {
	ValadocApiTypeReference* result;
	ValadocApiTypeReference* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_property_type;
	result = _tmp0_;
	return result;
}


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


void valadoc_api_property_set_property_type (ValadocApiProperty* self, ValadocApiTypeReference* value) {
	g_return_if_fail (self != NULL);
	if (valadoc_api_property_get_property_type (self) != value) {
		ValadocApiTypeReference* _tmp0_;
		ValadocApiTypeReference* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_property_type);
		self->priv->_property_type = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_property_properties[VALADOC_API_PROPERTY_PROPERTY_TYPE_PROPERTY]);
	}
}


gboolean valadoc_api_property_get_is_virtual (ValadocApiProperty* self) {
	gboolean result;
	ValadocApiPropertyBindingType _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->binding_type;
	result = _tmp0_ == VALADOC_API_PROPERTY_BINDING_TYPE_VIRTUAL;
	return result;
}


gboolean valadoc_api_property_get_is_abstract (ValadocApiProperty* self) {
	gboolean result;
	ValadocApiPropertyBindingType _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->binding_type;
	result = _tmp0_ == VALADOC_API_PROPERTY_BINDING_TYPE_ABSTRACT;
	return result;
}


gboolean valadoc_api_property_get_is_override (ValadocApiProperty* self) {
	gboolean result;
	ValadocApiPropertyBindingType _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->binding_type;
	result = _tmp0_ == VALADOC_API_PROPERTY_BINDING_TYPE_OVERRIDE;
	return result;
}


gboolean valadoc_api_property_get_is_dbus_visible (ValadocApiProperty* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_is_dbus_visible;
	result = _tmp0_;
	return result;
}


static void valadoc_api_property_set_is_dbus_visible (ValadocApiProperty* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (valadoc_api_property_get_is_dbus_visible (self) != value) {
		gboolean _tmp0_;
		_tmp0_ = value;
		self->priv->_is_dbus_visible = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_property_properties[VALADOC_API_PROPERTY_IS_DBUS_VISIBLE_PROPERTY]);
	}
}


ValadocApiPropertyAccessor* valadoc_api_property_get_setter (ValadocApiProperty* self) {
	ValadocApiPropertyAccessor* result;
	ValadocApiPropertyAccessor* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_setter;
	result = _tmp0_;
	return result;
}


void valadoc_api_property_set_setter (ValadocApiProperty* self, ValadocApiPropertyAccessor* value) {
	g_return_if_fail (self != NULL);
	if (valadoc_api_property_get_setter (self) != value) {
		ValadocApiPropertyAccessor* _tmp0_;
		ValadocApiPropertyAccessor* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_setter);
		self->priv->_setter = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_property_properties[VALADOC_API_PROPERTY_SETTER_PROPERTY]);
	}
}


ValadocApiPropertyAccessor* valadoc_api_property_get_getter (ValadocApiProperty* self) {
	ValadocApiPropertyAccessor* result;
	ValadocApiPropertyAccessor* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_getter;
	result = _tmp0_;
	return result;
}


void valadoc_api_property_set_getter (ValadocApiProperty* self, ValadocApiPropertyAccessor* value) {
	g_return_if_fail (self != NULL);
	if (valadoc_api_property_get_getter (self) != value) {
		ValadocApiPropertyAccessor* _tmp0_;
		ValadocApiPropertyAccessor* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_getter);
		self->priv->_getter = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_property_properties[VALADOC_API_PROPERTY_GETTER_PROPERTY]);
	}
}


ValadocApiProperty* valadoc_api_property_get_base_property (ValadocApiProperty* self) {
	ValadocApiProperty* result;
	ValadocApiProperty* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_base_property;
	result = _tmp0_;
	return result;
}


void valadoc_api_property_set_base_property (ValadocApiProperty* self, ValadocApiProperty* value) {
	g_return_if_fail (self != NULL);
	if (valadoc_api_property_get_base_property (self) != value) {
		ValadocApiProperty* _tmp0_;
		ValadocApiProperty* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_base_property);
		self->priv->_base_property = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_property_properties[VALADOC_API_PROPERTY_BASE_PROPERTY_PROPERTY]);
	}
}


static ValadocApiNodeType valadoc_api_property_real_get_node_type (ValadocApiNode* base) {
	ValadocApiNodeType result;
	ValadocApiProperty* self;
	self = (ValadocApiProperty*) base;
	result = VALADOC_API_NODE_TYPE_PROPERTY;
	return result;
}


static void valadoc_api_property_class_init (ValadocApiPropertyClass * klass) {
	valadoc_api_property_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ValadocApiPropertyPrivate));
	((ValadocApiItemClass *) klass)->parse_comments = (void (*) (ValadocApiItem *, ValadocSettings*, ValadocDocumentationParser*)) valadoc_api_property_real_parse_comments;
	((ValadocApiItemClass *) klass)->check_comments = (void (*) (ValadocApiItem *, ValadocSettings*, ValadocDocumentationParser*)) valadoc_api_property_real_check_comments;
	((ValadocApiItemClass *) klass)->build_signature = (ValadocContentInline* (*) (ValadocApiItem *)) valadoc_api_property_real_build_signature;
	((ValadocApiNodeClass *) klass)->accept = (void (*) (ValadocApiNode *, ValadocApiVisitor*)) valadoc_api_property_real_accept;
	VALADOC_API_NODE_CLASS (klass)->get_node_type = valadoc_api_property_real_get_node_type;
	G_OBJECT_CLASS (klass)->get_property = _vala_valadoc_api_property_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_valadoc_api_property_set_property;
	G_OBJECT_CLASS (klass)->finalize = valadoc_api_property_finalize;
	/**
	 * The property type.
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_PROPERTY_PROPERTY_TYPE_PROPERTY, valadoc_api_property_properties[VALADOC_API_PROPERTY_PROPERTY_TYPE_PROPERTY] = g_param_spec_object ("property-type", "property-type", "property-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 property is virtual.
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_PROPERTY_IS_VIRTUAL_PROPERTY, valadoc_api_property_properties[VALADOC_API_PROPERTY_IS_VIRTUAL_PROPERTY] = g_param_spec_boolean ("is-virtual", "is-virtual", "is-virtual", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * Specifies whether the property is abstract.
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_PROPERTY_IS_ABSTRACT_PROPERTY, valadoc_api_property_properties[VALADOC_API_PROPERTY_IS_ABSTRACT_PROPERTY] = g_param_spec_boolean ("is-abstract", "is-abstract", "is-abstract", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * Specifies whether the property is override.
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_PROPERTY_IS_OVERRIDE_PROPERTY, valadoc_api_property_properties[VALADOC_API_PROPERTY_IS_OVERRIDE_PROPERTY] = g_param_spec_boolean ("is-override", "is-override", "is-override", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * Specifies whether the property is visible.
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_PROPERTY_IS_DBUS_VISIBLE_PROPERTY, valadoc_api_property_properties[VALADOC_API_PROPERTY_IS_DBUS_VISIBLE_PROPERTY] = g_param_spec_boolean ("is-dbus-visible", "is-dbus-visible", "is-dbus-visible", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_PROPERTY_SETTER_PROPERTY, valadoc_api_property_properties[VALADOC_API_PROPERTY_SETTER_PROPERTY] = g_param_spec_object ("setter", "setter", "setter", VALADOC_API_TYPE_PROPERTY_ACCESSOR, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_PROPERTY_GETTER_PROPERTY, valadoc_api_property_properties[VALADOC_API_PROPERTY_GETTER_PROPERTY] = g_param_spec_object ("getter", "getter", "getter", VALADOC_API_TYPE_PROPERTY_ACCESSOR, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * Specifies the virtual or abstract property this property overrides.
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_PROPERTY_BASE_PROPERTY_PROPERTY, valadoc_api_property_properties[VALADOC_API_PROPERTY_BASE_PROPERTY_PROPERTY] = g_param_spec_object ("base-property", "base-property", "base-property", VALADOC_API_TYPE_PROPERTY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * {@inheritDoc}
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_PROPERTY_NODE_TYPE_PROPERTY, valadoc_api_property_properties[VALADOC_API_PROPERTY_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_property_instance_init (ValadocApiProperty * self) {
	self->priv = VALADOC_API_PROPERTY_GET_PRIVATE (self);
}


static void valadoc_api_property_finalize (GObject * obj) {
	ValadocApiProperty * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_API_TYPE_PROPERTY, ValadocApiProperty);
	_g_free0 (self->priv->dbus_name);
	_g_free0 (self->priv->cname);
	_g_object_unref0 (self->priv->_property_type);
	_g_object_unref0 (self->priv->_setter);
	_g_object_unref0 (self->priv->_getter);
	_g_object_unref0 (self->priv->_base_property);
	G_OBJECT_CLASS (valadoc_api_property_parent_class)->finalize (obj);
}


/**
 * Represents a property declaration.
 */
GType valadoc_api_property_get_type (void) {
	static volatile gsize valadoc_api_property_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_api_property_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocApiPropertyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_api_property_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocApiProperty), 0, (GInstanceInitFunc) valadoc_api_property_instance_init, NULL };
		GType valadoc_api_property_type_id;
		valadoc_api_property_type_id = g_type_register_static (VALADOC_API_TYPE_MEMBER, "ValadocApiProperty", &g_define_type_info, 0);
		g_once_init_leave (&valadoc_api_property_type_id__volatile, valadoc_api_property_type_id);
	}
	return valadoc_api_property_type_id__volatile;
}


static void _vala_valadoc_api_property_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ValadocApiProperty * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_API_TYPE_PROPERTY, ValadocApiProperty);
	switch (property_id) {
		case VALADOC_API_PROPERTY_PROPERTY_TYPE_PROPERTY:
		g_value_set_object (value, valadoc_api_property_get_property_type (self));
		break;
		case VALADOC_API_PROPERTY_IS_VIRTUAL_PROPERTY:
		g_value_set_boolean (value, valadoc_api_property_get_is_virtual (self));
		break;
		case VALADOC_API_PROPERTY_IS_ABSTRACT_PROPERTY:
		g_value_set_boolean (value, valadoc_api_property_get_is_abstract (self));
		break;
		case VALADOC_API_PROPERTY_IS_OVERRIDE_PROPERTY:
		g_value_set_boolean (value, valadoc_api_property_get_is_override (self));
		break;
		case VALADOC_API_PROPERTY_IS_DBUS_VISIBLE_PROPERTY:
		g_value_set_boolean (value, valadoc_api_property_get_is_dbus_visible (self));
		break;
		case VALADOC_API_PROPERTY_SETTER_PROPERTY:
		g_value_set_object (value, valadoc_api_property_get_setter (self));
		break;
		case VALADOC_API_PROPERTY_GETTER_PROPERTY:
		g_value_set_object (value, valadoc_api_property_get_getter (self));
		break;
		case VALADOC_API_PROPERTY_BASE_PROPERTY_PROPERTY:
		g_value_set_object (value, valadoc_api_property_get_base_property (self));
		break;
		case VALADOC_API_PROPERTY_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_property_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ValadocApiProperty * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_API_TYPE_PROPERTY, ValadocApiProperty);
	switch (property_id) {
		case VALADOC_API_PROPERTY_PROPERTY_TYPE_PROPERTY:
		valadoc_api_property_set_property_type (self, g_value_get_object (value));
		break;
		case VALADOC_API_PROPERTY_IS_DBUS_VISIBLE_PROPERTY:
		valadoc_api_property_set_is_dbus_visible (self, g_value_get_boolean (value));
		break;
		case VALADOC_API_PROPERTY_SETTER_PROPERTY:
		valadoc_api_property_set_setter (self, g_value_get_object (value));
		break;
		case VALADOC_API_PROPERTY_GETTER_PROPERTY:
		valadoc_api_property_set_getter (self, g_value_get_object (value));
		break;
		case VALADOC_API_PROPERTY_BASE_PROPERTY_PROPERTY:
		valadoc_api_property_set_base_property (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



