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

/* doclet.vala
 *
 * Copyright (C) 2008-2012 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 <valagee.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <stdio.h>


#define VALADOC_DEVHELP_TYPE_DOCLET (valadoc_devhelp_doclet_get_type ())
#define VALADOC_DEVHELP_DOCLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALADOC_DEVHELP_TYPE_DOCLET, ValadocDevhelpDoclet))
#define VALADOC_DEVHELP_DOCLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALADOC_DEVHELP_TYPE_DOCLET, ValadocDevhelpDocletClass))
#define VALADOC_DEVHELP_IS_DOCLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALADOC_DEVHELP_TYPE_DOCLET))
#define VALADOC_DEVHELP_IS_DOCLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALADOC_DEVHELP_TYPE_DOCLET))
#define VALADOC_DEVHELP_DOCLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALADOC_DEVHELP_TYPE_DOCLET, ValadocDevhelpDocletClass))

typedef struct _ValadocDevhelpDoclet ValadocDevhelpDoclet;
typedef struct _ValadocDevhelpDocletClass ValadocDevhelpDocletClass;
typedef struct _ValadocDevhelpDocletPrivate ValadocDevhelpDocletPrivate;
enum  {
	VALADOC_DEVHELP_DOCLET_0_PROPERTY,
	VALADOC_DEVHELP_DOCLET_NUM_PROPERTIES
};
static GParamSpec* valadoc_devhelp_doclet_properties[VALADOC_DEVHELP_DOCLET_NUM_PROPERTIES];
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _valadoc_markup_writer_unref0(var) ((var == NULL) ? NULL : (var = (valadoc_markup_writer_unref (var), NULL)))
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ValadocDevhelpDoclet {
	ValadocHtmlBasicDoclet parent_instance;
	ValadocDevhelpDocletPrivate * priv;
};

struct _ValadocDevhelpDocletClass {
	ValadocHtmlBasicDocletClass parent_class;
};

struct _ValadocDevhelpDocletPrivate {
	ValaArrayList* nodes;
	gchar* package_dir_name;
	ValadocDevhelpMarkupWriter* _devhelpwriter;
};


static gpointer valadoc_devhelp_doclet_parent_class = NULL;

GType valadoc_devhelp_doclet_get_type (void) G_GNUC_CONST;
#define VALADOC_DEVHELP_DOCLET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALADOC_DEVHELP_TYPE_DOCLET, ValadocDevhelpDocletPrivate))
#define VALADOC_DEVHELP_DOCLET_css_path_wiki "devhelpstyle.css"
#define VALADOC_DEVHELP_DOCLET_css_path "devhelpstyle.css"
#define VALADOC_DEVHELP_DOCLET_js_path_wiki "scripts.js"
#define VALADOC_DEVHELP_DOCLET_js_path "scripts.js"
static gchar* valadoc_devhelp_doclet_get_path (ValadocDevhelpDoclet* self, ValadocApiNode* element);
static gchar* valadoc_devhelp_doclet_get_real_path (ValadocDevhelpDoclet* self, ValadocApiNode* element);
static gchar* valadoc_devhelp_doclet_real_get_icon_directory (ValadocHtmlBasicDoclet* base);
static void valadoc_devhelp_doclet_real_process (ValadocHtmlBasicDoclet* base, ValadocSettings* settings, ValadocApiTree* tree, ValadocErrorReporter* reporter);
static void valadoc_devhelp_doclet_real_visit_tree (ValadocApiVisitor* base, ValadocApiTree* tree);
static void valadoc_devhelp_doclet_real_visit_package (ValadocApiVisitor* base, ValadocApiPackage* package);
static void valadoc_devhelp_doclet_process_compound_node (ValadocDevhelpDoclet* self, ValadocApiNode* node);
static void valadoc_devhelp_doclet_process_node (ValadocDevhelpDoclet* self, ValadocApiNode* node, gboolean accept_all_children);
static void valadoc_devhelp_doclet_real_visit_namespace (ValadocApiVisitor* base, ValadocApiNamespace* item);
static void valadoc_devhelp_doclet_real_visit_interface (ValadocApiVisitor* base, ValadocApiInterface* item);
static void valadoc_devhelp_doclet_real_visit_class (ValadocApiVisitor* base, ValadocApiClass* item);
static void valadoc_devhelp_doclet_real_visit_struct (ValadocApiVisitor* base, ValadocApiStruct* item);
static void valadoc_devhelp_doclet_real_visit_error_domain (ValadocApiVisitor* base, ValadocApiErrorDomain* item);
static void valadoc_devhelp_doclet_real_visit_enum (ValadocApiVisitor* base, ValadocApiEnum* item);
static void valadoc_devhelp_doclet_real_visit_property (ValadocApiVisitor* base, ValadocApiProperty* item);
static void valadoc_devhelp_doclet_real_visit_constant (ValadocApiVisitor* base, ValadocApiConstant* item);
static void valadoc_devhelp_doclet_real_visit_field (ValadocApiVisitor* base, ValadocApiField* item);
static void valadoc_devhelp_doclet_real_visit_error_code (ValadocApiVisitor* base, ValadocApiErrorCode* item);
static void valadoc_devhelp_doclet_real_visit_enum_value (ValadocApiVisitor* base, ValadocApiEnumValue* item);
static void valadoc_devhelp_doclet_real_visit_delegate (ValadocApiVisitor* base, ValadocApiDelegate* item);
static void valadoc_devhelp_doclet_real_visit_signal (ValadocApiVisitor* base, ValadocApiSignal* item);
static void valadoc_devhelp_doclet_real_visit_method (ValadocApiVisitor* base, ValadocApiMethod* item);
ValadocDevhelpDoclet* valadoc_devhelp_doclet_new (void);
ValadocDevhelpDoclet* valadoc_devhelp_doclet_construct (GType object_type);
static void valadoc_devhelp_doclet_finalize (GObject * obj);
GType register_plugin (ValadocModuleLoader* module_loader);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static gchar* valadoc_devhelp_doclet_get_path (ValadocDevhelpDoclet* self, ValadocApiNode* element) {
	gchar* result = NULL;
	ValadocApiNode* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (element != NULL, NULL);
	_tmp0_ = element;
	_tmp1_ = valadoc_api_node_get_full_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strconcat (_tmp2_, ".html", NULL);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	result = _tmp4_;
	return result;
}


static gchar* valadoc_devhelp_doclet_get_real_path (ValadocDevhelpDoclet* self, ValadocApiNode* element) {
	gchar* result = NULL;
	ValadocSettings* _tmp0_;
	ValadocSettings* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	ValadocApiNode* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (element != NULL, NULL);
	_tmp0_ = valadoc_html_basic_doclet_get_settings ((ValadocHtmlBasicDoclet*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->path;
	_tmp3_ = self->priv->package_dir_name;
	_tmp4_ = element;
	_tmp5_ = valadoc_api_node_get_full_name (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat (_tmp6_, ".html", NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_build_filename (_tmp2_, _tmp3_, _tmp8_, NULL);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	result = _tmp10_;
	return result;
}


static gchar* valadoc_devhelp_doclet_real_get_icon_directory (ValadocHtmlBasicDoclet* base) {
	ValadocDevhelpDoclet * self;
	gchar* result = NULL;
	gchar* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}


static void valadoc_devhelp_doclet_real_process (ValadocHtmlBasicDoclet* base, ValadocSettings* settings, ValadocApiTree* tree, ValadocErrorReporter* reporter) {
	ValadocDevhelpDoclet * self;
	ValadocSettings* _tmp0_;
	ValadocApiTree* _tmp1_;
	ValadocErrorReporter* _tmp2_;
	ValadocSettings* _tmp3_;
	ValadocSettings* _tmp4_;
	const gchar* _tmp5_;
	ValadocApiTree* _tmp6_;
	ValadocSettings* _tmp7_;
	ValadocSettings* _tmp8_;
	const gchar* _tmp9_;
	ValadocSettings* _tmp10_;
	ValadocSettings* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	ValadocApiTree* _tmp15_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (settings != NULL);
	g_return_if_fail (tree != NULL);
	g_return_if_fail (reporter != NULL);
	_tmp0_ = settings;
	_tmp1_ = tree;
	_tmp2_ = reporter;
	VALADOC_HTML_BASIC_DOCLET_CLASS (valadoc_devhelp_doclet_parent_class)->process (G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_HTML_TYPE_BASIC_DOCLET, ValadocHtmlBasicDoclet), _tmp0_, _tmp1_, _tmp2_);
	_tmp3_ = valadoc_html_basic_doclet_get_settings ((ValadocHtmlBasicDoclet*) self);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_->path;
	g_mkdir_with_parents (_tmp5_, 0777);
	_tmp6_ = tree;
	_tmp7_ = valadoc_html_basic_doclet_get_settings ((ValadocHtmlBasicDoclet*) self);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_->path;
	_tmp10_ = valadoc_html_basic_doclet_get_settings ((ValadocHtmlBasicDoclet*) self);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_->pkg_name;
	_tmp13_ = g_build_filename (_tmp9_, _tmp12_, NULL);
	_tmp14_ = _tmp13_;
	valadoc_html_basic_doclet_write_wiki_pages ((ValadocHtmlBasicDoclet*) self, _tmp6_, VALADOC_DEVHELP_DOCLET_css_path_wiki, VALADOC_DEVHELP_DOCLET_js_path_wiki, _tmp14_);
	_g_free0 (_tmp14_);
	_tmp15_ = tree;
	valadoc_api_tree_accept (_tmp15_, (ValadocApiVisitor*) self);
}


static void valadoc_devhelp_doclet_real_visit_tree (ValadocApiVisitor* base, ValadocApiTree* tree) {
	ValadocDevhelpDoclet * self;
	ValadocApiTree* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (tree != NULL);
	_tmp0_ = tree;
	valadoc_api_tree_accept_children (_tmp0_, (ValadocApiVisitor*) self);
}


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


static void valadoc_devhelp_doclet_real_visit_package (ValadocApiVisitor* base, ValadocApiPackage* package) {
	ValadocDevhelpDoclet * self;
	ValadocApiPackage* _tmp0_;
	ValadocSettings* _tmp1_;
	ValadocSettings* _tmp2_;
	gboolean _tmp3_;
	gchar* pkg_name = NULL;
	ValadocApiPackage* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* path = NULL;
	ValadocSettings* _tmp8_;
	ValadocSettings* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* filepath = NULL;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* imgpath = NULL;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* devpath = NULL;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gint rt = 0;
	const gchar* _tmp25_;
	gint _tmp26_;
	const gchar* _tmp27_;
	gint _tmp28_;
	const gchar* _tmp29_;
	FILE* devfile = NULL;
	const gchar* _tmp30_;
	FILE* _tmp31_;
	FILE* _tmp32_;
	ValadocDevhelpMarkupWriter* _tmp33_;
	ValadocDevhelpMarkupWriter* _tmp34_;
	const gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	const gchar* _tmp38_;
	ValadocDevhelpMarkupWriter* _tmp39_;
	ValadocDevhelpMarkupWriter* _tmp40_;
	FILE* file = NULL;
	const gchar* _tmp41_;
	FILE* _tmp42_;
	FILE* _tmp43_;
	ValadocHtmlMarkupWriter* _tmp44_;
	ValadocHtmlHtmlRenderer* _tmp45_;
	ValadocHtmlMarkupWriter* _tmp46_;
	const gchar* _tmp47_;
	ValadocApiPackage* _tmp48_;
	ValadocApiPackage* _tmp49_;
	ValadocDevhelpMarkupWriter* _tmp50_;
	ValadocDevhelpMarkupWriter* _tmp51_;
	ValadocDevhelpMarkupWriter* _tmp52_;
	ValadocApiPackage* _tmp53_;
	ValadocDevhelpMarkupWriter* _tmp54_;
	ValadocDevhelpMarkupWriter* _tmp55_;
	ValadocDevhelpMarkupWriter* _tmp56_;
	ValadocDevhelpMarkupWriter* _tmp57_;
	ValadocDevhelpMarkupWriter* _tmp58_;
	ValadocDevhelpMarkupWriter* _tmp59_;
	ValadocDevhelpMarkupWriter* _tmp103_;
	ValadocDevhelpMarkupWriter* _tmp104_;
	ValadocDevhelpMarkupWriter* _tmp105_;
	ValadocDevhelpMarkupWriter* _tmp106_;
	ValadocDevhelpMarkupWriter* _tmp107_;
	ValadocDevhelpMarkupWriter* _tmp108_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (package != NULL);
	_tmp0_ = package;
	_tmp1_ = valadoc_html_basic_doclet_get_settings ((ValadocHtmlBasicDoclet*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = valadoc_api_node_is_browsable ((ValadocApiNode*) _tmp0_, _tmp2_);
	if (!_tmp3_) {
		return;
	}
	_tmp4_ = package;
	_tmp5_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup (_tmp6_);
	pkg_name = _tmp7_;
	_tmp8_ = valadoc_html_basic_doclet_get_settings ((ValadocHtmlBasicDoclet*) self);
	_tmp9_ = _tmp8_;
	_tmp10_ = _tmp9_->path;
	_tmp11_ = pkg_name;
	_tmp12_ = g_build_filename (_tmp10_, _tmp11_, NULL);
	path = _tmp12_;
	_tmp13_ = path;
	_tmp14_ = g_build_filename (_tmp13_, "index.htm", NULL);
	filepath = _tmp14_;
	_tmp15_ = path;
	_tmp16_ = g_build_filename (_tmp15_, "img", NULL);
	imgpath = _tmp16_;
	_tmp17_ = path;
	_tmp18_ = pkg_name;
	_tmp19_ = g_strconcat (_tmp18_, ".devhelp2", NULL);
	_tmp20_ = _tmp19_;
	_tmp21_ = g_build_filename (_tmp17_, _tmp20_, NULL);
	_tmp22_ = _tmp21_;
	_g_free0 (_tmp20_);
	devpath = _tmp22_;
	_tmp23_ = pkg_name;
	_tmp24_ = g_strdup (_tmp23_);
	_g_free0 (self->priv->package_dir_name);
	self->priv->package_dir_name = _tmp24_;
	_tmp25_ = path;
	_tmp26_ = g_mkdir (_tmp25_, 0777);
	rt = _tmp26_;
	_tmp27_ = imgpath;
	_tmp28_ = g_mkdir (_tmp27_, 0777);
	rt = _tmp28_;
	_tmp29_ = path;
	valadoc_copy_directory (PACKAGE_ICONDIR, _tmp29_);
	_tmp30_ = devpath;
	_tmp31_ = g_fopen (_tmp30_, "w");
	devfile = _tmp31_;
	_tmp32_ = devfile;
	_tmp33_ = valadoc_devhelp_markup_writer_new (_tmp32_, TRUE);
	_valadoc_markup_writer_unref0 (self->priv->_devhelpwriter);
	self->priv->_devhelpwriter = _tmp33_;
	_tmp34_ = self->priv->_devhelpwriter;
	_tmp35_ = pkg_name;
	_tmp36_ = g_strconcat (_tmp35_, " Reference Manual", NULL);
	_tmp37_ = _tmp36_;
	_tmp38_ = pkg_name;
	_tmp39_ = valadoc_devhelp_markup_writer_start_book (_tmp34_, _tmp37_, "vala", "index.htm", _tmp38_, "", "");
	_tmp40_ = _tmp39_;
	_valadoc_markup_writer_unref0 (_tmp40_);
	_g_free0 (_tmp37_);
	_tmp41_ = filepath;
	_tmp42_ = g_fopen (_tmp41_, "w");
	file = _tmp42_;
	_tmp43_ = file;
	_tmp44_ = valadoc_html_markup_writer_new (_tmp43_, TRUE);
	_valadoc_markup_writer_unref0 (((ValadocHtmlBasicDoclet*) self)->writer);
	((ValadocHtmlBasicDoclet*) self)->writer = _tmp44_;
	_tmp45_ = ((ValadocHtmlBasicDoclet*) self)->_renderer;
	_tmp46_ = ((ValadocHtmlBasicDoclet*) self)->writer;
	valadoc_html_html_renderer_set_writer (_tmp45_, _tmp46_);
	_tmp47_ = pkg_name;
	valadoc_html_basic_doclet_write_file_header ((ValadocHtmlBasicDoclet*) self, VALADOC_DEVHELP_DOCLET_css_path, VALADOC_DEVHELP_DOCLET_js_path, _tmp47_);
	_tmp48_ = package;
	_tmp49_ = package;
	valadoc_html_basic_doclet_write_package_content ((ValadocHtmlBasicDoclet*) self, _tmp48_, (ValadocApiNode*) _tmp49_);
	valadoc_html_basic_doclet_write_file_footer ((ValadocHtmlBasicDoclet*) self);
	_fclose0 (file);
	file = NULL;
	_tmp50_ = self->priv->_devhelpwriter;
	_tmp51_ = valadoc_devhelp_markup_writer_start_chapters (_tmp50_);
	_tmp52_ = _tmp51_;
	_valadoc_markup_writer_unref0 (_tmp52_);
	_tmp53_ = package;
	valadoc_api_node_accept_all_children ((ValadocApiNode*) _tmp53_, (ValadocApiVisitor*) self, TRUE);
	_tmp54_ = self->priv->_devhelpwriter;
	_tmp55_ = valadoc_devhelp_markup_writer_end_chapters (_tmp54_);
	_tmp56_ = _tmp55_;
	_valadoc_markup_writer_unref0 (_tmp56_);
	_tmp57_ = self->priv->_devhelpwriter;
	_tmp58_ = valadoc_devhelp_markup_writer_start_functions (_tmp57_);
	_tmp59_ = _tmp58_;
	_valadoc_markup_writer_unref0 (_tmp59_);
	{
		ValaArrayList* _node_list = NULL;
		ValaArrayList* _tmp60_;
		ValaArrayList* _tmp61_;
		gint _node_size = 0;
		ValaArrayList* _tmp62_;
		gint _tmp63_;
		gint _tmp64_;
		gint _node_index = 0;
		_tmp60_ = self->priv->nodes;
		_tmp61_ = _vala_iterable_ref0 (_tmp60_);
		_node_list = _tmp61_;
		_tmp62_ = _node_list;
		_tmp63_ = vala_collection_get_size ((ValaCollection*) _tmp62_);
		_tmp64_ = _tmp63_;
		_node_size = _tmp64_;
		_node_index = -1;
		while (TRUE) {
			gint _tmp65_;
			gint _tmp66_;
			gint _tmp67_;
			ValadocApiNode* node = NULL;
			ValaArrayList* _tmp68_;
			gint _tmp69_;
			gpointer _tmp70_;
			gchar* typekeyword = NULL;
			gchar* _tmp71_;
			ValadocApiNode* _tmp72_;
			ValadocDevhelpMarkupWriter* _tmp86_;
			gchar* _tmp87_;
			const gchar* _tmp88_;
			gchar* _tmp89_;
			gchar* _tmp90_;
			ValadocApiNode* _tmp91_;
			gchar* _tmp92_;
			gchar* _tmp93_;
			ValadocApiNode* _tmp94_;
			ValadocApiNode* _tmp95_;
			ValadocApiPackage* _tmp96_;
			ValadocApiPackage* _tmp97_;
			gchar* _tmp98_;
			gchar** _tmp99_;
			gchar** _tmp100_;
			gint _tmp100__length1;
			ValadocMarkupWriter* _tmp101_;
			ValadocMarkupWriter* _tmp102_;
			_tmp65_ = _node_index;
			_node_index = _tmp65_ + 1;
			_tmp66_ = _node_index;
			_tmp67_ = _node_size;
			if (!(_tmp66_ < _tmp67_)) {
				break;
			}
			_tmp68_ = _node_list;
			_tmp69_ = _node_index;
			_tmp70_ = vala_list_get ((ValaList*) _tmp68_, _tmp69_);
			node = (ValadocApiNode*) _tmp70_;
			_tmp71_ = g_strdup ("");
			typekeyword = _tmp71_;
			_tmp72_ = node;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp72_, VALADOC_API_TYPE_ENUM)) {
				gchar* _tmp73_;
				_tmp73_ = g_strdup ("enum");
				_g_free0 (typekeyword);
				typekeyword = _tmp73_;
			} else {
				ValadocApiNode* _tmp74_;
				_tmp74_ = node;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp74_, VALADOC_API_TYPE_CONSTANT)) {
					gchar* _tmp75_;
					_tmp75_ = g_strdup ("constant");
					_g_free0 (typekeyword);
					typekeyword = _tmp75_;
				} else {
					ValadocApiNode* _tmp76_;
					_tmp76_ = node;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp76_, VALADOC_API_TYPE_METHOD)) {
						gchar* _tmp77_;
						_tmp77_ = g_strdup ("function");
						_g_free0 (typekeyword);
						typekeyword = _tmp77_;
					} else {
						ValadocApiNode* _tmp78_;
						_tmp78_ = node;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp78_, VALADOC_API_TYPE_FIELD)) {
							gchar* _tmp79_;
							_tmp79_ = g_strdup ("variable");
							_g_free0 (typekeyword);
							typekeyword = _tmp79_;
						} else {
							ValadocApiNode* _tmp80_;
							_tmp80_ = node;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp80_, VALADOC_API_TYPE_PROPERTY)) {
								gchar* _tmp81_;
								_tmp81_ = g_strdup ("property");
								_g_free0 (typekeyword);
								typekeyword = _tmp81_;
							} else {
								ValadocApiNode* _tmp82_;
								_tmp82_ = node;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp82_, VALADOC_API_TYPE_SIGNAL)) {
									gchar* _tmp83_;
									_tmp83_ = g_strdup ("signal");
									_g_free0 (typekeyword);
									typekeyword = _tmp83_;
								} else {
									ValadocApiNode* _tmp84_;
									_tmp84_ = node;
									if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp84_, VALADOC_API_TYPE_STRUCT)) {
										gchar* _tmp85_;
										_tmp85_ = g_strdup ("struct");
										_g_free0 (typekeyword);
										typekeyword = _tmp85_;
									}
								}
							}
						}
					}
				}
			}
			_tmp86_ = self->priv->_devhelpwriter;
			_tmp87_ = g_strdup ("type");
			_tmp88_ = typekeyword;
			_tmp89_ = g_strdup (_tmp88_);
			_tmp90_ = g_strdup ("name");
			_tmp91_ = node;
			_tmp92_ = valadoc_api_node_get_full_name (_tmp91_);
			_tmp93_ = g_strdup ("link");
			_tmp94_ = node;
			_tmp95_ = node;
			_tmp96_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp95_);
			_tmp97_ = _tmp96_;
			_tmp98_ = valadoc_html_basic_doclet_get_link ((ValadocHtmlBasicDoclet*) self, _tmp94_, (ValadocApiNode*) _tmp97_);
			_tmp99_ = g_new0 (gchar*, 6 + 1);
			_tmp99_[0] = _tmp87_;
			_tmp99_[1] = _tmp89_;
			_tmp99_[2] = _tmp90_;
			_tmp99_[3] = _tmp92_;
			_tmp99_[4] = _tmp93_;
			_tmp99_[5] = _tmp98_;
			_tmp100_ = _tmp99_;
			_tmp100__length1 = 6;
			_tmp101_ = valadoc_markup_writer_simple_tag ((ValadocMarkupWriter*) _tmp86_, "keyword", _tmp100_, 6);
			_tmp102_ = _tmp101_;
			_valadoc_markup_writer_unref0 (_tmp102_);
			_tmp100_ = (_vala_array_free (_tmp100_, _tmp100__length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (typekeyword);
			_g_object_unref0 (node);
		}
		_vala_iterable_unref0 (_node_list);
	}
	_tmp103_ = self->priv->_devhelpwriter;
	_tmp104_ = valadoc_devhelp_markup_writer_end_functions (_tmp103_);
	_tmp105_ = _tmp104_;
	_valadoc_markup_writer_unref0 (_tmp105_);
	_tmp106_ = self->priv->_devhelpwriter;
	_tmp107_ = valadoc_devhelp_markup_writer_end_book (_tmp106_);
	_tmp108_ = _tmp107_;
	_valadoc_markup_writer_unref0 (_tmp108_);
	_fclose0 (file);
	_fclose0 (devfile);
	_g_free0 (devpath);
	_g_free0 (imgpath);
	_g_free0 (filepath);
	_g_free0 (path);
	_g_free0 (pkg_name);
}


static void valadoc_devhelp_doclet_process_compound_node (ValadocDevhelpDoclet* self, ValadocApiNode* node) {
	gchar* rpath = NULL;
	ValadocApiNode* _tmp0_;
	gchar* _tmp1_;
	gchar* path = NULL;
	ValadocApiNode* _tmp2_;
	gchar* _tmp3_;
	ValadocApiNode* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	ValadocApiNode* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = node;
	_tmp1_ = valadoc_devhelp_doclet_get_real_path (self, _tmp0_);
	rpath = _tmp1_;
	_tmp2_ = node;
	_tmp3_ = valadoc_devhelp_doclet_get_path (self, _tmp2_);
	path = _tmp3_;
	_tmp4_ = node;
	_tmp5_ = valadoc_api_node_get_name (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_ != NULL) {
		FILE* file = NULL;
		const gchar* _tmp7_;
		FILE* _tmp8_;
		FILE* _tmp9_;
		ValadocHtmlMarkupWriter* _tmp10_;
		ValadocHtmlHtmlRenderer* _tmp11_;
		ValadocHtmlMarkupWriter* _tmp12_;
		ValadocApiNode* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		ValadocApiNode* _tmp18_;
		ValadocApiPackage* _tmp19_;
		ValadocApiPackage* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		gchar* _tmp23_;
		gchar* _tmp24_;
		ValadocApiNode* _tmp25_;
		_tmp7_ = rpath;
		_tmp8_ = g_fopen (_tmp7_, "w");
		file = _tmp8_;
		_tmp9_ = file;
		_tmp10_ = valadoc_html_markup_writer_new (_tmp9_, TRUE);
		_valadoc_markup_writer_unref0 (((ValadocHtmlBasicDoclet*) self)->writer);
		((ValadocHtmlBasicDoclet*) self)->writer = _tmp10_;
		_tmp11_ = ((ValadocHtmlBasicDoclet*) self)->_renderer;
		_tmp12_ = ((ValadocHtmlBasicDoclet*) self)->writer;
		valadoc_html_html_renderer_set_writer (_tmp11_, _tmp12_);
		_tmp13_ = node;
		_tmp14_ = valadoc_api_node_get_full_name (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_strconcat (_tmp15_, " &ndash; ", NULL);
		_tmp17_ = _tmp16_;
		_tmp18_ = node;
		_tmp19_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = g_strconcat (_tmp17_, _tmp22_, NULL);
		_tmp24_ = _tmp23_;
		valadoc_html_basic_doclet_write_file_header ((ValadocHtmlBasicDoclet*) self, VALADOC_DEVHELP_DOCLET_css_path, VALADOC_DEVHELP_DOCLET_js_path, _tmp24_);
		_g_free0 (_tmp24_);
		_g_free0 (_tmp17_);
		_g_free0 (_tmp15_);
		_tmp25_ = node;
		valadoc_html_basic_doclet_write_symbol_content ((ValadocHtmlBasicDoclet*) self, _tmp25_);
		valadoc_html_basic_doclet_write_file_footer ((ValadocHtmlBasicDoclet*) self);
		_fclose0 (file);
		file = NULL;
		_fclose0 (file);
	}
	_tmp26_ = node;
	_tmp27_ = valadoc_api_node_get_name (_tmp26_);
	_tmp28_ = _tmp27_;
	if (_tmp28_ != NULL) {
		ValadocDevhelpMarkupWriter* _tmp29_;
		ValadocApiNode* _tmp30_;
		const gchar* _tmp31_;
		const gchar* _tmp32_;
		const gchar* _tmp33_;
		ValadocDevhelpMarkupWriter* _tmp34_;
		ValadocDevhelpMarkupWriter* _tmp35_;
		ValadocApiNode* _tmp36_;
		ValadocDevhelpMarkupWriter* _tmp37_;
		ValadocDevhelpMarkupWriter* _tmp38_;
		ValadocDevhelpMarkupWriter* _tmp39_;
		ValaArrayList* _tmp40_;
		ValadocApiNode* _tmp41_;
		_tmp29_ = self->priv->_devhelpwriter;
		_tmp30_ = node;
		_tmp31_ = valadoc_api_node_get_name (_tmp30_);
		_tmp32_ = _tmp31_;
		_tmp33_ = path;
		_tmp34_ = valadoc_devhelp_markup_writer_start_sub (_tmp29_, _tmp32_, _tmp33_);
		_tmp35_ = _tmp34_;
		_valadoc_markup_writer_unref0 (_tmp35_);
		_tmp36_ = node;
		valadoc_api_node_accept_all_children (_tmp36_, (ValadocApiVisitor*) self, TRUE);
		_tmp37_ = self->priv->_devhelpwriter;
		_tmp38_ = valadoc_devhelp_markup_writer_end_sub (_tmp37_);
		_tmp39_ = _tmp38_;
		_valadoc_markup_writer_unref0 (_tmp39_);
		_tmp40_ = self->priv->nodes;
		_tmp41_ = node;
		vala_collection_add ((ValaCollection*) _tmp40_, _tmp41_);
	} else {
		ValadocApiNode* _tmp42_;
		_tmp42_ = node;
		valadoc_api_node_accept_all_children (_tmp42_, (ValadocApiVisitor*) self, TRUE);
	}
	_g_free0 (path);
	_g_free0 (rpath);
}


static void valadoc_devhelp_doclet_process_node (ValadocDevhelpDoclet* self, ValadocApiNode* node, gboolean accept_all_children) {
	gchar* rpath = NULL;
	ValadocApiNode* _tmp0_;
	gchar* _tmp1_;
	gchar* path = NULL;
	ValadocApiNode* _tmp2_;
	gchar* _tmp3_;
	FILE* file = NULL;
	const gchar* _tmp4_;
	FILE* _tmp5_;
	FILE* _tmp6_;
	ValadocHtmlMarkupWriter* _tmp7_;
	ValadocHtmlHtmlRenderer* _tmp8_;
	ValadocHtmlMarkupWriter* _tmp9_;
	ValadocApiNode* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	ValadocApiNode* _tmp15_;
	ValadocApiPackage* _tmp16_;
	ValadocApiPackage* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ValadocApiNode* _tmp22_;
	gboolean _tmp23_;
	ValaArrayList* _tmp35_;
	ValadocApiNode* _tmp36_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = node;
	_tmp1_ = valadoc_devhelp_doclet_get_real_path (self, _tmp0_);
	rpath = _tmp1_;
	_tmp2_ = node;
	_tmp3_ = valadoc_devhelp_doclet_get_path (self, _tmp2_);
	path = _tmp3_;
	_tmp4_ = rpath;
	_tmp5_ = g_fopen (_tmp4_, "w");
	file = _tmp5_;
	_tmp6_ = file;
	_tmp7_ = valadoc_html_markup_writer_new (_tmp6_, TRUE);
	_valadoc_markup_writer_unref0 (((ValadocHtmlBasicDoclet*) self)->writer);
	((ValadocHtmlBasicDoclet*) self)->writer = _tmp7_;
	_tmp8_ = ((ValadocHtmlBasicDoclet*) self)->_renderer;
	_tmp9_ = ((ValadocHtmlBasicDoclet*) self)->writer;
	valadoc_html_html_renderer_set_writer (_tmp8_, _tmp9_);
	_tmp10_ = node;
	_tmp11_ = valadoc_api_node_get_full_name (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_strconcat (_tmp12_, " &ndash; ", NULL);
	_tmp14_ = _tmp13_;
	_tmp15_ = node;
	_tmp16_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strconcat (_tmp14_, _tmp19_, NULL);
	_tmp21_ = _tmp20_;
	valadoc_html_basic_doclet_write_file_header ((ValadocHtmlBasicDoclet*) self, VALADOC_DEVHELP_DOCLET_css_path, VALADOC_DEVHELP_DOCLET_js_path, _tmp21_);
	_g_free0 (_tmp21_);
	_g_free0 (_tmp14_);
	_g_free0 (_tmp12_);
	_tmp22_ = node;
	valadoc_html_basic_doclet_write_symbol_content ((ValadocHtmlBasicDoclet*) self, _tmp22_);
	valadoc_html_basic_doclet_write_file_footer ((ValadocHtmlBasicDoclet*) self);
	_fclose0 (file);
	file = NULL;
	_tmp23_ = accept_all_children;
	if (_tmp23_) {
		ValadocDevhelpMarkupWriter* _tmp24_;
		ValadocApiNode* _tmp25_;
		const gchar* _tmp26_;
		const gchar* _tmp27_;
		const gchar* _tmp28_;
		ValadocDevhelpMarkupWriter* _tmp29_;
		ValadocDevhelpMarkupWriter* _tmp30_;
		ValadocApiNode* _tmp31_;
		ValadocDevhelpMarkupWriter* _tmp32_;
		ValadocDevhelpMarkupWriter* _tmp33_;
		ValadocDevhelpMarkupWriter* _tmp34_;
		_tmp24_ = self->priv->_devhelpwriter;
		_tmp25_ = node;
		_tmp26_ = valadoc_api_node_get_name (_tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = path;
		_tmp29_ = valadoc_devhelp_markup_writer_start_sub (_tmp24_, _tmp27_, _tmp28_);
		_tmp30_ = _tmp29_;
		_valadoc_markup_writer_unref0 (_tmp30_);
		_tmp31_ = node;
		valadoc_api_node_accept_all_children (_tmp31_, (ValadocApiVisitor*) self, TRUE);
		_tmp32_ = self->priv->_devhelpwriter;
		_tmp33_ = valadoc_devhelp_markup_writer_end_sub (_tmp32_);
		_tmp34_ = _tmp33_;
		_valadoc_markup_writer_unref0 (_tmp34_);
	}
	_tmp35_ = self->priv->nodes;
	_tmp36_ = node;
	vala_collection_add ((ValaCollection*) _tmp35_, _tmp36_);
	_fclose0 (file);
	_g_free0 (path);
	_g_free0 (rpath);
}


static void valadoc_devhelp_doclet_real_visit_namespace (ValadocApiVisitor* base, ValadocApiNamespace* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiNamespace* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_compound_node (self, (ValadocApiNode*) _tmp0_);
}


static void valadoc_devhelp_doclet_real_visit_interface (ValadocApiVisitor* base, ValadocApiInterface* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiInterface* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_compound_node (self, (ValadocApiNode*) _tmp0_);
}


static void valadoc_devhelp_doclet_real_visit_class (ValadocApiVisitor* base, ValadocApiClass* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiClass* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_compound_node (self, (ValadocApiNode*) _tmp0_);
}


static void valadoc_devhelp_doclet_real_visit_struct (ValadocApiVisitor* base, ValadocApiStruct* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiStruct* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_compound_node (self, (ValadocApiNode*) _tmp0_);
}


static void valadoc_devhelp_doclet_real_visit_error_domain (ValadocApiVisitor* base, ValadocApiErrorDomain* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiErrorDomain* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, TRUE);
}


static void valadoc_devhelp_doclet_real_visit_enum (ValadocApiVisitor* base, ValadocApiEnum* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiEnum* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, TRUE);
}


static void valadoc_devhelp_doclet_real_visit_property (ValadocApiVisitor* base, ValadocApiProperty* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiProperty* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_devhelp_doclet_real_visit_constant (ValadocApiVisitor* base, ValadocApiConstant* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiConstant* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_devhelp_doclet_real_visit_field (ValadocApiVisitor* base, ValadocApiField* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiField* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_devhelp_doclet_real_visit_error_code (ValadocApiVisitor* base, ValadocApiErrorCode* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiErrorCode* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_devhelp_doclet_real_visit_enum_value (ValadocApiVisitor* base, ValadocApiEnumValue* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiEnumValue* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_devhelp_doclet_real_visit_delegate (ValadocApiVisitor* base, ValadocApiDelegate* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiDelegate* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_devhelp_doclet_real_visit_signal (ValadocApiVisitor* base, ValadocApiSignal* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiSignal* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_devhelp_doclet_real_visit_method (ValadocApiVisitor* base, ValadocApiMethod* item) {
	ValadocDevhelpDoclet * self;
	ValadocApiMethod* _tmp0_;
	self = (ValadocDevhelpDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_devhelp_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


ValadocDevhelpDoclet* valadoc_devhelp_doclet_construct (GType object_type) {
	ValadocDevhelpDoclet * self = NULL;
	self = (ValadocDevhelpDoclet*) valadoc_html_basic_doclet_construct (object_type);
	return self;
}


ValadocDevhelpDoclet* valadoc_devhelp_doclet_new (void) {
	return valadoc_devhelp_doclet_construct (VALADOC_DEVHELP_TYPE_DOCLET);
}


static void valadoc_devhelp_doclet_class_init (ValadocDevhelpDocletClass * klass) {
	valadoc_devhelp_doclet_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ValadocDevhelpDocletPrivate));
	((ValadocHtmlBasicDocletClass *) klass)->get_icon_directory = (gchar* (*) (ValadocHtmlBasicDoclet *)) valadoc_devhelp_doclet_real_get_icon_directory;
	((ValadocHtmlBasicDocletClass *) klass)->process = (void (*) (ValadocHtmlBasicDoclet *, ValadocSettings*, ValadocApiTree*, ValadocErrorReporter*)) valadoc_devhelp_doclet_real_process;
	((ValadocApiVisitorClass *) klass)->visit_tree = (void (*) (ValadocApiVisitor *, ValadocApiTree*)) valadoc_devhelp_doclet_real_visit_tree;
	((ValadocApiVisitorClass *) klass)->visit_package = (void (*) (ValadocApiVisitor *, ValadocApiPackage*)) valadoc_devhelp_doclet_real_visit_package;
	((ValadocApiVisitorClass *) klass)->visit_namespace = (void (*) (ValadocApiVisitor *, ValadocApiNamespace*)) valadoc_devhelp_doclet_real_visit_namespace;
	((ValadocApiVisitorClass *) klass)->visit_interface = (void (*) (ValadocApiVisitor *, ValadocApiInterface*)) valadoc_devhelp_doclet_real_visit_interface;
	((ValadocApiVisitorClass *) klass)->visit_class = (void (*) (ValadocApiVisitor *, ValadocApiClass*)) valadoc_devhelp_doclet_real_visit_class;
	((ValadocApiVisitorClass *) klass)->visit_struct = (void (*) (ValadocApiVisitor *, ValadocApiStruct*)) valadoc_devhelp_doclet_real_visit_struct;
	((ValadocApiVisitorClass *) klass)->visit_error_domain = (void (*) (ValadocApiVisitor *, ValadocApiErrorDomain*)) valadoc_devhelp_doclet_real_visit_error_domain;
	((ValadocApiVisitorClass *) klass)->visit_enum = (void (*) (ValadocApiVisitor *, ValadocApiEnum*)) valadoc_devhelp_doclet_real_visit_enum;
	((ValadocApiVisitorClass *) klass)->visit_property = (void (*) (ValadocApiVisitor *, ValadocApiProperty*)) valadoc_devhelp_doclet_real_visit_property;
	((ValadocApiVisitorClass *) klass)->visit_constant = (void (*) (ValadocApiVisitor *, ValadocApiConstant*)) valadoc_devhelp_doclet_real_visit_constant;
	((ValadocApiVisitorClass *) klass)->visit_field = (void (*) (ValadocApiVisitor *, ValadocApiField*)) valadoc_devhelp_doclet_real_visit_field;
	((ValadocApiVisitorClass *) klass)->visit_error_code = (void (*) (ValadocApiVisitor *, ValadocApiErrorCode*)) valadoc_devhelp_doclet_real_visit_error_code;
	((ValadocApiVisitorClass *) klass)->visit_enum_value = (void (*) (ValadocApiVisitor *, ValadocApiEnumValue*)) valadoc_devhelp_doclet_real_visit_enum_value;
	((ValadocApiVisitorClass *) klass)->visit_delegate = (void (*) (ValadocApiVisitor *, ValadocApiDelegate*)) valadoc_devhelp_doclet_real_visit_delegate;
	((ValadocApiVisitorClass *) klass)->visit_signal = (void (*) (ValadocApiVisitor *, ValadocApiSignal*)) valadoc_devhelp_doclet_real_visit_signal;
	((ValadocApiVisitorClass *) klass)->visit_method = (void (*) (ValadocApiVisitor *, ValadocApiMethod*)) valadoc_devhelp_doclet_real_visit_method;
	G_OBJECT_CLASS (klass)->finalize = valadoc_devhelp_doclet_finalize;
}


static void valadoc_devhelp_doclet_instance_init (ValadocDevhelpDoclet * self) {
	GEqualFunc _tmp0_;
	ValaArrayList* _tmp1_;
	gchar* _tmp2_;
	self->priv = VALADOC_DEVHELP_DOCLET_GET_PRIVATE (self);
	_tmp0_ = g_direct_equal;
	_tmp1_ = vala_array_list_new (VALADOC_API_TYPE_NODE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	self->priv->nodes = _tmp1_;
	_tmp2_ = g_strdup ("");
	self->priv->package_dir_name = _tmp2_;
}


static void valadoc_devhelp_doclet_finalize (GObject * obj) {
	ValadocDevhelpDoclet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_DEVHELP_TYPE_DOCLET, ValadocDevhelpDoclet);
	_vala_iterable_unref0 (self->priv->nodes);
	_g_free0 (self->priv->package_dir_name);
	_valadoc_markup_writer_unref0 (self->priv->_devhelpwriter);
	G_OBJECT_CLASS (valadoc_devhelp_doclet_parent_class)->finalize (obj);
}


GType valadoc_devhelp_doclet_get_type (void) {
	static volatile gsize valadoc_devhelp_doclet_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_devhelp_doclet_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocDevhelpDocletClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_devhelp_doclet_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocDevhelpDoclet), 0, (GInstanceInitFunc) valadoc_devhelp_doclet_instance_init, NULL };
		GType valadoc_devhelp_doclet_type_id;
		valadoc_devhelp_doclet_type_id = g_type_register_static (VALADOC_HTML_TYPE_BASIC_DOCLET, "ValadocDevhelpDoclet", &g_define_type_info, 0);
		g_once_init_leave (&valadoc_devhelp_doclet_type_id__volatile, valadoc_devhelp_doclet_type_id);
	}
	return valadoc_devhelp_doclet_type_id__volatile;
}


GType register_plugin (ValadocModuleLoader* module_loader) {
	GType result = 0UL;
	g_return_val_if_fail (module_loader != NULL, 0UL);
	result = VALADOC_DEVHELP_TYPE_DOCLET;
	return result;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



