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

/* girwriter.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 <valacodegen.h>
#include <valadoc.h>
#include <vala.h>
#include <stdlib.h>
#include <string.h>
#include <valagee.h>


#define VALADOC_DRIVERS_TYPE_GIR_WRITER (valadoc_drivers_gir_writer_get_type ())
#define VALADOC_DRIVERS_GIR_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALADOC_DRIVERS_TYPE_GIR_WRITER, ValadocDriversGirWriter))
#define VALADOC_DRIVERS_GIR_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALADOC_DRIVERS_TYPE_GIR_WRITER, ValadocDriversGirWriterClass))
#define VALADOC_DRIVERS_IS_GIR_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALADOC_DRIVERS_TYPE_GIR_WRITER))
#define VALADOC_DRIVERS_IS_GIR_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALADOC_DRIVERS_TYPE_GIR_WRITER))
#define VALADOC_DRIVERS_GIR_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALADOC_DRIVERS_TYPE_GIR_WRITER, ValadocDriversGirWriterClass))

typedef struct _ValadocDriversGirWriter ValadocDriversGirWriter;
typedef struct _ValadocDriversGirWriterClass ValadocDriversGirWriterClass;
typedef struct _ValadocDriversGirWriterPrivate ValadocDriversGirWriterPrivate;

#define VALADOC_DRIVERS_TYPE_SYMBOL_RESOLVER (valadoc_drivers_symbol_resolver_get_type ())
#define VALADOC_DRIVERS_SYMBOL_RESOLVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALADOC_DRIVERS_TYPE_SYMBOL_RESOLVER, ValadocDriversSymbolResolver))
#define VALADOC_DRIVERS_SYMBOL_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALADOC_DRIVERS_TYPE_SYMBOL_RESOLVER, ValadocDriversSymbolResolverClass))
#define VALADOC_DRIVERS_IS_SYMBOL_RESOLVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALADOC_DRIVERS_TYPE_SYMBOL_RESOLVER))
#define VALADOC_DRIVERS_IS_SYMBOL_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALADOC_DRIVERS_TYPE_SYMBOL_RESOLVER))
#define VALADOC_DRIVERS_SYMBOL_RESOLVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALADOC_DRIVERS_TYPE_SYMBOL_RESOLVER, ValadocDriversSymbolResolverClass))

typedef struct _ValadocDriversSymbolResolver ValadocDriversSymbolResolver;
typedef struct _ValadocDriversSymbolResolverClass ValadocDriversSymbolResolverClass;
#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)))

struct _ValadocDriversGirWriter {
	ValaGIRWriter parent_instance;
	ValadocDriversGirWriterPrivate * priv;
};

struct _ValadocDriversGirWriterClass {
	ValaGIRWriterClass parent_class;
};

struct _ValadocDriversGirWriterPrivate {
	ValadocGtkdocRenderer* renderer;
	ValadocDriversSymbolResolver* resolver;
};


static gpointer valadoc_drivers_gir_writer_parent_class = NULL;

GType valadoc_drivers_gir_writer_get_type (void) G_GNUC_CONST;
GType valadoc_drivers_symbol_resolver_get_type (void) G_GNUC_CONST;
#define VALADOC_DRIVERS_GIR_WRITER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALADOC_DRIVERS_TYPE_GIR_WRITER, ValadocDriversGirWriterPrivate))
ValadocDriversGirWriter* valadoc_drivers_gir_writer_new (ValadocDriversSymbolResolver* resolver);
ValadocDriversGirWriter* valadoc_drivers_gir_writer_construct (GType object_type, ValadocDriversSymbolResolver* resolver);
static gchar* valadoc_drivers_gir_writer_translate (ValadocDriversGirWriter* self, ValadocContentComment* documentation);
static gchar* valadoc_drivers_gir_writer_translate_taglet (ValadocDriversGirWriter* self, ValadocContentTaglet* taglet);
static gchar* valadoc_drivers_gir_writer_real_get_interface_comment (ValaGIRWriter* base, ValaInterface* viface);
ValadocApiSymbol* valadoc_drivers_symbol_resolver_resolve (ValadocDriversSymbolResolver* self, ValaSymbol* symbol);
static gchar* valadoc_drivers_gir_writer_real_get_struct_comment (ValaGIRWriter* base, ValaStruct* vst);
static gchar* valadoc_drivers_gir_writer_real_get_enum_comment (ValaGIRWriter* base, ValaEnum* ven);
static gchar* valadoc_drivers_gir_writer_real_get_class_comment (ValaGIRWriter* base, ValaClass* vc);
static gchar* valadoc_drivers_gir_writer_real_get_error_code_comment (ValaGIRWriter* base, ValaErrorCode* vecode);
static gchar* valadoc_drivers_gir_writer_real_get_enum_value_comment (ValaGIRWriter* base, ValaEnumValue* vev);
static gchar* valadoc_drivers_gir_writer_real_get_constant_comment (ValaGIRWriter* base, ValaConstant* vc);
static gchar* valadoc_drivers_gir_writer_real_get_error_domain_comment (ValaGIRWriter* base, ValaErrorDomain* vedomain);
static gchar* valadoc_drivers_gir_writer_real_get_field_comment (ValaGIRWriter* base, ValaField* vf);
static gchar* valadoc_drivers_gir_writer_real_get_delegate_comment (ValaGIRWriter* base, ValaDelegate* vcb);
static gchar* valadoc_drivers_gir_writer_real_get_method_comment (ValaGIRWriter* base, ValaMethod* vm);
static gchar* valadoc_drivers_gir_writer_real_get_property_comment (ValaGIRWriter* base, ValaProperty* vprop);
static gchar* valadoc_drivers_gir_writer_real_get_delegate_return_comment (ValaGIRWriter* base, ValaDelegate* vcb);
static gchar* valadoc_drivers_gir_writer_real_get_signal_return_comment (ValaGIRWriter* base, ValaSignal* vsig);
static gchar* valadoc_drivers_gir_writer_real_get_method_return_comment (ValaGIRWriter* base, ValaMethod* vm);
static gchar* valadoc_drivers_gir_writer_real_get_signal_comment (ValaGIRWriter* base, ValaSignal* vsig);
static gchar* valadoc_drivers_gir_writer_real_get_parameter_comment (ValaGIRWriter* base, ValaParameter* param);
static void valadoc_drivers_gir_writer_finalize (ValaCodeVisitor * obj);


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


ValadocDriversGirWriter* valadoc_drivers_gir_writer_construct (GType object_type, ValadocDriversSymbolResolver* resolver) {
	ValadocDriversGirWriter* self = NULL;
	ValadocGtkdocRenderer* _tmp0_;
	ValadocDriversSymbolResolver* _tmp1_;
	ValadocDriversSymbolResolver* _tmp2_;
	g_return_val_if_fail (resolver != NULL, NULL);
	self = (ValadocDriversGirWriter*) vala_gir_writer_construct (object_type);
	_tmp0_ = valadoc_gtkdoc_renderer_new ();
	_g_object_unref0 (self->priv->renderer);
	self->priv->renderer = _tmp0_;
	_tmp1_ = resolver;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (self->priv->resolver);
	self->priv->resolver = _tmp2_;
	return self;
}


ValadocDriversGirWriter* valadoc_drivers_gir_writer_new (ValadocDriversSymbolResolver* resolver) {
	return valadoc_drivers_gir_writer_construct (VALADOC_DRIVERS_TYPE_GIR_WRITER, resolver);
}


static gchar* valadoc_drivers_gir_writer_translate (ValadocDriversGirWriter* self, ValadocContentComment* documentation) {
	gchar* result = NULL;
	ValadocContentComment* _tmp0_;
	ValadocGtkdocRenderer* _tmp1_;
	ValadocContentComment* _tmp2_;
	ValadocGtkdocRenderer* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = documentation;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = self->priv->renderer;
	_tmp2_ = documentation;
	valadoc_gtkdoc_renderer_render_symbol (_tmp1_, _tmp2_);
	_tmp3_ = self->priv->renderer;
	_tmp4_ = valadoc_gtkdoc_renderer_get_content (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_markup_writer_escape (_tmp5_);
	result = _tmp6_;
	return result;
}


static gchar* valadoc_drivers_gir_writer_translate_taglet (ValadocDriversGirWriter* self, ValadocContentTaglet* taglet) {
	gchar* result = NULL;
	ValadocContentTaglet* _tmp0_;
	ValadocGtkdocRenderer* _tmp1_;
	ValadocContentTaglet* _tmp2_;
	ValadocGtkdocRenderer* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = taglet;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = self->priv->renderer;
	_tmp2_ = taglet;
	valadoc_content_content_renderer_render_children ((ValadocContentContentRenderer*) _tmp1_, (ValadocContentContentElement*) _tmp2_);
	_tmp3_ = self->priv->renderer;
	_tmp4_ = valadoc_gtkdoc_renderer_get_content (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_markup_writer_escape (_tmp5_);
	result = _tmp6_;
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_interface_comment (ValaGIRWriter* base, ValaInterface* viface) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiInterface* iface = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaInterface* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiInterface* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (viface != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = viface;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_INTERFACE) ? ((ValadocApiInterface*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	iface = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) iface);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (iface);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_struct_comment (ValaGIRWriter* base, ValaStruct* vst) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiStruct* st = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaStruct* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiStruct* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vst != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vst;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_STRUCT) ? ((ValadocApiStruct*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	st = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) st);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (st);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_enum_comment (ValaGIRWriter* base, ValaEnum* ven) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiEnum* en = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaEnum* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiEnum* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (ven != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = ven;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_ENUM) ? ((ValadocApiEnum*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	en = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) en);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (en);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_class_comment (ValaGIRWriter* base, ValaClass* vc) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiClass* c = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaClass* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiClass* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vc != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vc;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_CLASS) ? ((ValadocApiClass*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	c = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) c);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (c);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_error_code_comment (ValaGIRWriter* base, ValaErrorCode* vecode) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiErrorCode* ecode = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaErrorCode* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiErrorCode* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vecode != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vecode;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_ERROR_CODE) ? ((ValadocApiErrorCode*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	ecode = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) ecode);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (ecode);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_enum_value_comment (ValaGIRWriter* base, ValaEnumValue* vev) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiEnumValue* ev = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaEnumValue* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiEnumValue* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vev != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vev;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_ENUM_VALUE) ? ((ValadocApiEnumValue*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	ev = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) ev);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (ev);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_constant_comment (ValaGIRWriter* base, ValaConstant* vc) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiConstant* c = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaConstant* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiConstant* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vc != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vc;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_CONSTANT) ? ((ValadocApiConstant*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	c = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) c);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (c);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_error_domain_comment (ValaGIRWriter* base, ValaErrorDomain* vedomain) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiErrorDomain* edomain = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaErrorDomain* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiErrorDomain* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vedomain != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vedomain;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_ERROR_DOMAIN) ? ((ValadocApiErrorDomain*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	edomain = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) edomain);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (edomain);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_field_comment (ValaGIRWriter* base, ValaField* vf) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiField* f = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaField* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiField* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vf != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vf;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_FIELD) ? ((ValadocApiField*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	f = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) f);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (f);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_delegate_comment (ValaGIRWriter* base, ValaDelegate* vcb) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiDelegate* cb = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaDelegate* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiDelegate* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vcb != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vcb;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_DELEGATE) ? ((ValadocApiDelegate*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	cb = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) cb);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (cb);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_method_comment (ValaGIRWriter* base, ValaMethod* vm) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiMethod* m = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaMethod* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiMethod* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vm != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vm;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_METHOD) ? ((ValadocApiMethod*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	m = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) m);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (m);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_property_comment (ValaGIRWriter* base, ValaProperty* vprop) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiProperty* prop = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaProperty* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiProperty* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vprop != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vprop;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_PROPERTY) ? ((ValadocApiProperty*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	prop = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) prop);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (prop);
	return result;
}


static gpointer _vala_iterable_ref0 (gpointer self) {
	return self ? vala_iterable_ref (self) : NULL;
}


static gchar* valadoc_drivers_gir_writer_real_get_delegate_return_comment (ValaGIRWriter* base, ValaDelegate* vcb) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiDelegate* cb = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaDelegate* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiDelegate* _tmp3_;
	ValadocApiDelegate* _tmp4_;
	ValadocContentComment* _tmp5_;
	ValadocContentComment* _tmp6_;
	ValadocContentComment* documentation = NULL;
	ValadocApiDelegate* _tmp7_;
	ValadocContentComment* _tmp8_;
	ValadocContentComment* _tmp9_;
	ValadocContentComment* _tmp10_;
	ValadocContentComment* _tmp11_;
	ValaList* taglets = NULL;
	ValadocContentComment* _tmp12_;
	ValadocApiDelegate* _tmp13_;
	ValaList* _tmp14_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vcb != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vcb;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_DELEGATE) ? ((ValadocApiDelegate*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	cb = _tmp3_;
	_tmp4_ = cb;
	_tmp5_ = valadoc_api_node_get_documentation ((ValadocApiNode*) _tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_ == NULL) {
		result = NULL;
		_g_object_unref0 (cb);
		return result;
	}
	_tmp7_ = cb;
	_tmp8_ = valadoc_api_node_get_documentation ((ValadocApiNode*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	documentation = _tmp10_;
	_tmp11_ = documentation;
	if (_tmp11_ == NULL) {
		result = NULL;
		_g_object_unref0 (documentation);
		_g_object_unref0 (cb);
		return result;
	}
	_tmp12_ = documentation;
	_tmp13_ = cb;
	_tmp14_ = valadoc_content_comment_find_taglets (_tmp12_, (ValadocApiNode*) _tmp13_, VALADOC_TAGLETS_TYPE_RETURN);
	taglets = _tmp14_;
	{
		ValaList* _taglet_list = NULL;
		ValaList* _tmp15_;
		ValaList* _tmp16_;
		gint _taglet_size = 0;
		ValaList* _tmp17_;
		gint _tmp18_;
		gint _tmp19_;
		gint _taglet_index = 0;
		_tmp15_ = taglets;
		_tmp16_ = _vala_iterable_ref0 (_tmp15_);
		_taglet_list = _tmp16_;
		_tmp17_ = _taglet_list;
		_tmp18_ = vala_collection_get_size ((ValaCollection*) _tmp17_);
		_tmp19_ = _tmp18_;
		_taglet_size = _tmp19_;
		_taglet_index = -1;
		while (TRUE) {
			gint _tmp20_;
			gint _tmp21_;
			gint _tmp22_;
			ValadocContentTaglet* taglet = NULL;
			ValaList* _tmp23_;
			gint _tmp24_;
			gpointer _tmp25_;
			ValadocContentTaglet* _tmp26_;
			gchar* _tmp27_;
			_tmp20_ = _taglet_index;
			_taglet_index = _tmp20_ + 1;
			_tmp21_ = _taglet_index;
			_tmp22_ = _taglet_size;
			if (!(_tmp21_ < _tmp22_)) {
				break;
			}
			_tmp23_ = _taglet_list;
			_tmp24_ = _taglet_index;
			_tmp25_ = vala_list_get (_tmp23_, _tmp24_);
			taglet = (ValadocContentTaglet*) _tmp25_;
			_tmp26_ = taglet;
			_tmp27_ = valadoc_drivers_gir_writer_translate_taglet (self, _tmp26_);
			result = _tmp27_;
			_g_object_unref0 (taglet);
			_vala_iterable_unref0 (_taglet_list);
			_vala_iterable_unref0 (taglets);
			_g_object_unref0 (documentation);
			_g_object_unref0 (cb);
			return result;
		}
		_vala_iterable_unref0 (_taglet_list);
	}
	result = NULL;
	_vala_iterable_unref0 (taglets);
	_g_object_unref0 (documentation);
	_g_object_unref0 (cb);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_signal_return_comment (ValaGIRWriter* base, ValaSignal* vsig) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiSignal* sig = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaSignal* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiSignal* _tmp3_;
	ValadocApiSignal* _tmp4_;
	ValadocContentComment* _tmp5_;
	ValadocContentComment* _tmp6_;
	ValadocContentComment* documentation = NULL;
	ValadocApiSignal* _tmp7_;
	ValadocContentComment* _tmp8_;
	ValadocContentComment* _tmp9_;
	ValadocContentComment* _tmp10_;
	ValadocContentComment* _tmp11_;
	ValaList* taglets = NULL;
	ValadocContentComment* _tmp12_;
	ValadocApiSignal* _tmp13_;
	ValaList* _tmp14_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vsig != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vsig;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_SIGNAL) ? ((ValadocApiSignal*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	sig = _tmp3_;
	_tmp4_ = sig;
	_tmp5_ = valadoc_api_node_get_documentation ((ValadocApiNode*) _tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_ == NULL) {
		result = NULL;
		_g_object_unref0 (sig);
		return result;
	}
	_tmp7_ = sig;
	_tmp8_ = valadoc_api_node_get_documentation ((ValadocApiNode*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	documentation = _tmp10_;
	_tmp11_ = documentation;
	if (_tmp11_ == NULL) {
		result = NULL;
		_g_object_unref0 (documentation);
		_g_object_unref0 (sig);
		return result;
	}
	_tmp12_ = documentation;
	_tmp13_ = sig;
	_tmp14_ = valadoc_content_comment_find_taglets (_tmp12_, (ValadocApiNode*) _tmp13_, VALADOC_TAGLETS_TYPE_RETURN);
	taglets = _tmp14_;
	{
		ValaList* _taglet_list = NULL;
		ValaList* _tmp15_;
		ValaList* _tmp16_;
		gint _taglet_size = 0;
		ValaList* _tmp17_;
		gint _tmp18_;
		gint _tmp19_;
		gint _taglet_index = 0;
		_tmp15_ = taglets;
		_tmp16_ = _vala_iterable_ref0 (_tmp15_);
		_taglet_list = _tmp16_;
		_tmp17_ = _taglet_list;
		_tmp18_ = vala_collection_get_size ((ValaCollection*) _tmp17_);
		_tmp19_ = _tmp18_;
		_taglet_size = _tmp19_;
		_taglet_index = -1;
		while (TRUE) {
			gint _tmp20_;
			gint _tmp21_;
			gint _tmp22_;
			ValadocContentTaglet* taglet = NULL;
			ValaList* _tmp23_;
			gint _tmp24_;
			gpointer _tmp25_;
			ValadocContentTaglet* _tmp26_;
			gchar* _tmp27_;
			_tmp20_ = _taglet_index;
			_taglet_index = _tmp20_ + 1;
			_tmp21_ = _taglet_index;
			_tmp22_ = _taglet_size;
			if (!(_tmp21_ < _tmp22_)) {
				break;
			}
			_tmp23_ = _taglet_list;
			_tmp24_ = _taglet_index;
			_tmp25_ = vala_list_get (_tmp23_, _tmp24_);
			taglet = (ValadocContentTaglet*) _tmp25_;
			_tmp26_ = taglet;
			_tmp27_ = valadoc_drivers_gir_writer_translate_taglet (self, _tmp26_);
			result = _tmp27_;
			_g_object_unref0 (taglet);
			_vala_iterable_unref0 (_taglet_list);
			_vala_iterable_unref0 (taglets);
			_g_object_unref0 (documentation);
			_g_object_unref0 (sig);
			return result;
		}
		_vala_iterable_unref0 (_taglet_list);
	}
	result = NULL;
	_vala_iterable_unref0 (taglets);
	_g_object_unref0 (documentation);
	_g_object_unref0 (sig);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_method_return_comment (ValaGIRWriter* base, ValaMethod* vm) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiMethod* m = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaMethod* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiMethod* _tmp3_;
	ValadocApiMethod* _tmp4_;
	ValadocContentComment* _tmp5_;
	ValadocContentComment* _tmp6_;
	ValadocContentComment* documentation = NULL;
	ValadocApiMethod* _tmp7_;
	ValadocContentComment* _tmp8_;
	ValadocContentComment* _tmp9_;
	ValadocContentComment* _tmp10_;
	ValadocContentComment* _tmp11_;
	ValaList* taglets = NULL;
	ValadocContentComment* _tmp12_;
	ValadocApiMethod* _tmp13_;
	ValaList* _tmp14_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vm != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vm;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_METHOD) ? ((ValadocApiMethod*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	m = _tmp3_;
	_tmp4_ = m;
	_tmp5_ = valadoc_api_node_get_documentation ((ValadocApiNode*) _tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_ == NULL) {
		result = NULL;
		_g_object_unref0 (m);
		return result;
	}
	_tmp7_ = m;
	_tmp8_ = valadoc_api_node_get_documentation ((ValadocApiNode*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	documentation = _tmp10_;
	_tmp11_ = documentation;
	if (_tmp11_ == NULL) {
		result = NULL;
		_g_object_unref0 (documentation);
		_g_object_unref0 (m);
		return result;
	}
	_tmp12_ = documentation;
	_tmp13_ = m;
	_tmp14_ = valadoc_content_comment_find_taglets (_tmp12_, (ValadocApiNode*) _tmp13_, VALADOC_TAGLETS_TYPE_RETURN);
	taglets = _tmp14_;
	{
		ValaList* _taglet_list = NULL;
		ValaList* _tmp15_;
		ValaList* _tmp16_;
		gint _taglet_size = 0;
		ValaList* _tmp17_;
		gint _tmp18_;
		gint _tmp19_;
		gint _taglet_index = 0;
		_tmp15_ = taglets;
		_tmp16_ = _vala_iterable_ref0 (_tmp15_);
		_taglet_list = _tmp16_;
		_tmp17_ = _taglet_list;
		_tmp18_ = vala_collection_get_size ((ValaCollection*) _tmp17_);
		_tmp19_ = _tmp18_;
		_taglet_size = _tmp19_;
		_taglet_index = -1;
		while (TRUE) {
			gint _tmp20_;
			gint _tmp21_;
			gint _tmp22_;
			ValadocContentTaglet* taglet = NULL;
			ValaList* _tmp23_;
			gint _tmp24_;
			gpointer _tmp25_;
			ValadocContentTaglet* _tmp26_;
			gchar* _tmp27_;
			_tmp20_ = _taglet_index;
			_taglet_index = _tmp20_ + 1;
			_tmp21_ = _taglet_index;
			_tmp22_ = _taglet_size;
			if (!(_tmp21_ < _tmp22_)) {
				break;
			}
			_tmp23_ = _taglet_list;
			_tmp24_ = _taglet_index;
			_tmp25_ = vala_list_get (_tmp23_, _tmp24_);
			taglet = (ValadocContentTaglet*) _tmp25_;
			_tmp26_ = taglet;
			_tmp27_ = valadoc_drivers_gir_writer_translate_taglet (self, _tmp26_);
			result = _tmp27_;
			_g_object_unref0 (taglet);
			_vala_iterable_unref0 (_taglet_list);
			_vala_iterable_unref0 (taglets);
			_g_object_unref0 (documentation);
			_g_object_unref0 (m);
			return result;
		}
		_vala_iterable_unref0 (_taglet_list);
	}
	result = NULL;
	_vala_iterable_unref0 (taglets);
	_g_object_unref0 (documentation);
	_g_object_unref0 (m);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_signal_comment (ValaGIRWriter* base, ValaSignal* vsig) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiSignal* sig = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaSignal* _tmp1_;
	ValadocApiSymbol* _tmp2_;
	ValadocApiSignal* _tmp3_;
	ValadocContentComment* _tmp4_;
	ValadocContentComment* _tmp5_;
	gchar* _tmp6_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (vsig != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = vsig;
	_tmp2_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, (ValaSymbol*) _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_SIGNAL) ? ((ValadocApiSignal*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	sig = _tmp3_;
	_tmp4_ = valadoc_api_node_get_documentation ((ValadocApiNode*) sig);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_drivers_gir_writer_translate (self, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (sig);
	return result;
}


static gchar* valadoc_drivers_gir_writer_real_get_parameter_comment (ValaGIRWriter* base, ValaParameter* param) {
	ValadocDriversGirWriter * self;
	gchar* result = NULL;
	ValadocApiSymbol* symbol = NULL;
	ValadocDriversSymbolResolver* _tmp0_;
	ValaParameter* _tmp1_;
	ValaSymbol* _tmp2_;
	ValaSymbol* _tmp3_;
	ValadocApiSymbol* _tmp4_;
	ValadocApiSymbol* _tmp5_;
	ValadocContentComment* documentation = NULL;
	ValadocApiSymbol* _tmp6_;
	ValadocContentComment* _tmp7_;
	ValadocContentComment* _tmp8_;
	ValadocContentComment* _tmp9_;
	ValadocContentComment* _tmp10_;
	ValaList* taglets = NULL;
	ValadocContentComment* _tmp11_;
	ValadocApiSymbol* _tmp12_;
	ValaList* _tmp13_;
	self = (ValadocDriversGirWriter*) base;
	g_return_val_if_fail (param != NULL, NULL);
	_tmp0_ = self->priv->resolver;
	_tmp1_ = param;
	_tmp2_ = vala_symbol_get_parent_symbol ((ValaSymbol*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = valadoc_drivers_symbol_resolver_resolve (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, VALA_TYPE_SYMBOL, ValaSymbol));
	symbol = _tmp4_;
	_tmp5_ = symbol;
	if (_tmp5_ == NULL) {
		result = NULL;
		_g_object_unref0 (symbol);
		return result;
	}
	_tmp6_ = symbol;
	_tmp7_ = valadoc_api_node_get_documentation ((ValadocApiNode*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = _g_object_ref0 (_tmp8_);
	documentation = _tmp9_;
	_tmp10_ = documentation;
	if (_tmp10_ == NULL) {
		result = NULL;
		_g_object_unref0 (documentation);
		_g_object_unref0 (symbol);
		return result;
	}
	_tmp11_ = documentation;
	_tmp12_ = symbol;
	_tmp13_ = valadoc_content_comment_find_taglets (_tmp11_, (ValadocApiNode*) _tmp12_, VALADOC_TAGLETS_TYPE_PARAM);
	taglets = _tmp13_;
	{
		ValaList* __taglet_list = NULL;
		ValaList* _tmp14_;
		ValaList* _tmp15_;
		gint __taglet_size = 0;
		ValaList* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		gint __taglet_index = 0;
		_tmp14_ = taglets;
		_tmp15_ = _vala_iterable_ref0 (_tmp14_);
		__taglet_list = _tmp15_;
		_tmp16_ = __taglet_list;
		_tmp17_ = vala_collection_get_size ((ValaCollection*) _tmp16_);
		_tmp18_ = _tmp17_;
		__taglet_size = _tmp18_;
		__taglet_index = -1;
		while (TRUE) {
			gint _tmp19_;
			gint _tmp20_;
			gint _tmp21_;
			ValadocContentTaglet* _taglet = NULL;
			ValaList* _tmp22_;
			gint _tmp23_;
			gpointer _tmp24_;
			ValadocTagletsParam* taglet = NULL;
			ValadocContentTaglet* _tmp25_;
			ValadocTagletsParam* _tmp26_;
			ValadocTagletsParam* _tmp27_;
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			ValaParameter* _tmp30_;
			const gchar* _tmp31_;
			const gchar* _tmp32_;
			_tmp19_ = __taglet_index;
			__taglet_index = _tmp19_ + 1;
			_tmp20_ = __taglet_index;
			_tmp21_ = __taglet_size;
			if (!(_tmp20_ < _tmp21_)) {
				break;
			}
			_tmp22_ = __taglet_list;
			_tmp23_ = __taglet_index;
			_tmp24_ = vala_list_get (_tmp22_, _tmp23_);
			_taglet = (ValadocContentTaglet*) _tmp24_;
			_tmp25_ = _taglet;
			_tmp26_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, VALADOC_TAGLETS_TYPE_PARAM, ValadocTagletsParam));
			taglet = _tmp26_;
			_tmp27_ = taglet;
			_tmp28_ = valadoc_taglets_param_get_parameter_name (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = param;
			_tmp31_ = vala_symbol_get_name ((ValaSymbol*) _tmp30_);
			_tmp32_ = _tmp31_;
			if (g_strcmp0 (_tmp29_, _tmp32_) == 0) {
				ValadocTagletsParam* _tmp33_;
				gchar* _tmp34_;
				_tmp33_ = taglet;
				_tmp34_ = valadoc_drivers_gir_writer_translate_taglet (self, (ValadocContentTaglet*) _tmp33_);
				result = _tmp34_;
				_g_object_unref0 (taglet);
				_g_object_unref0 (_taglet);
				_vala_iterable_unref0 (__taglet_list);
				_vala_iterable_unref0 (taglets);
				_g_object_unref0 (documentation);
				_g_object_unref0 (symbol);
				return result;
			}
			_g_object_unref0 (taglet);
			_g_object_unref0 (_taglet);
		}
		_vala_iterable_unref0 (__taglet_list);
	}
	result = NULL;
	_vala_iterable_unref0 (taglets);
	_g_object_unref0 (documentation);
	_g_object_unref0 (symbol);
	return result;
}


static void valadoc_drivers_gir_writer_class_init (ValadocDriversGirWriterClass * klass) {
	valadoc_drivers_gir_writer_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeVisitorClass *) klass)->finalize = valadoc_drivers_gir_writer_finalize;
	g_type_class_add_private (klass, sizeof (ValadocDriversGirWriterPrivate));
	((ValaGIRWriterClass *) klass)->get_interface_comment = (gchar* (*) (ValaGIRWriter *, ValaInterface*)) valadoc_drivers_gir_writer_real_get_interface_comment;
	((ValaGIRWriterClass *) klass)->get_struct_comment = (gchar* (*) (ValaGIRWriter *, ValaStruct*)) valadoc_drivers_gir_writer_real_get_struct_comment;
	((ValaGIRWriterClass *) klass)->get_enum_comment = (gchar* (*) (ValaGIRWriter *, ValaEnum*)) valadoc_drivers_gir_writer_real_get_enum_comment;
	((ValaGIRWriterClass *) klass)->get_class_comment = (gchar* (*) (ValaGIRWriter *, ValaClass*)) valadoc_drivers_gir_writer_real_get_class_comment;
	((ValaGIRWriterClass *) klass)->get_error_code_comment = (gchar* (*) (ValaGIRWriter *, ValaErrorCode*)) valadoc_drivers_gir_writer_real_get_error_code_comment;
	((ValaGIRWriterClass *) klass)->get_enum_value_comment = (gchar* (*) (ValaGIRWriter *, ValaEnumValue*)) valadoc_drivers_gir_writer_real_get_enum_value_comment;
	((ValaGIRWriterClass *) klass)->get_constant_comment = (gchar* (*) (ValaGIRWriter *, ValaConstant*)) valadoc_drivers_gir_writer_real_get_constant_comment;
	((ValaGIRWriterClass *) klass)->get_error_domain_comment = (gchar* (*) (ValaGIRWriter *, ValaErrorDomain*)) valadoc_drivers_gir_writer_real_get_error_domain_comment;
	((ValaGIRWriterClass *) klass)->get_field_comment = (gchar* (*) (ValaGIRWriter *, ValaField*)) valadoc_drivers_gir_writer_real_get_field_comment;
	((ValaGIRWriterClass *) klass)->get_delegate_comment = (gchar* (*) (ValaGIRWriter *, ValaDelegate*)) valadoc_drivers_gir_writer_real_get_delegate_comment;
	((ValaGIRWriterClass *) klass)->get_method_comment = (gchar* (*) (ValaGIRWriter *, ValaMethod*)) valadoc_drivers_gir_writer_real_get_method_comment;
	((ValaGIRWriterClass *) klass)->get_property_comment = (gchar* (*) (ValaGIRWriter *, ValaProperty*)) valadoc_drivers_gir_writer_real_get_property_comment;
	((ValaGIRWriterClass *) klass)->get_delegate_return_comment = (gchar* (*) (ValaGIRWriter *, ValaDelegate*)) valadoc_drivers_gir_writer_real_get_delegate_return_comment;
	((ValaGIRWriterClass *) klass)->get_signal_return_comment = (gchar* (*) (ValaGIRWriter *, ValaSignal*)) valadoc_drivers_gir_writer_real_get_signal_return_comment;
	((ValaGIRWriterClass *) klass)->get_method_return_comment = (gchar* (*) (ValaGIRWriter *, ValaMethod*)) valadoc_drivers_gir_writer_real_get_method_return_comment;
	((ValaGIRWriterClass *) klass)->get_signal_comment = (gchar* (*) (ValaGIRWriter *, ValaSignal*)) valadoc_drivers_gir_writer_real_get_signal_comment;
	((ValaGIRWriterClass *) klass)->get_parameter_comment = (gchar* (*) (ValaGIRWriter *, ValaParameter*)) valadoc_drivers_gir_writer_real_get_parameter_comment;
}


static void valadoc_drivers_gir_writer_instance_init (ValadocDriversGirWriter * self) {
	self->priv = VALADOC_DRIVERS_GIR_WRITER_GET_PRIVATE (self);
}


static void valadoc_drivers_gir_writer_finalize (ValaCodeVisitor * obj) {
	ValadocDriversGirWriter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_DRIVERS_TYPE_GIR_WRITER, ValadocDriversGirWriter);
	_g_object_unref0 (self->priv->renderer);
	_g_object_unref0 (self->priv->resolver);
	VALA_CODE_VISITOR_CLASS (valadoc_drivers_gir_writer_parent_class)->finalize (obj);
}


/**
 * Code visitor generating .gir file for the public interface.
 */
GType valadoc_drivers_gir_writer_get_type (void) {
	static volatile gsize valadoc_drivers_gir_writer_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_drivers_gir_writer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocDriversGirWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_drivers_gir_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocDriversGirWriter), 0, (GInstanceInitFunc) valadoc_drivers_gir_writer_instance_init, NULL };
		GType valadoc_drivers_gir_writer_type_id;
		valadoc_drivers_gir_writer_type_id = g_type_register_static (VALA_TYPE_GIR_WRITER, "ValadocDriversGirWriter", &g_define_type_info, 0);
		g_once_init_leave (&valadoc_drivers_gir_writer_type_id__volatile, valadoc_drivers_gir_writer_type_id);
	}
	return valadoc_drivers_gir_writer_type_id__volatile;
}



