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

/* taglet.vala
 *
 * Copyright (C) 2008-2009 Didier Villevalois
 * 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:
 * 	Didier 'Ptitjes Villevalois <ptitjes@free.fr>
 */

#include <glib.h>
#include <glib-object.h>
#include "valadoc.h"
#include <stdlib.h>
#include <string.h>

enum  {
	VALADOC_CONTENT_INLINE_TAGLET_0_PROPERTY,
	VALADOC_CONTENT_INLINE_TAGLET_NUM_PROPERTIES
};
static GParamSpec* valadoc_content_inline_taglet_properties[VALADOC_CONTENT_INLINE_TAGLET_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ValadocContentInlineTagletPrivate {
	ValadocContentContentElement* _content;
};


static gpointer valadoc_content_inline_taglet_parent_class = NULL;
static ValadocContentTagletIface * valadoc_content_inline_taglet_valadoc_content_taglet_parent_iface = NULL;
static ValadocContentInlineIface * valadoc_content_inline_taglet_valadoc_content_inline_parent_iface = NULL;

#define VALADOC_CONTENT_INLINE_TAGLET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALADOC_CONTENT_TYPE_INLINE_TAGLET, ValadocContentInlineTagletPrivate))
static ValadocRule* valadoc_content_inline_taglet_real_get_parser_rule (ValadocContentInlineTaglet* self, ValadocRule* run_rule);
static ValadocContentContentElement* valadoc_content_inline_taglet_real_produce_content (ValadocContentInlineTaglet* self);
static ValadocContentContentElement* valadoc_content_inline_taglet_get_content (ValadocContentInlineTaglet* self);
static void valadoc_content_inline_taglet_real_configure (ValadocContentContentElement* base, ValadocSettings* settings, ValadocResourceLocator* locator);
static void valadoc_content_inline_taglet_real_check (ValadocContentContentElement* base, ValadocApiTree* api_root, ValadocApiNode* container, const gchar* file_path, ValadocErrorReporter* reporter, ValadocSettings* settings);
G_GNUC_INTERNAL void valadoc_content_content_element_set_parent (ValadocContentContentElement* self, ValadocContentContentElement* value);
static void valadoc_content_inline_taglet_real_accept (ValadocContentContentElement* base, ValadocContentContentVisitor* visitor);
static gboolean valadoc_content_inline_taglet_real_is_empty (ValadocContentContentElement* base);
static void valadoc_content_inline_taglet_finalize (GObject * obj);


ValadocContentInlineTaglet* valadoc_content_inline_taglet_construct (GType object_type) {
	ValadocContentInlineTaglet * self = NULL;
	self = (ValadocContentInlineTaglet*) valadoc_content_content_element_construct (object_type);
	return self;
}


static ValadocRule* valadoc_content_inline_taglet_real_get_parser_rule (ValadocContentInlineTaglet* self, ValadocRule* run_rule) {
	g_critical ("Type `%s' does not implement abstract method `valadoc_content_inline_taglet_get_parser_rule'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}


ValadocRule* valadoc_content_inline_taglet_get_parser_rule (ValadocContentInlineTaglet* self, ValadocRule* run_rule) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALADOC_CONTENT_INLINE_TAGLET_GET_CLASS (self)->get_parser_rule (self, run_rule);
}


static ValadocContentContentElement* valadoc_content_inline_taglet_real_produce_content (ValadocContentInlineTaglet* self) {
	g_critical ("Type `%s' does not implement abstract method `valadoc_content_inline_taglet_produce_content'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}


ValadocContentContentElement* valadoc_content_inline_taglet_produce_content (ValadocContentInlineTaglet* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALADOC_CONTENT_INLINE_TAGLET_GET_CLASS (self)->produce_content (self);
}


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


static ValadocContentContentElement* valadoc_content_inline_taglet_get_content (ValadocContentInlineTaglet* self) {
	ValadocContentContentElement* result = NULL;
	ValadocContentContentElement* _tmp0_;
	ValadocContentContentElement* _tmp2_;
	ValadocContentContentElement* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_content;
	if (_tmp0_ == NULL) {
		ValadocContentContentElement* _tmp1_;
		_tmp1_ = valadoc_content_inline_taglet_produce_content (self);
		_g_object_unref0 (self->priv->_content);
		self->priv->_content = _tmp1_;
	}
	_tmp2_ = self->priv->_content;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	result = _tmp3_;
	return result;
}


static void valadoc_content_inline_taglet_real_configure (ValadocContentContentElement* base, ValadocSettings* settings, ValadocResourceLocator* locator) {
	ValadocContentInlineTaglet * self;
	ValadocSettings* _tmp0_;
	ValadocSettings* _tmp1_;
	ValadocResourceLocator* _tmp2_;
	ValadocResourceLocator* _tmp3_;
	self = (ValadocContentInlineTaglet*) base;
	g_return_if_fail (settings != NULL);
	g_return_if_fail (locator != NULL);
	_tmp0_ = settings;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->settings);
	self->settings = _tmp1_;
	_tmp2_ = locator;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->locator);
	self->locator = _tmp3_;
}


static void valadoc_content_inline_taglet_real_check (ValadocContentContentElement* base, ValadocApiTree* api_root, ValadocApiNode* container, const gchar* file_path, ValadocErrorReporter* reporter, ValadocSettings* settings) {
	ValadocContentInlineTaglet * self;
	ValadocContentContentElement* element = NULL;
	ValadocContentContentElement* _tmp0_;
	ValadocApiTree* _tmp1_;
	ValadocApiNode* _tmp2_;
	const gchar* _tmp3_;
	ValadocErrorReporter* _tmp4_;
	ValadocSettings* _tmp5_;
	self = (ValadocContentInlineTaglet*) base;
	g_return_if_fail (api_root != NULL);
	g_return_if_fail (container != NULL);
	g_return_if_fail (file_path != NULL);
	g_return_if_fail (reporter != NULL);
	g_return_if_fail (settings != NULL);
	_tmp0_ = valadoc_content_inline_taglet_get_content (self);
	element = _tmp0_;
	valadoc_content_content_element_set_parent (element, (ValadocContentContentElement*) self);
	_tmp1_ = api_root;
	_tmp2_ = container;
	_tmp3_ = file_path;
	_tmp4_ = reporter;
	_tmp5_ = settings;
	valadoc_content_content_element_check (element, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_);
	_g_object_unref0 (element);
}


static void valadoc_content_inline_taglet_real_accept (ValadocContentContentElement* base, ValadocContentContentVisitor* visitor) {
	ValadocContentInlineTaglet * self;
	ValadocContentContentElement* element = NULL;
	ValadocContentContentElement* _tmp0_;
	ValadocContentContentVisitor* _tmp1_;
	self = (ValadocContentInlineTaglet*) base;
	g_return_if_fail (visitor != NULL);
	_tmp0_ = valadoc_content_inline_taglet_get_content (self);
	element = _tmp0_;
	_tmp1_ = visitor;
	valadoc_content_content_element_accept (element, _tmp1_);
	_g_object_unref0 (element);
}


static gboolean valadoc_content_inline_taglet_real_is_empty (ValadocContentContentElement* base) {
	ValadocContentInlineTaglet * self;
	gboolean result = FALSE;
	self = (ValadocContentInlineTaglet*) base;
	result = FALSE;
	return result;
}


static void valadoc_content_inline_taglet_class_init (ValadocContentInlineTagletClass * klass) {
	valadoc_content_inline_taglet_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ValadocContentInlineTagletPrivate));
	((ValadocContentInlineTagletClass *) klass)->get_parser_rule = (ValadocRule* (*) (ValadocContentInlineTaglet *, ValadocRule*)) valadoc_content_inline_taglet_real_get_parser_rule;
	((ValadocContentInlineTagletClass *) klass)->produce_content = (ValadocContentContentElement* (*) (ValadocContentInlineTaglet *)) valadoc_content_inline_taglet_real_produce_content;
	((ValadocContentContentElementClass *) klass)->configure = (void (*) (ValadocContentContentElement *, ValadocSettings*, ValadocResourceLocator*)) valadoc_content_inline_taglet_real_configure;
	((ValadocContentContentElementClass *) klass)->check = (void (*) (ValadocContentContentElement *, ValadocApiTree*, ValadocApiNode*, const gchar*, ValadocErrorReporter*, ValadocSettings*)) valadoc_content_inline_taglet_real_check;
	((ValadocContentContentElementClass *) klass)->accept = (void (*) (ValadocContentContentElement *, ValadocContentContentVisitor*)) valadoc_content_inline_taglet_real_accept;
	((ValadocContentContentElementClass *) klass)->is_empty = (gboolean (*) (ValadocContentContentElement *)) valadoc_content_inline_taglet_real_is_empty;
	G_OBJECT_CLASS (klass)->finalize = valadoc_content_inline_taglet_finalize;
}


static void valadoc_content_inline_taglet_valadoc_content_taglet_interface_init (ValadocContentTagletIface * iface) {
	valadoc_content_inline_taglet_valadoc_content_taglet_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_parser_rule = (ValadocRule* (*) (ValadocContentTaglet *, ValadocRule*)) valadoc_content_inline_taglet_get_parser_rule;
}


static void valadoc_content_inline_taglet_valadoc_content_inline_interface_init (ValadocContentInlineIface * iface) {
	valadoc_content_inline_taglet_valadoc_content_inline_parent_iface = g_type_interface_peek_parent (iface);
}


static void valadoc_content_inline_taglet_instance_init (ValadocContentInlineTaglet * self) {
	self->priv = VALADOC_CONTENT_INLINE_TAGLET_GET_PRIVATE (self);
}


static void valadoc_content_inline_taglet_finalize (GObject * obj) {
	ValadocContentInlineTaglet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_CONTENT_TYPE_INLINE_TAGLET, ValadocContentInlineTaglet);
	_g_object_unref0 (self->settings);
	_g_object_unref0 (self->locator);
	_g_object_unref0 (self->priv->_content);
	G_OBJECT_CLASS (valadoc_content_inline_taglet_parent_class)->finalize (obj);
}


GType valadoc_content_inline_taglet_get_type (void) {
	static volatile gsize valadoc_content_inline_taglet_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_content_inline_taglet_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocContentInlineTagletClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_content_inline_taglet_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocContentInlineTaglet), 0, (GInstanceInitFunc) valadoc_content_inline_taglet_instance_init, NULL };
		static const GInterfaceInfo valadoc_content_taglet_info = { (GInterfaceInitFunc) valadoc_content_inline_taglet_valadoc_content_taglet_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo valadoc_content_inline_info = { (GInterfaceInitFunc) valadoc_content_inline_taglet_valadoc_content_inline_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType valadoc_content_inline_taglet_type_id;
		valadoc_content_inline_taglet_type_id = g_type_register_static (VALADOC_CONTENT_TYPE_CONTENT_ELEMENT, "ValadocContentInlineTaglet", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (valadoc_content_inline_taglet_type_id, VALADOC_CONTENT_TYPE_TAGLET, &valadoc_content_taglet_info);
		g_type_add_interface_static (valadoc_content_inline_taglet_type_id, VALADOC_CONTENT_TYPE_INLINE, &valadoc_content_inline_info);
		g_once_init_leave (&valadoc_content_inline_taglet_type_id__volatile, valadoc_content_inline_taglet_type_id);
	}
	return valadoc_content_inline_taglet_type_id__volatile;
}



