/* 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 "valadoc.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

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 gint ValadocContentInlineTaglet_private_offset;
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;

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);
static GType valadoc_content_inline_taglet_get_type_once (void);

static inline gpointer
valadoc_content_inline_taglet_get_instance_private (ValadocContentInlineTaglet* self)
{
	return G_STRUCT_MEMBER_P (self, ValadocContentInlineTaglet_private_offset);
}

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)
{
	ValadocContentInlineTagletClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = VALADOC_CONTENT_INLINE_TAGLET_GET_CLASS (self);
	if (_klass_->get_parser_rule) {
		return _klass_->get_parser_rule (self, run_rule);
	}
	return NULL;
}

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)
{
	ValadocContentInlineTagletClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = VALADOC_CONTENT_INLINE_TAGLET_GET_CLASS (self);
	if (_klass_->produce_content) {
		return _klass_->produce_content (self);
	}
	return NULL;
}

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* _tmp0_;
	ValadocContentContentElement* _tmp2_;
	ValadocContentContentElement* _tmp3_;
	ValadocContentContentElement* result;
	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_;
	ValadocResourceLocator* _tmp1_;
	self = (ValadocContentInlineTaglet*) base;
	g_return_if_fail (settings != NULL);
	g_return_if_fail (locator != NULL);
	_tmp0_ = _g_object_ref0 (settings);
	_g_object_unref0 (self->settings);
	self->settings = _tmp0_;
	_tmp1_ = _g_object_ref0 (locator);
	_g_object_unref0 (self->locator);
	self->locator = _tmp1_;
}

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_;
	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);
	valadoc_content_content_element_check (element, api_root, container, file_path, reporter, settings);
	_g_object_unref0 (element);
}

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

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

static void
valadoc_content_inline_taglet_class_init (ValadocContentInlineTagletClass * klass,
                                          gpointer klass_data)
{
	valadoc_content_inline_taglet_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ValadocContentInlineTaglet_private_offset);
	((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,
                                                                     gpointer iface_data)
{
	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,
                                                                     gpointer iface_data)
{
	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,
                                             gpointer klass)
{
	self->priv = valadoc_content_inline_taglet_get_instance_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);
}

static GType
valadoc_content_inline_taglet_get_type_once (void)
{
	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);
	ValadocContentInlineTaglet_private_offset = g_type_add_instance_private (valadoc_content_inline_taglet_type_id, sizeof (ValadocContentInlineTagletPrivate));
	return valadoc_content_inline_taglet_type_id;
}

GType
valadoc_content_inline_taglet_get_type (void)
{
	static volatile gsize valadoc_content_inline_taglet_type_id__once = 0;
	if (g_once_init_enter (&valadoc_content_inline_taglet_type_id__once)) {
		GType valadoc_content_inline_taglet_type_id;
		valadoc_content_inline_taglet_type_id = valadoc_content_inline_taglet_get_type_once ();
		g_once_init_leave (&valadoc_content_inline_taglet_type_id__once, valadoc_content_inline_taglet_type_id);
	}
	return valadoc_content_inline_taglet_type_id__once;
}

