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

/* struct.vala
 *
 * Copyright (C) 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>
#include <valagee.h>

enum  {
	VALADOC_API_STRUCT_0_PROPERTY,
	VALADOC_API_STRUCT_BASE_TYPE_PROPERTY,
	VALADOC_API_STRUCT_NODE_TYPE_PROPERTY,
	VALADOC_API_STRUCT_NUM_PROPERTIES
};
static GParamSpec* valadoc_api_struct_properties[VALADOC_API_STRUCT_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 _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _valadoc_api_signature_builder_unref0(var) ((var == NULL) ? NULL : (var = (valadoc_api_signature_builder_unref (var), NULL)))

struct _ValadocApiStructPrivate {
	gchar* dup_function_cname;
	gchar* copy_function_cname;
	gchar* free_function_cname;
	gchar* destroy_function_cname;
	gchar* type_id;
	gchar* cname;
	ValadocApiTypeReference* _base_type;
	ValaSet* _known_child_structs;
};


static gpointer valadoc_api_struct_parent_class = NULL;

#define VALADOC_API_STRUCT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALADOC_API_TYPE_STRUCT, ValadocApiStructPrivate))
static void valadoc_api_struct_real_accept (ValadocApiNode* base, ValadocApiVisitor* visitor);
static ValadocContentInline* valadoc_api_struct_real_build_signature (ValadocApiItem* base);
static void valadoc_api_struct_finalize (GObject * obj);
static void _vala_valadoc_api_struct_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_valadoc_api_struct_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


ValadocApiStruct* valadoc_api_struct_construct (GType object_type, ValadocApiNode* parent, ValadocApiSourceFile* file, const gchar* name, ValadocApiSymbolAccessibility accessibility, ValadocApiSourceComment* comment, const gchar* cname, const gchar* type_macro_name, const gchar* type_function_name, const gchar* type_id, const gchar* dup_function_cname, const gchar* copy_function_cname, const gchar* destroy_function_cname, const gchar* free_function_cname, gboolean is_basic_type, void* data) {
	ValadocApiStruct * self = NULL;
	ValadocApiNode* _tmp0_;
	ValadocApiSourceFile* _tmp1_;
	const gchar* _tmp2_;
	ValadocApiSymbolAccessibility _tmp3_;
	ValadocApiSourceComment* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gboolean _tmp7_;
	void* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	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_ = type_macro_name;
	_tmp6_ = type_function_name;
	_tmp7_ = is_basic_type;
	_tmp8_ = data;
	self = (ValadocApiStruct*) valadoc_api_typesymbol_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, NULL, NULL, _tmp6_, _tmp7_, _tmp8_);
	_tmp9_ = dup_function_cname;
	_tmp10_ = g_strdup (_tmp9_);
	_g_free0 (self->priv->dup_function_cname);
	self->priv->dup_function_cname = _tmp10_;
	_tmp11_ = copy_function_cname;
	_tmp12_ = g_strdup (_tmp11_);
	_g_free0 (self->priv->copy_function_cname);
	self->priv->copy_function_cname = _tmp12_;
	_tmp13_ = free_function_cname;
	_tmp14_ = g_strdup (_tmp13_);
	_g_free0 (self->priv->free_function_cname);
	self->priv->free_function_cname = _tmp14_;
	_tmp15_ = destroy_function_cname;
	_tmp16_ = g_strdup (_tmp15_);
	_g_free0 (self->priv->destroy_function_cname);
	self->priv->destroy_function_cname = _tmp16_;
	_tmp17_ = cname;
	_tmp18_ = g_strdup (_tmp17_);
	_g_free0 (self->priv->cname);
	self->priv->cname = _tmp18_;
	return self;
}


ValadocApiStruct* valadoc_api_struct_new (ValadocApiNode* parent, ValadocApiSourceFile* file, const gchar* name, ValadocApiSymbolAccessibility accessibility, ValadocApiSourceComment* comment, const gchar* cname, const gchar* type_macro_name, const gchar* type_function_name, const gchar* type_id, const gchar* dup_function_cname, const gchar* copy_function_cname, const gchar* destroy_function_cname, const gchar* free_function_cname, gboolean is_basic_type, void* data) {
	return valadoc_api_struct_construct (VALADOC_API_TYPE_STRUCT, parent, file, name, accessibility, comment, cname, type_macro_name, type_function_name, type_id, dup_function_cname, copy_function_cname, destroy_function_cname, free_function_cname, is_basic_type, data);
}


/**
 * Returns the name of this struct as it is used in C.
 */
gchar* valadoc_api_struct_get_cname (ValadocApiStruct* 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 C symbol representing the runtime type id for this data type.
 */
gchar* valadoc_api_struct_get_type_id (ValadocApiStruct* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->type_id;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * Returns the C function name that duplicates instances of this data
 * type.
 */
gchar* valadoc_api_struct_get_dup_function_cname (ValadocApiStruct* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->dup_function_cname;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * Returns the C function name that copies instances of this data
 * type.
 */
gchar* valadoc_api_struct_get_copy_function_cname (ValadocApiStruct* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->copy_function_cname;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * Returns the C function name that frees instances of this data type.
 */
gchar* valadoc_api_struct_get_free_function_cname (ValadocApiStruct* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->free_function_cname;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * Returns the C function name that destroys instances of this data type.
 */
gchar* valadoc_api_struct_get_destroy_function_cname (ValadocApiStruct* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->destroy_function_cname;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * {@inheritDoc}
 */
static void valadoc_api_struct_real_accept (ValadocApiNode* base, ValadocApiVisitor* visitor) {
	ValadocApiStruct * self;
	ValadocApiVisitor* _tmp0_;
	self = (ValadocApiStruct*) base;
	g_return_if_fail (visitor != NULL);
	_tmp0_ = visitor;
	valadoc_api_visitor_visit_struct (_tmp0_, self);
}


/**
 * Returns a list of all known structs based on this struct
 */
static gpointer _vala_iterable_ref0 (gpointer self) {
	return self ? vala_iterable_ref (self) : NULL;
}


ValaCollection* valadoc_api_struct_get_known_child_structs (ValadocApiStruct* self) {
	ValaCollection* result = NULL;
	ValaSet* _tmp0_;
	ValaCollection* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_known_child_structs;
	_tmp1_ = _vala_iterable_ref0 ((ValaCollection*) _tmp0_);
	result = _tmp1_;
	return result;
}


void valadoc_api_struct_register_child_struct (ValadocApiStruct* self, ValadocApiStruct* stru) {
	ValadocApiTypeReference* _tmp0_;
	ValaSet* _tmp5_;
	ValadocApiStruct* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stru != NULL);
	_tmp0_ = self->priv->_base_type;
	if (_tmp0_ != NULL) {
		ValadocApiTypeReference* _tmp1_;
		ValadocApiItem* _tmp2_;
		ValadocApiItem* _tmp3_;
		ValadocApiStruct* _tmp4_;
		_tmp1_ = self->priv->_base_type;
		_tmp2_ = valadoc_api_typereference_get_data_type (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = stru;
		valadoc_api_struct_register_child_struct (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, VALADOC_API_TYPE_STRUCT, ValadocApiStruct), _tmp4_);
	}
	_tmp5_ = self->priv->_known_child_structs;
	_tmp6_ = stru;
	vala_collection_add ((ValaCollection*) _tmp5_, _tmp6_);
}


/**
 * {@inheritDoc}
 */
static ValadocContentInline* valadoc_api_struct_real_build_signature (ValadocApiItem* base) {
	ValadocApiStruct * self;
	ValadocContentInline* result = NULL;
	ValadocApiSignatureBuilder* signature = NULL;
	ValadocApiSignatureBuilder* _tmp0_;
	ValadocApiSignatureBuilder* _tmp1_;
	ValadocApiSymbolAccessibility _tmp2_;
	ValadocApiSymbolAccessibility _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ValadocApiSignatureBuilder* _tmp6_;
	ValadocApiSignatureBuilder* _tmp7_;
	ValadocApiSignatureBuilder* _tmp8_;
	ValadocApiSignatureBuilder* _tmp9_;
	ValadocApiSignatureBuilder* _tmp10_;
	ValadocApiSignatureBuilder* _tmp11_;
	ValadocApiSignatureBuilder* _tmp12_;
	ValadocApiSignatureBuilder* _tmp13_;
	ValaList* type_parameters = NULL;
	ValaList* _tmp14_;
	ValaList* _tmp15_;
	gint _tmp16_;
	gint _tmp17_;
	ValadocApiTypeReference* _tmp45_;
	ValadocApiSignatureBuilder* _tmp55_;
	ValadocContentRun* _tmp56_;
	self = (ValadocApiStruct*) 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_ = signature;
	_tmp9_ = valadoc_api_signature_builder_append_keyword (_tmp8_, "struct", TRUE);
	_tmp10_ = _tmp9_;
	_valadoc_api_signature_builder_unref0 (_tmp10_);
	_tmp11_ = signature;
	_tmp12_ = valadoc_api_signature_builder_append_symbol (_tmp11_, (ValadocApiNode*) self, TRUE);
	_tmp13_ = _tmp12_;
	_valadoc_api_signature_builder_unref0 (_tmp13_);
	_tmp14_ = valadoc_api_node_get_children_by_type ((ValadocApiNode*) self, VALADOC_API_NODE_TYPE_TYPE_PARAMETER, FALSE);
	type_parameters = _tmp14_;
	_tmp15_ = type_parameters;
	_tmp16_ = vala_collection_get_size ((ValaCollection*) _tmp15_);
	_tmp17_ = _tmp16_;
	if (_tmp17_ > 0) {
		ValadocApiSignatureBuilder* _tmp18_;
		ValadocApiSignatureBuilder* _tmp19_;
		ValadocApiSignatureBuilder* _tmp20_;
		gboolean first = FALSE;
		ValadocApiSignatureBuilder* _tmp42_;
		ValadocApiSignatureBuilder* _tmp43_;
		ValadocApiSignatureBuilder* _tmp44_;
		_tmp18_ = signature;
		_tmp19_ = valadoc_api_signature_builder_append (_tmp18_, "<", FALSE);
		_tmp20_ = _tmp19_;
		_valadoc_api_signature_builder_unref0 (_tmp20_);
		first = TRUE;
		{
			ValaList* _param_list = NULL;
			ValaList* _tmp21_;
			ValaList* _tmp22_;
			gint _param_size = 0;
			ValaList* _tmp23_;
			gint _tmp24_;
			gint _tmp25_;
			gint _param_index = 0;
			_tmp21_ = type_parameters;
			_tmp22_ = _vala_iterable_ref0 (_tmp21_);
			_param_list = _tmp22_;
			_tmp23_ = _param_list;
			_tmp24_ = vala_collection_get_size ((ValaCollection*) _tmp23_);
			_tmp25_ = _tmp24_;
			_param_size = _tmp25_;
			_param_index = -1;
			while (TRUE) {
				gint _tmp26_;
				gint _tmp27_;
				gint _tmp28_;
				ValadocApiItem* param = NULL;
				ValaList* _tmp29_;
				gint _tmp30_;
				gpointer _tmp31_;
				gboolean _tmp32_;
				ValadocApiSignatureBuilder* _tmp36_;
				ValadocApiItem* _tmp37_;
				ValadocContentInline* _tmp38_;
				ValadocContentInline* _tmp39_;
				ValadocApiSignatureBuilder* _tmp40_;
				ValadocApiSignatureBuilder* _tmp41_;
				_tmp26_ = _param_index;
				_param_index = _tmp26_ + 1;
				_tmp27_ = _param_index;
				_tmp28_ = _param_size;
				if (!(_tmp27_ < _tmp28_)) {
					break;
				}
				_tmp29_ = _param_list;
				_tmp30_ = _param_index;
				_tmp31_ = vala_list_get (_tmp29_, _tmp30_);
				param = (ValadocApiItem*) ((ValadocApiNode*) _tmp31_);
				_tmp32_ = first;
				if (!_tmp32_) {
					ValadocApiSignatureBuilder* _tmp33_;
					ValadocApiSignatureBuilder* _tmp34_;
					ValadocApiSignatureBuilder* _tmp35_;
					_tmp33_ = signature;
					_tmp34_ = valadoc_api_signature_builder_append (_tmp33_, ",", FALSE);
					_tmp35_ = _tmp34_;
					_valadoc_api_signature_builder_unref0 (_tmp35_);
				}
				_tmp36_ = signature;
				_tmp37_ = param;
				_tmp38_ = valadoc_api_item_get_signature (_tmp37_);
				_tmp39_ = _tmp38_;
				_tmp40_ = valadoc_api_signature_builder_append_content (_tmp36_, _tmp39_, FALSE);
				_tmp41_ = _tmp40_;
				_valadoc_api_signature_builder_unref0 (_tmp41_);
				first = FALSE;
				_g_object_unref0 (param);
			}
			_vala_iterable_unref0 (_param_list);
		}
		_tmp42_ = signature;
		_tmp43_ = valadoc_api_signature_builder_append (_tmp42_, ">", FALSE);
		_tmp44_ = _tmp43_;
		_valadoc_api_signature_builder_unref0 (_tmp44_);
	}
	_tmp45_ = self->priv->_base_type;
	if (_tmp45_ != NULL) {
		ValadocApiSignatureBuilder* _tmp46_;
		ValadocApiSignatureBuilder* _tmp47_;
		ValadocApiSignatureBuilder* _tmp48_;
		ValadocApiSignatureBuilder* _tmp49_;
		ValadocApiTypeReference* _tmp50_;
		ValadocContentInline* _tmp51_;
		ValadocContentInline* _tmp52_;
		ValadocApiSignatureBuilder* _tmp53_;
		ValadocApiSignatureBuilder* _tmp54_;
		_tmp46_ = signature;
		_tmp47_ = valadoc_api_signature_builder_append (_tmp46_, ":", TRUE);
		_tmp48_ = _tmp47_;
		_valadoc_api_signature_builder_unref0 (_tmp48_);
		_tmp49_ = signature;
		_tmp50_ = self->priv->_base_type;
		_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_get (_tmp55_);
	result = (ValadocContentInline*) _tmp56_;
	_vala_iterable_unref0 (type_parameters);
	_valadoc_api_signature_builder_unref0 (signature);
	return result;
}


ValadocApiTypeReference* valadoc_api_struct_get_base_type (ValadocApiStruct* self) {
	ValadocApiTypeReference* result;
	ValadocApiTypeReference* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_base_type;
	result = _tmp0_;
	return result;
}


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


void valadoc_api_struct_set_base_type (ValadocApiStruct* self, ValadocApiTypeReference* value) {
	g_return_if_fail (self != NULL);
	if (valadoc_api_struct_get_base_type (self) != value) {
		ValadocApiTypeReference* _tmp0_;
		ValadocApiTypeReference* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_base_type);
		self->priv->_base_type = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_api_struct_properties[VALADOC_API_STRUCT_BASE_TYPE_PROPERTY]);
	}
}


static ValadocApiNodeType valadoc_api_struct_real_get_node_type (ValadocApiNode* base) {
	ValadocApiNodeType result;
	ValadocApiStruct* self;
	self = (ValadocApiStruct*) base;
	result = VALADOC_API_NODE_TYPE_STRUCT;
	return result;
}


static void valadoc_api_struct_class_init (ValadocApiStructClass * klass) {
	valadoc_api_struct_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ValadocApiStructPrivate));
	((ValadocApiNodeClass *) klass)->accept = (void (*) (ValadocApiNode *, ValadocApiVisitor*)) valadoc_api_struct_real_accept;
	((ValadocApiItemClass *) klass)->build_signature = (ValadocContentInline* (*) (ValadocApiItem *)) valadoc_api_struct_real_build_signature;
	VALADOC_API_NODE_CLASS (klass)->get_node_type = valadoc_api_struct_real_get_node_type;
	G_OBJECT_CLASS (klass)->get_property = _vala_valadoc_api_struct_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_valadoc_api_struct_set_property;
	G_OBJECT_CLASS (klass)->finalize = valadoc_api_struct_finalize;
	/**
	 * Specifies the base struct.
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_API_STRUCT_BASE_TYPE_PROPERTY, valadoc_api_struct_properties[VALADOC_API_STRUCT_BASE_TYPE_PROPERTY] = g_param_spec_object ("base-type", "base-type", "base-type", VALADOC_API_TYPE_TYPEREFERENCE, 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_STRUCT_NODE_TYPE_PROPERTY, valadoc_api_struct_properties[VALADOC_API_STRUCT_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_struct_instance_init (ValadocApiStruct * self) {
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	ValaHashSet* _tmp2_;
	self->priv = VALADOC_API_STRUCT_GET_PRIVATE (self);
	_tmp0_ = g_direct_hash;
	_tmp1_ = g_direct_equal;
	_tmp2_ = vala_hash_set_new (VALADOC_API_TYPE_STRUCT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_, _tmp1_);
	self->priv->_known_child_structs = (ValaSet*) _tmp2_;
}


static void valadoc_api_struct_finalize (GObject * obj) {
	ValadocApiStruct * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_API_TYPE_STRUCT, ValadocApiStruct);
	_g_free0 (self->priv->dup_function_cname);
	_g_free0 (self->priv->copy_function_cname);
	_g_free0 (self->priv->free_function_cname);
	_g_free0 (self->priv->destroy_function_cname);
	_g_free0 (self->priv->type_id);
	_g_free0 (self->priv->cname);
	_g_object_unref0 (self->priv->_base_type);
	_vala_iterable_unref0 (self->priv->_known_child_structs);
	G_OBJECT_CLASS (valadoc_api_struct_parent_class)->finalize (obj);
}


/**
 * Represents a struct declaration.
 */
GType valadoc_api_struct_get_type (void) {
	static volatile gsize valadoc_api_struct_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_api_struct_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocApiStructClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_api_struct_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocApiStruct), 0, (GInstanceInitFunc) valadoc_api_struct_instance_init, NULL };
		GType valadoc_api_struct_type_id;
		valadoc_api_struct_type_id = g_type_register_static (VALADOC_API_TYPE_TYPESYMBOL, "ValadocApiStruct", &g_define_type_info, 0);
		g_once_init_leave (&valadoc_api_struct_type_id__volatile, valadoc_api_struct_type_id);
	}
	return valadoc_api_struct_type_id__volatile;
}


static void _vala_valadoc_api_struct_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ValadocApiStruct * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_API_TYPE_STRUCT, ValadocApiStruct);
	switch (property_id) {
		case VALADOC_API_STRUCT_BASE_TYPE_PROPERTY:
		g_value_set_object (value, valadoc_api_struct_get_base_type (self));
		break;
		case VALADOC_API_STRUCT_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_struct_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ValadocApiStruct * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_API_TYPE_STRUCT, ValadocApiStruct);
	switch (property_id) {
		case VALADOC_API_STRUCT_BASE_TYPE_PROPERTY:
		valadoc_api_struct_set_base_type (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



