/* 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 <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <stdio.h>


#define VALADOC_HTML_TYPE_DOCLET (valadoc_html_doclet_get_type ())
#define VALADOC_HTML_DOCLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALADOC_HTML_TYPE_DOCLET, ValadocHtmlDoclet))
#define VALADOC_HTML_DOCLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALADOC_HTML_TYPE_DOCLET, ValadocHtmlDocletClass))
#define VALADOC_HTML_IS_DOCLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALADOC_HTML_TYPE_DOCLET))
#define VALADOC_HTML_IS_DOCLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALADOC_HTML_TYPE_DOCLET))
#define VALADOC_HTML_DOCLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALADOC_HTML_TYPE_DOCLET, ValadocHtmlDocletClass))

typedef struct _ValadocHtmlDoclet ValadocHtmlDoclet;
typedef struct _ValadocHtmlDocletClass ValadocHtmlDocletClass;
typedef struct _ValadocHtmlDocletPrivate ValadocHtmlDocletPrivate;
enum  {
	VALADOC_HTML_DOCLET_0_PROPERTY,
	VALADOC_HTML_DOCLET_NUM_PROPERTIES
};
static GParamSpec* valadoc_html_doclet_properties[VALADOC_HTML_DOCLET_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define VALADOC_HTML_DOCLET_TYPE_INDEX_LINK_HELPER (valadoc_html_doclet_index_link_helper_get_type ())
#define VALADOC_HTML_DOCLET_INDEX_LINK_HELPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALADOC_HTML_DOCLET_TYPE_INDEX_LINK_HELPER, ValadocHtmlDocletIndexLinkHelper))
#define VALADOC_HTML_DOCLET_INDEX_LINK_HELPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALADOC_HTML_DOCLET_TYPE_INDEX_LINK_HELPER, ValadocHtmlDocletIndexLinkHelperClass))
#define VALADOC_HTML_DOCLET_IS_INDEX_LINK_HELPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALADOC_HTML_DOCLET_TYPE_INDEX_LINK_HELPER))
#define VALADOC_HTML_DOCLET_IS_INDEX_LINK_HELPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALADOC_HTML_DOCLET_TYPE_INDEX_LINK_HELPER))
#define VALADOC_HTML_DOCLET_INDEX_LINK_HELPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALADOC_HTML_DOCLET_TYPE_INDEX_LINK_HELPER, ValadocHtmlDocletIndexLinkHelperClass))

typedef struct _ValadocHtmlDocletIndexLinkHelper ValadocHtmlDocletIndexLinkHelper;
typedef struct _ValadocHtmlDocletIndexLinkHelperClass ValadocHtmlDocletIndexLinkHelperClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (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)))
typedef struct _ValadocHtmlDocletIndexLinkHelperPrivate ValadocHtmlDocletIndexLinkHelperPrivate;
enum  {
	VALADOC_HTML_DOCLET_INDEX_LINK_HELPER_0_PROPERTY,
	VALADOC_HTML_DOCLET_INDEX_LINK_HELPER_NUM_PROPERTIES
};
static GParamSpec* valadoc_html_doclet_index_link_helper_properties[VALADOC_HTML_DOCLET_INDEX_LINK_HELPER_NUM_PROPERTIES];

struct _ValadocHtmlDoclet {
	ValadocHtmlBasicDoclet parent_instance;
	ValadocHtmlDocletPrivate * priv;
};

struct _ValadocHtmlDocletClass {
	ValadocHtmlBasicDocletClass parent_class;
};

struct _ValadocHtmlDocletIndexLinkHelper {
	ValadocHtmlLinkHelper parent_instance;
	ValadocHtmlDocletIndexLinkHelperPrivate * priv;
};

struct _ValadocHtmlDocletIndexLinkHelperClass {
	ValadocHtmlLinkHelperClass parent_class;
};


static gpointer valadoc_html_doclet_parent_class = NULL;
static gpointer valadoc_html_doclet_index_link_helper_parent_class = NULL;

GType valadoc_html_doclet_get_type (void) G_GNUC_CONST;
#define VALADOC_HTML_DOCLET_css_path_package "style.css"
#define VALADOC_HTML_DOCLET_css_path_wiki "../style.css"
#define VALADOC_HTML_DOCLET_css_path "../style.css"
#define VALADOC_HTML_DOCLET_js_path_package "scripts.js"
#define VALADOC_HTML_DOCLET_js_path_wiki "../scripts.js"
#define VALADOC_HTML_DOCLET_js_path "../scripts.js"
static gchar* valadoc_html_doclet_get_real_path (ValadocHtmlDoclet* self, ValadocApiNode* element);
static void valadoc_html_doclet_real_process (ValadocHtmlBasicDoclet* base, ValadocSettings* settings, ValadocApiTree* tree, ValadocErrorReporter* reporter);
static GType valadoc_html_doclet_index_link_helper_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static ValadocHtmlDocletIndexLinkHelper* valadoc_html_doclet_index_link_helper_new (void);
static ValadocHtmlDocletIndexLinkHelper* valadoc_html_doclet_index_link_helper_construct (GType object_type);
static gboolean _vala_string_array_contains (gchar* * stack, int stack_length, gchar* needle);
static void valadoc_html_doclet_real_visit_tree (ValadocApiVisitor* base, ValadocApiTree* tree);
static void valadoc_html_doclet_real_visit_package (ValadocApiVisitor* base, ValadocApiPackage* package);
static void valadoc_html_doclet_real_visit_namespace (ValadocApiVisitor* base, ValadocApiNamespace* ns);
static void valadoc_html_doclet_process_node (ValadocHtmlDoclet* self, ValadocApiNode* node, gboolean accept_all_children);
static void valadoc_html_doclet_real_visit_interface (ValadocApiVisitor* base, ValadocApiInterface* item);
static void valadoc_html_doclet_real_visit_class (ValadocApiVisitor* base, ValadocApiClass* item);
static void valadoc_html_doclet_real_visit_struct (ValadocApiVisitor* base, ValadocApiStruct* item);
static void valadoc_html_doclet_real_visit_error_domain (ValadocApiVisitor* base, ValadocApiErrorDomain* item);
static void valadoc_html_doclet_real_visit_enum (ValadocApiVisitor* base, ValadocApiEnum* item);
static void valadoc_html_doclet_real_visit_property (ValadocApiVisitor* base, ValadocApiProperty* item);
static void valadoc_html_doclet_real_visit_constant (ValadocApiVisitor* base, ValadocApiConstant* item);
static void valadoc_html_doclet_real_visit_field (ValadocApiVisitor* base, ValadocApiField* item);
static void valadoc_html_doclet_real_visit_error_code (ValadocApiVisitor* base, ValadocApiErrorCode* item);
static void valadoc_html_doclet_real_visit_enum_value (ValadocApiVisitor* base, ValadocApiEnumValue* item);
static void valadoc_html_doclet_real_visit_delegate (ValadocApiVisitor* base, ValadocApiDelegate* item);
static void valadoc_html_doclet_real_visit_signal (ValadocApiVisitor* base, ValadocApiSignal* item);
static void valadoc_html_doclet_real_visit_method (ValadocApiVisitor* base, ValadocApiMethod* item);
ValadocHtmlDoclet* valadoc_html_doclet_new (void);
ValadocHtmlDoclet* valadoc_html_doclet_construct (GType object_type);
static gchar* valadoc_html_doclet_index_link_helper_real_from_wiki_to_package (ValadocHtmlLinkHelper* base, ValadocWikiPage* from, ValadocApiPackage* to);
static gchar* valadoc_html_doclet_index_link_helper_real_from_wiki_to_wiki (ValadocHtmlLinkHelper* base, ValadocWikiPage* from, ValadocWikiPage* to);
static gchar* valadoc_html_doclet_index_link_helper_real_from_wiki_to_node (ValadocHtmlLinkHelper* base, ValadocWikiPage* from, ValadocApiNode* to);
GType register_plugin (ValadocModuleLoader* module_loader);


static gchar* valadoc_html_doclet_get_real_path (ValadocHtmlDoclet* self, ValadocApiNode* element) {
	gchar* result = NULL;
	ValadocSettings* _tmp0_;
	ValadocSettings* _tmp1_;
	const gchar* _tmp2_;
	ValadocApiNode* _tmp3_;
	ValadocApiPackage* _tmp4_;
	ValadocApiPackage* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	ValadocApiNode* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	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_ = element;
	_tmp4_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = element;
	_tmp9_ = valadoc_api_node_get_full_name (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strconcat (_tmp10_, ".html", NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_build_filename (_tmp2_, _tmp7_, _tmp12_, NULL);
	_tmp14_ = _tmp13_;
	_g_free0 (_tmp12_);
	_g_free0 (_tmp10_);
	result = _tmp14_;
	return result;
}


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


static gboolean _vala_string_array_contains (gchar* * stack, int stack_length, gchar* needle) {
	int i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}


static void valadoc_html_doclet_real_process (ValadocHtmlBasicDoclet* base, ValadocSettings* settings, ValadocApiTree* tree, ValadocErrorReporter* reporter) {
	ValadocHtmlDoclet * self;
	ValadocSettings* _tmp0_;
	ValadocApiTree* _tmp1_;
	ValadocErrorReporter* _tmp2_;
	ValadocSettings* _tmp3_;
	ValadocSettings* _tmp4_;
	const gchar* _tmp5_;
	ValadocSettings* _tmp6_;
	const gchar* _tmp7_;
	ValadocApiTree* _tmp8_;
	ValadocSettings* _tmp9_;
	const gchar* _tmp10_;
	ValadocSettings* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	ValadocHtmlHtmlRenderer* tmp = NULL;
	ValadocHtmlHtmlRenderer* _tmp15_;
	ValadocHtmlHtmlRenderer* _tmp16_;
	ValadocHtmlDocletIndexLinkHelper* link_helper = NULL;
	ValadocHtmlDocletIndexLinkHelper* _tmp17_;
	gboolean _tmp18_ = FALSE;
	ValadocSettings* _tmp19_;
	gchar** _tmp20_;
	gint _tmp20__length1;
	ValadocSettings* _tmp24_;
	ValadocHtmlDocletIndexLinkHelper* _tmp25_;
	ValadocHtmlCssClassResolver* _tmp26_;
	ValadocHtmlHtmlRenderer* _tmp27_;
	FILE* file = NULL;
	ValadocSettings* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	FILE* _tmp32_;
	FILE* _tmp33_;
	FILE* _tmp34_;
	ValadocHtmlMarkupWriter* _tmp35_;
	ValadocHtmlHtmlRenderer* _tmp36_;
	ValadocHtmlMarkupWriter* _tmp37_;
	ValadocSettings* _tmp38_;
	const gchar* _tmp39_;
	ValadocApiTree* _tmp40_;
	ValadocApiTree* _tmp41_;
	ValadocHtmlHtmlRenderer* _tmp42_;
	ValadocHtmlHtmlRenderer* _tmp43_;
	ValadocApiTree* _tmp44_;
	self = (ValadocHtmlDoclet*) 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_html_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_ = settings;
	_tmp7_ = _tmp6_->path;
	valadoc_copy_directory (PACKAGE_ICONDIR, _tmp7_);
	_tmp8_ = tree;
	_tmp9_ = settings;
	_tmp10_ = _tmp9_->path;
	_tmp11_ = settings;
	_tmp12_ = _tmp11_->pkg_name;
	_tmp13_ = g_build_filename (_tmp10_, _tmp12_, NULL);
	_tmp14_ = _tmp13_;
	valadoc_html_basic_doclet_write_wiki_pages ((ValadocHtmlBasicDoclet*) self, _tmp8_, VALADOC_HTML_DOCLET_css_path_wiki, VALADOC_HTML_DOCLET_js_path_wiki, _tmp14_);
	_g_free0 (_tmp14_);
	_tmp15_ = ((ValadocHtmlBasicDoclet*) self)->_renderer;
	_tmp16_ = _g_object_ref0 (_tmp15_);
	tmp = _tmp16_;
	_tmp17_ = valadoc_html_doclet_index_link_helper_new ();
	link_helper = _tmp17_;
	_tmp19_ = settings;
	_tmp20_ = _tmp19_->pluginargs;
	_tmp20__length1 = _tmp19_->pluginargs_length1;
	if (_tmp20_ != NULL) {
		ValadocSettings* _tmp21_;
		gchar** _tmp22_;
		gint _tmp22__length1;
		_tmp21_ = settings;
		_tmp22_ = _tmp21_->pluginargs;
		_tmp22__length1 = _tmp21_->pluginargs_length1;
		_tmp18_ = _vala_string_array_contains (_tmp22_, _tmp22__length1, "--no-browsable-check");
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		ValadocHtmlDocletIndexLinkHelper* _tmp23_;
		_tmp23_ = link_helper;
		valadoc_html_link_helper_set_enable_browsable_check ((ValadocHtmlLinkHelper*) _tmp23_, FALSE);
	}
	_tmp24_ = settings;
	_tmp25_ = link_helper;
	_tmp26_ = ((ValadocHtmlBasicDoclet*) self)->cssresolver;
	_tmp27_ = valadoc_html_html_renderer_new (_tmp24_, (ValadocHtmlLinkHelper*) _tmp25_, _tmp26_);
	_g_object_unref0 (((ValadocHtmlBasicDoclet*) self)->_renderer);
	((ValadocHtmlBasicDoclet*) self)->_renderer = _tmp27_;
	_tmp28_ = settings;
	_tmp29_ = _tmp28_->path;
	_tmp30_ = g_build_filename (_tmp29_, "index.html", NULL);
	_tmp31_ = _tmp30_;
	_tmp32_ = g_fopen (_tmp31_, "w");
	_tmp33_ = _tmp32_;
	_g_free0 (_tmp31_);
	file = _tmp33_;
	_tmp34_ = file;
	_tmp35_ = valadoc_html_markup_writer_new (_tmp34_, TRUE);
	_valadoc_markup_writer_unref0 (((ValadocHtmlBasicDoclet*) self)->writer);
	((ValadocHtmlBasicDoclet*) self)->writer = _tmp35_;
	_tmp36_ = ((ValadocHtmlBasicDoclet*) self)->_renderer;
	_tmp37_ = ((ValadocHtmlBasicDoclet*) self)->writer;
	valadoc_html_html_renderer_set_writer (_tmp36_, _tmp37_);
	_tmp38_ = settings;
	_tmp39_ = _tmp38_->pkg_name;
	valadoc_html_basic_doclet_write_file_header ((ValadocHtmlBasicDoclet*) self, VALADOC_HTML_DOCLET_css_path_package, VALADOC_HTML_DOCLET_js_path_package, _tmp39_);
	_tmp40_ = tree;
	valadoc_html_basic_doclet_write_navi_packages ((ValadocHtmlBasicDoclet*) self, _tmp40_);
	_tmp41_ = tree;
	valadoc_html_basic_doclet_write_package_index_content ((ValadocHtmlBasicDoclet*) self, _tmp41_);
	valadoc_html_basic_doclet_write_file_footer ((ValadocHtmlBasicDoclet*) self);
	_tmp42_ = tmp;
	_tmp43_ = _g_object_ref0 (_tmp42_);
	_g_object_unref0 (((ValadocHtmlBasicDoclet*) self)->_renderer);
	((ValadocHtmlBasicDoclet*) self)->_renderer = _tmp43_;
	_fclose0 (file);
	file = NULL;
	_tmp44_ = tree;
	valadoc_api_tree_accept (_tmp44_, (ValadocApiVisitor*) self);
	_fclose0 (file);
	_g_object_unref0 (link_helper);
	_g_object_unref0 (tmp);
}


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


static void valadoc_html_doclet_real_visit_package (ValadocApiVisitor* base, ValadocApiPackage* package) {
	ValadocHtmlDoclet * 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_;
	gint rt = 0;
	const gchar* _tmp13_;
	gint _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gint _tmp18_;
	FILE* file = NULL;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	FILE* _tmp22_;
	FILE* _tmp23_;
	FILE* _tmp24_;
	ValadocHtmlMarkupWriter* _tmp25_;
	ValadocHtmlHtmlRenderer* _tmp26_;
	ValadocHtmlMarkupWriter* _tmp27_;
	const gchar* _tmp28_;
	ValadocApiPackage* _tmp29_;
	ValadocApiPackage* _tmp30_;
	ValadocApiPackage* _tmp31_;
	ValadocApiPackage* _tmp32_;
	self = (ValadocHtmlDoclet*) 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_mkdir (_tmp13_, 0777);
	rt = _tmp14_;
	_tmp15_ = path;
	_tmp16_ = g_build_filename (_tmp15_, "img", NULL);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_mkdir (_tmp17_, 0777);
	rt = _tmp18_;
	_g_free0 (_tmp17_);
	_tmp19_ = path;
	_tmp20_ = g_build_filename (_tmp19_, "index.htm", NULL);
	_tmp21_ = _tmp20_;
	_tmp22_ = g_fopen (_tmp21_, "w");
	_tmp23_ = _tmp22_;
	_g_free0 (_tmp21_);
	file = _tmp23_;
	_tmp24_ = file;
	_tmp25_ = valadoc_html_markup_writer_new (_tmp24_, TRUE);
	_valadoc_markup_writer_unref0 (((ValadocHtmlBasicDoclet*) self)->writer);
	((ValadocHtmlBasicDoclet*) self)->writer = _tmp25_;
	_tmp26_ = ((ValadocHtmlBasicDoclet*) self)->_renderer;
	_tmp27_ = ((ValadocHtmlBasicDoclet*) self)->writer;
	valadoc_html_html_renderer_set_writer (_tmp26_, _tmp27_);
	_tmp28_ = pkg_name;
	valadoc_html_basic_doclet_write_file_header ((ValadocHtmlBasicDoclet*) self, VALADOC_HTML_DOCLET_css_path, VALADOC_HTML_DOCLET_js_path, _tmp28_);
	_tmp29_ = package;
	valadoc_html_basic_doclet_write_navi_package ((ValadocHtmlBasicDoclet*) self, _tmp29_);
	_tmp30_ = package;
	_tmp31_ = package;
	valadoc_html_basic_doclet_write_package_content ((ValadocHtmlBasicDoclet*) self, _tmp30_, (ValadocApiNode*) _tmp31_);
	valadoc_html_basic_doclet_write_file_footer ((ValadocHtmlBasicDoclet*) self);
	_fclose0 (file);
	file = NULL;
	_tmp32_ = package;
	valadoc_api_node_accept_all_children ((ValadocApiNode*) _tmp32_, (ValadocApiVisitor*) self, TRUE);
	_fclose0 (file);
	_g_free0 (path);
	_g_free0 (pkg_name);
}


static void valadoc_html_doclet_real_visit_namespace (ValadocApiVisitor* base, ValadocApiNamespace* ns) {
	ValadocHtmlDoclet * self;
	gchar* rpath = NULL;
	ValadocApiNamespace* _tmp0_;
	gchar* _tmp1_;
	ValadocApiNamespace* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	ValadocApiNamespace* _tmp26_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (ns != NULL);
	_tmp0_ = ns;
	_tmp1_ = valadoc_html_doclet_get_real_path (self, (ValadocApiNode*) _tmp0_);
	rpath = _tmp1_;
	_tmp2_ = ns;
	_tmp3_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != NULL) {
		FILE* file = NULL;
		const gchar* _tmp5_;
		FILE* _tmp6_;
		FILE* _tmp7_;
		ValadocHtmlMarkupWriter* _tmp8_;
		ValadocHtmlHtmlRenderer* _tmp9_;
		ValadocHtmlMarkupWriter* _tmp10_;
		ValadocApiNamespace* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		ValadocApiNamespace* _tmp16_;
		ValadocApiPackage* _tmp17_;
		ValadocApiPackage* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		ValadocApiNamespace* _tmp23_;
		ValadocApiNamespace* _tmp24_;
		ValadocApiNamespace* _tmp25_;
		_tmp5_ = rpath;
		_tmp6_ = g_fopen (_tmp5_, "w");
		file = _tmp6_;
		_tmp7_ = file;
		_tmp8_ = valadoc_html_markup_writer_new (_tmp7_, TRUE);
		_valadoc_markup_writer_unref0 (((ValadocHtmlBasicDoclet*) self)->writer);
		((ValadocHtmlBasicDoclet*) self)->writer = _tmp8_;
		_tmp9_ = ((ValadocHtmlBasicDoclet*) self)->_renderer;
		_tmp10_ = ((ValadocHtmlBasicDoclet*) self)->writer;
		valadoc_html_html_renderer_set_writer (_tmp9_, _tmp10_);
		_tmp11_ = ns;
		_tmp12_ = valadoc_api_node_get_full_name ((ValadocApiNode*) _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = g_strconcat (_tmp13_, " &ndash; ", NULL);
		_tmp15_ = _tmp14_;
		_tmp16_ = ns;
		_tmp17_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = g_strconcat (_tmp15_, _tmp20_, NULL);
		_tmp22_ = _tmp21_;
		valadoc_html_basic_doclet_write_file_header ((ValadocHtmlBasicDoclet*) self, VALADOC_HTML_DOCLET_css_path, VALADOC_HTML_DOCLET_js_path, _tmp22_);
		_g_free0 (_tmp22_);
		_g_free0 (_tmp15_);
		_g_free0 (_tmp13_);
		_tmp23_ = ns;
		valadoc_html_basic_doclet_write_navi_symbol ((ValadocHtmlBasicDoclet*) self, (ValadocApiNode*) _tmp23_);
		_tmp24_ = ns;
		_tmp25_ = ns;
		valadoc_html_basic_doclet_write_namespace_content ((ValadocHtmlBasicDoclet*) self, _tmp24_, (ValadocApiNode*) _tmp25_);
		valadoc_html_basic_doclet_write_file_footer ((ValadocHtmlBasicDoclet*) self);
		_fclose0 (file);
		file = NULL;
		_fclose0 (file);
	}
	_tmp26_ = ns;
	valadoc_api_node_accept_all_children ((ValadocApiNode*) _tmp26_, (ValadocApiVisitor*) self, TRUE);
	_g_free0 (rpath);
}


static void valadoc_html_doclet_process_node (ValadocHtmlDoclet* self, ValadocApiNode* node, gboolean accept_all_children) {
	gchar* rpath = NULL;
	ValadocApiNode* _tmp0_;
	gchar* _tmp1_;
	FILE* file = NULL;
	const gchar* _tmp2_;
	FILE* _tmp3_;
	FILE* _tmp4_;
	ValadocHtmlMarkupWriter* _tmp5_;
	ValadocHtmlHtmlRenderer* _tmp6_;
	ValadocHtmlMarkupWriter* _tmp7_;
	ValadocApiNode* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	ValadocApiNode* _tmp13_;
	ValadocApiPackage* _tmp14_;
	ValadocApiPackage* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	ValadocApiNode* _tmp20_;
	gboolean _tmp21_;
	ValadocApiNode* _tmp24_;
	gboolean _tmp25_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = node;
	_tmp1_ = valadoc_html_doclet_get_real_path (self, _tmp0_);
	rpath = _tmp1_;
	_tmp2_ = rpath;
	_tmp3_ = g_fopen (_tmp2_, "w");
	file = _tmp3_;
	_tmp4_ = file;
	_tmp5_ = valadoc_html_markup_writer_new (_tmp4_, TRUE);
	_valadoc_markup_writer_unref0 (((ValadocHtmlBasicDoclet*) self)->writer);
	((ValadocHtmlBasicDoclet*) self)->writer = _tmp5_;
	_tmp6_ = ((ValadocHtmlBasicDoclet*) self)->_renderer;
	_tmp7_ = ((ValadocHtmlBasicDoclet*) self)->writer;
	valadoc_html_html_renderer_set_writer (_tmp6_, _tmp7_);
	_tmp8_ = node;
	_tmp9_ = valadoc_api_node_get_full_name (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strconcat (_tmp10_, " &ndash; ", NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = node;
	_tmp14_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_strconcat (_tmp12_, _tmp17_, NULL);
	_tmp19_ = _tmp18_;
	valadoc_html_basic_doclet_write_file_header ((ValadocHtmlBasicDoclet*) self, VALADOC_HTML_DOCLET_css_path, VALADOC_HTML_DOCLET_js_path, _tmp19_);
	_g_free0 (_tmp19_);
	_g_free0 (_tmp12_);
	_g_free0 (_tmp10_);
	_tmp20_ = node;
	_tmp21_ = valadoc_html_basic_doclet_is_internal_node ((ValadocHtmlBasicDoclet*) self, _tmp20_);
	if (_tmp21_) {
		ValadocApiNode* _tmp22_;
		_tmp22_ = node;
		valadoc_html_basic_doclet_write_navi_symbol ((ValadocHtmlBasicDoclet*) self, _tmp22_);
	} else {
		ValadocApiNode* _tmp23_;
		_tmp23_ = node;
		valadoc_html_basic_doclet_write_navi_leaf_symbol ((ValadocHtmlBasicDoclet*) self, _tmp23_);
	}
	_tmp24_ = node;
	valadoc_html_basic_doclet_write_symbol_content ((ValadocHtmlBasicDoclet*) self, _tmp24_);
	valadoc_html_basic_doclet_write_file_footer ((ValadocHtmlBasicDoclet*) self);
	_fclose0 (file);
	file = NULL;
	_tmp25_ = accept_all_children;
	if (_tmp25_) {
		ValadocApiNode* _tmp26_;
		_tmp26_ = node;
		valadoc_api_node_accept_all_children (_tmp26_, (ValadocApiVisitor*) self, TRUE);
	}
	_fclose0 (file);
	_g_free0 (rpath);
}


static void valadoc_html_doclet_real_visit_interface (ValadocApiVisitor* base, ValadocApiInterface* item) {
	ValadocHtmlDoclet * self;
	ValadocApiInterface* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, TRUE);
}


static void valadoc_html_doclet_real_visit_class (ValadocApiVisitor* base, ValadocApiClass* item) {
	ValadocHtmlDoclet * self;
	ValadocApiClass* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, TRUE);
}


static void valadoc_html_doclet_real_visit_struct (ValadocApiVisitor* base, ValadocApiStruct* item) {
	ValadocHtmlDoclet * self;
	ValadocApiStruct* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, TRUE);
}


static void valadoc_html_doclet_real_visit_error_domain (ValadocApiVisitor* base, ValadocApiErrorDomain* item) {
	ValadocHtmlDoclet * self;
	ValadocApiErrorDomain* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, TRUE);
}


static void valadoc_html_doclet_real_visit_enum (ValadocApiVisitor* base, ValadocApiEnum* item) {
	ValadocHtmlDoclet * self;
	ValadocApiEnum* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, TRUE);
}


static void valadoc_html_doclet_real_visit_property (ValadocApiVisitor* base, ValadocApiProperty* item) {
	ValadocHtmlDoclet * self;
	ValadocApiProperty* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_html_doclet_real_visit_constant (ValadocApiVisitor* base, ValadocApiConstant* item) {
	ValadocHtmlDoclet * self;
	ValadocApiConstant* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_html_doclet_real_visit_field (ValadocApiVisitor* base, ValadocApiField* item) {
	ValadocHtmlDoclet * self;
	ValadocApiField* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_html_doclet_real_visit_error_code (ValadocApiVisitor* base, ValadocApiErrorCode* item) {
	ValadocHtmlDoclet * self;
	ValadocApiErrorCode* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_html_doclet_real_visit_enum_value (ValadocApiVisitor* base, ValadocApiEnumValue* item) {
	ValadocHtmlDoclet * self;
	ValadocApiEnumValue* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_html_doclet_real_visit_delegate (ValadocApiVisitor* base, ValadocApiDelegate* item) {
	ValadocHtmlDoclet * self;
	ValadocApiDelegate* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_html_doclet_real_visit_signal (ValadocApiVisitor* base, ValadocApiSignal* item) {
	ValadocHtmlDoclet * self;
	ValadocApiSignal* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


static void valadoc_html_doclet_real_visit_method (ValadocApiVisitor* base, ValadocApiMethod* item) {
	ValadocHtmlDoclet * self;
	ValadocApiMethod* _tmp0_;
	self = (ValadocHtmlDoclet*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	valadoc_html_doclet_process_node (self, (ValadocApiNode*) _tmp0_, FALSE);
}


ValadocHtmlDoclet* valadoc_html_doclet_construct (GType object_type) {
	ValadocHtmlDoclet * self = NULL;
	self = (ValadocHtmlDoclet*) valadoc_html_basic_doclet_construct (object_type);
	return self;
}


ValadocHtmlDoclet* valadoc_html_doclet_new (void) {
	return valadoc_html_doclet_construct (VALADOC_HTML_TYPE_DOCLET);
}


static gchar* valadoc_html_doclet_index_link_helper_real_from_wiki_to_package (ValadocHtmlLinkHelper* base, ValadocWikiPage* from, ValadocApiPackage* to) {
	ValadocHtmlDocletIndexLinkHelper * self;
	gchar* result = NULL;
	ValadocWikiPage* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ValadocApiPackage* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	ValadocApiPackage* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	self = (ValadocHtmlDocletIndexLinkHelper*) base;
	g_return_val_if_fail (from != NULL, NULL);
	g_return_val_if_fail (to != NULL, NULL);
	_tmp0_ = from;
	_tmp1_ = valadoc_wiki_page_get_name (_tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (_tmp2_, "index.valadoc") != 0) {
		ValadocWikiPage* _tmp3_;
		ValadocApiPackage* _tmp4_;
		gchar* _tmp5_;
		_tmp3_ = from;
		_tmp4_ = to;
		_tmp5_ = VALADOC_HTML_LINK_HELPER_CLASS (valadoc_html_doclet_index_link_helper_parent_class)->from_wiki_to_package (G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_HTML_TYPE_LINK_HELPER, ValadocHtmlLinkHelper), _tmp3_, _tmp4_);
		result = _tmp5_;
		return result;
	}
	_tmp6_ = to;
	_tmp7_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = to;
	_tmp10_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strconcat (_tmp11_, ".htm", NULL);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_build_filename (_tmp8_, _tmp13_, NULL);
	_tmp15_ = _tmp14_;
	_g_free0 (_tmp13_);
	result = _tmp15_;
	return result;
}


static gchar* valadoc_html_doclet_index_link_helper_real_from_wiki_to_wiki (ValadocHtmlLinkHelper* base, ValadocWikiPage* from, ValadocWikiPage* to) {
	ValadocHtmlDocletIndexLinkHelper * self;
	gchar* result = NULL;
	ValadocWikiPage* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ValadocSettings* _tmp6_;
	const gchar* _tmp7_;
	ValadocWikiPage* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	self = (ValadocHtmlDocletIndexLinkHelper*) base;
	g_return_val_if_fail (from != NULL, NULL);
	g_return_val_if_fail (to != NULL, NULL);
	_tmp0_ = from;
	_tmp1_ = valadoc_wiki_page_get_name (_tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (_tmp2_, "index.valadoc") != 0) {
		ValadocWikiPage* _tmp3_;
		ValadocWikiPage* _tmp4_;
		gchar* _tmp5_;
		_tmp3_ = from;
		_tmp4_ = to;
		_tmp5_ = VALADOC_HTML_LINK_HELPER_CLASS (valadoc_html_doclet_index_link_helper_parent_class)->from_wiki_to_wiki (G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_HTML_TYPE_LINK_HELPER, ValadocHtmlLinkHelper), _tmp3_, _tmp4_);
		result = _tmp5_;
		return result;
	}
	_tmp6_ = ((ValadocHtmlLinkHelper*) self)->_settings;
	_tmp7_ = _tmp6_->pkg_name;
	_tmp8_ = to;
	_tmp9_ = valadoc_html_link_helper_translate_wiki_name ((ValadocHtmlLinkHelper*) self, _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_build_filename (_tmp7_, _tmp10_, NULL);
	_tmp12_ = _tmp11_;
	_g_free0 (_tmp10_);
	result = _tmp12_;
	return result;
}


static gchar* valadoc_html_doclet_index_link_helper_real_from_wiki_to_node (ValadocHtmlLinkHelper* base, ValadocWikiPage* from, ValadocApiNode* to) {
	ValadocHtmlDocletIndexLinkHelper * self;
	gchar* result = NULL;
	ValadocWikiPage* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValadocApiNode* _tmp18_;
	ValadocApiPackage* _tmp19_;
	ValadocApiPackage* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	ValadocApiNode* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	self = (ValadocHtmlDocletIndexLinkHelper*) base;
	g_return_val_if_fail (from != NULL, NULL);
	g_return_val_if_fail (to != NULL, NULL);
	_tmp0_ = from;
	_tmp1_ = valadoc_wiki_page_get_name (_tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (_tmp2_, "index.valadoc") != 0) {
		ValadocWikiPage* _tmp3_;
		ValadocApiNode* _tmp4_;
		gchar* _tmp5_;
		_tmp3_ = from;
		_tmp4_ = to;
		_tmp5_ = VALADOC_HTML_LINK_HELPER_CLASS (valadoc_html_doclet_index_link_helper_parent_class)->from_wiki_to_node (G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_HTML_TYPE_LINK_HELPER, ValadocHtmlLinkHelper), _tmp3_, _tmp4_);
		result = _tmp5_;
		return result;
	}
	_tmp7_ = valadoc_html_link_helper_get_enable_browsable_check ((ValadocHtmlLinkHelper*) self);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		gboolean _tmp9_ = FALSE;
		ValadocApiNode* _tmp10_;
		ValadocSettings* _tmp11_;
		gboolean _tmp12_;
		_tmp10_ = to;
		_tmp11_ = ((ValadocHtmlLinkHelper*) self)->_settings;
		_tmp12_ = valadoc_api_node_is_browsable (_tmp10_, _tmp11_);
		if (!_tmp12_) {
			_tmp9_ = TRUE;
		} else {
			ValadocApiNode* _tmp13_;
			ValadocApiPackage* _tmp14_;
			ValadocApiPackage* _tmp15_;
			ValadocSettings* _tmp16_;
			gboolean _tmp17_;
			_tmp13_ = to;
			_tmp14_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = ((ValadocHtmlLinkHelper*) self)->_settings;
			_tmp17_ = valadoc_api_node_is_browsable ((ValadocApiNode*) _tmp15_, _tmp16_);
			_tmp9_ = !_tmp17_;
		}
		_tmp6_ = _tmp9_;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		result = NULL;
		return result;
	}
	_tmp18_ = to;
	_tmp19_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = to;
	_tmp24_ = valadoc_api_node_get_full_name (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = g_strconcat (_tmp25_, ".html", NULL);
	_tmp27_ = _tmp26_;
	_tmp28_ = g_build_filename (_tmp22_, _tmp27_, NULL);
	_tmp29_ = _tmp28_;
	_g_free0 (_tmp27_);
	_g_free0 (_tmp25_);
	result = _tmp29_;
	return result;
}


static ValadocHtmlDocletIndexLinkHelper* valadoc_html_doclet_index_link_helper_construct (GType object_type) {
	ValadocHtmlDocletIndexLinkHelper * self = NULL;
	self = (ValadocHtmlDocletIndexLinkHelper*) valadoc_html_link_helper_construct (object_type);
	return self;
}


static ValadocHtmlDocletIndexLinkHelper* valadoc_html_doclet_index_link_helper_new (void) {
	return valadoc_html_doclet_index_link_helper_construct (VALADOC_HTML_DOCLET_TYPE_INDEX_LINK_HELPER);
}


static void valadoc_html_doclet_index_link_helper_class_init (ValadocHtmlDocletIndexLinkHelperClass * klass) {
	valadoc_html_doclet_index_link_helper_parent_class = g_type_class_peek_parent (klass);
	((ValadocHtmlLinkHelperClass *) klass)->from_wiki_to_package = (gchar* (*) (ValadocHtmlLinkHelper *, ValadocWikiPage*, ValadocApiPackage*)) valadoc_html_doclet_index_link_helper_real_from_wiki_to_package;
	((ValadocHtmlLinkHelperClass *) klass)->from_wiki_to_wiki = (gchar* (*) (ValadocHtmlLinkHelper *, ValadocWikiPage*, ValadocWikiPage*)) valadoc_html_doclet_index_link_helper_real_from_wiki_to_wiki;
	((ValadocHtmlLinkHelperClass *) klass)->from_wiki_to_node = (gchar* (*) (ValadocHtmlLinkHelper *, ValadocWikiPage*, ValadocApiNode*)) valadoc_html_doclet_index_link_helper_real_from_wiki_to_node;
}


static void valadoc_html_doclet_index_link_helper_instance_init (ValadocHtmlDocletIndexLinkHelper * self) {
}


static GType valadoc_html_doclet_index_link_helper_get_type (void) {
	static volatile gsize valadoc_html_doclet_index_link_helper_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_html_doclet_index_link_helper_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocHtmlDocletIndexLinkHelperClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_html_doclet_index_link_helper_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocHtmlDocletIndexLinkHelper), 0, (GInstanceInitFunc) valadoc_html_doclet_index_link_helper_instance_init, NULL };
		GType valadoc_html_doclet_index_link_helper_type_id;
		valadoc_html_doclet_index_link_helper_type_id = g_type_register_static (VALADOC_HTML_TYPE_LINK_HELPER, "ValadocHtmlDocletIndexLinkHelper", &g_define_type_info, 0);
		g_once_init_leave (&valadoc_html_doclet_index_link_helper_type_id__volatile, valadoc_html_doclet_index_link_helper_type_id);
	}
	return valadoc_html_doclet_index_link_helper_type_id__volatile;
}


static void valadoc_html_doclet_class_init (ValadocHtmlDocletClass * klass) {
	valadoc_html_doclet_parent_class = g_type_class_peek_parent (klass);
	((ValadocHtmlBasicDocletClass *) klass)->process = (void (*) (ValadocHtmlBasicDoclet *, ValadocSettings*, ValadocApiTree*, ValadocErrorReporter*)) valadoc_html_doclet_real_process;
	((ValadocApiVisitorClass *) klass)->visit_tree = (void (*) (ValadocApiVisitor *, ValadocApiTree*)) valadoc_html_doclet_real_visit_tree;
	((ValadocApiVisitorClass *) klass)->visit_package = (void (*) (ValadocApiVisitor *, ValadocApiPackage*)) valadoc_html_doclet_real_visit_package;
	((ValadocApiVisitorClass *) klass)->visit_namespace = (void (*) (ValadocApiVisitor *, ValadocApiNamespace*)) valadoc_html_doclet_real_visit_namespace;
	((ValadocApiVisitorClass *) klass)->visit_interface = (void (*) (ValadocApiVisitor *, ValadocApiInterface*)) valadoc_html_doclet_real_visit_interface;
	((ValadocApiVisitorClass *) klass)->visit_class = (void (*) (ValadocApiVisitor *, ValadocApiClass*)) valadoc_html_doclet_real_visit_class;
	((ValadocApiVisitorClass *) klass)->visit_struct = (void (*) (ValadocApiVisitor *, ValadocApiStruct*)) valadoc_html_doclet_real_visit_struct;
	((ValadocApiVisitorClass *) klass)->visit_error_domain = (void (*) (ValadocApiVisitor *, ValadocApiErrorDomain*)) valadoc_html_doclet_real_visit_error_domain;
	((ValadocApiVisitorClass *) klass)->visit_enum = (void (*) (ValadocApiVisitor *, ValadocApiEnum*)) valadoc_html_doclet_real_visit_enum;
	((ValadocApiVisitorClass *) klass)->visit_property = (void (*) (ValadocApiVisitor *, ValadocApiProperty*)) valadoc_html_doclet_real_visit_property;
	((ValadocApiVisitorClass *) klass)->visit_constant = (void (*) (ValadocApiVisitor *, ValadocApiConstant*)) valadoc_html_doclet_real_visit_constant;
	((ValadocApiVisitorClass *) klass)->visit_field = (void (*) (ValadocApiVisitor *, ValadocApiField*)) valadoc_html_doclet_real_visit_field;
	((ValadocApiVisitorClass *) klass)->visit_error_code = (void (*) (ValadocApiVisitor *, ValadocApiErrorCode*)) valadoc_html_doclet_real_visit_error_code;
	((ValadocApiVisitorClass *) klass)->visit_enum_value = (void (*) (ValadocApiVisitor *, ValadocApiEnumValue*)) valadoc_html_doclet_real_visit_enum_value;
	((ValadocApiVisitorClass *) klass)->visit_delegate = (void (*) (ValadocApiVisitor *, ValadocApiDelegate*)) valadoc_html_doclet_real_visit_delegate;
	((ValadocApiVisitorClass *) klass)->visit_signal = (void (*) (ValadocApiVisitor *, ValadocApiSignal*)) valadoc_html_doclet_real_visit_signal;
	((ValadocApiVisitorClass *) klass)->visit_method = (void (*) (ValadocApiVisitor *, ValadocApiMethod*)) valadoc_html_doclet_real_visit_method;
}


static void valadoc_html_doclet_instance_init (ValadocHtmlDoclet * self) {
}


GType valadoc_html_doclet_get_type (void) {
	static volatile gsize valadoc_html_doclet_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_html_doclet_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocHtmlDocletClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_html_doclet_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocHtmlDoclet), 0, (GInstanceInitFunc) valadoc_html_doclet_instance_init, NULL };
		GType valadoc_html_doclet_type_id;
		valadoc_html_doclet_type_id = g_type_register_static (VALADOC_HTML_TYPE_BASIC_DOCLET, "ValadocHtmlDoclet", &g_define_type_info, 0);
		g_once_init_leave (&valadoc_html_doclet_type_id__volatile, valadoc_html_doclet_type_id);
	}
	return valadoc_html_doclet_type_id__volatile;
}


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



