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

/* run.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>
#include <valagee.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_RUN_0_PROPERTY,
	VALADOC_CONTENT_RUN_STYLE_PROPERTY,
	VALADOC_CONTENT_RUN_NUM_PROPERTIES
};
static GParamSpec* valadoc_content_run_properties[VALADOC_CONTENT_RUN_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _ValadocContentRunPrivate {
	ValadocContentRunStyle _style;
};

static gint ValadocContentRun_private_offset;
static gpointer valadoc_content_run_parent_class = NULL;
static ValadocContentInlineIface * valadoc_content_run_valadoc_content_inline_parent_iface = NULL;

static ValadocContentRunStyle* _valadoc_content_run_style_dup (ValadocContentRunStyle* self);
 G_GNUC_INTERNAL ValadocContentRun* valadoc_content_run_new (ValadocContentRunStyle style);
 G_GNUC_INTERNAL ValadocContentRun* valadoc_content_run_construct (GType object_type,
                                                  ValadocContentRunStyle style);
 G_GNUC_INTERNAL ValadocContentInlineContent* valadoc_content_inline_content_construct (GType object_type);
static void valadoc_content_run_real_check (ValadocContentContentElement* base,
                                     ValadocApiTree* api_root,
                                     ValadocApiNode* container,
                                     const gchar* file_path,
                                     ValadocErrorReporter* reporter,
                                     ValadocSettings* settings);
static void valadoc_content_run_real_accept (ValadocContentContentElement* base,
                                      ValadocContentContentVisitor* visitor);
static ValadocContentContentElement* valadoc_content_run_real_copy (ValadocContentContentElement* base,
                                                             ValadocContentContentElement* new_parent);
 G_GNUC_INTERNAL void valadoc_content_content_element_set_parent (ValadocContentContentElement* self,
                                                 ValadocContentContentElement* value);
static void valadoc_content_run_finalize (GObject * obj);
static GType valadoc_content_run_get_type_once (void);
static void _vala_valadoc_content_run_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_valadoc_content_run_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);

static inline gpointer
valadoc_content_run_get_instance_private (ValadocContentRun* self)
{
	return G_STRUCT_MEMBER_P (self, ValadocContentRun_private_offset);
}

static ValadocContentRunStyle*
_valadoc_content_run_style_dup (ValadocContentRunStyle* self)
{
	ValadocContentRunStyle* dup;
	dup = g_new0 (ValadocContentRunStyle, 1);
	memcpy (dup, self, sizeof (ValadocContentRunStyle));
	return dup;
}

static gpointer
__valadoc_content_run_style_dup0 (gpointer self)
{
	return self ? _valadoc_content_run_style_dup (self) : NULL;
}

ValadocContentRunStyle*
valadoc_content_run_style_from_string (const gchar* str)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	static GQuark _tmp1_label6 = 0;
	static GQuark _tmp1_label7 = 0;
	static GQuark _tmp1_label8 = 0;
	static GQuark _tmp1_label9 = 0;
	static GQuark _tmp1_label10 = 0;
	static GQuark _tmp1_label11 = 0;
	static GQuark _tmp1_label12 = 0;
	static GQuark _tmp1_label13 = 0;
	static GQuark _tmp1_label14 = 0;
	static GQuark _tmp1_label15 = 0;
	static GQuark _tmp1_label16 = 0;
	static GQuark _tmp1_label17 = 0;
	static GQuark _tmp1_label18 = 0;
	ValadocContentRunStyle* result;
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = str;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("none")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp3_;
				ValadocContentRunStyle* _tmp4_;
				_tmp3_ = VALADOC_CONTENT_RUN_STYLE_NONE;
				_tmp4_ = __valadoc_content_run_style_dup0 (&_tmp3_);
				result = _tmp4_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("bold")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp5_;
				ValadocContentRunStyle* _tmp6_;
				_tmp5_ = VALADOC_CONTENT_RUN_STYLE_BOLD;
				_tmp6_ = __valadoc_content_run_style_dup0 (&_tmp5_);
				result = _tmp6_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("italic")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp7_;
				ValadocContentRunStyle* _tmp8_;
				_tmp7_ = VALADOC_CONTENT_RUN_STYLE_ITALIC;
				_tmp8_ = __valadoc_content_run_style_dup0 (&_tmp7_);
				result = _tmp8_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("underlined")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp9_;
				ValadocContentRunStyle* _tmp10_;
				_tmp9_ = VALADOC_CONTENT_RUN_STYLE_UNDERLINED;
				_tmp10_ = __valadoc_content_run_style_dup0 (&_tmp9_);
				result = _tmp10_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("monospaced")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp11_;
				ValadocContentRunStyle* _tmp12_;
				_tmp11_ = VALADOC_CONTENT_RUN_STYLE_MONOSPACED;
				_tmp12_ = __valadoc_content_run_style_dup0 (&_tmp11_);
				result = _tmp12_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string ("stroke")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp13_;
				ValadocContentRunStyle* _tmp14_;
				_tmp13_ = VALADOC_CONTENT_RUN_STYLE_STROKE;
				_tmp14_ = __valadoc_content_run_style_dup0 (&_tmp13_);
				result = _tmp14_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label6) ? _tmp1_label6 : (_tmp1_label6 = g_quark_from_static_string ("lang-escape")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp15_;
				ValadocContentRunStyle* _tmp16_;
				_tmp15_ = VALADOC_CONTENT_RUN_STYLE_LANG_ESCAPE;
				_tmp16_ = __valadoc_content_run_style_dup0 (&_tmp15_);
				result = _tmp16_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label7) ? _tmp1_label7 : (_tmp1_label7 = g_quark_from_static_string ("lang-keyword")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp17_;
				ValadocContentRunStyle* _tmp18_;
				_tmp17_ = VALADOC_CONTENT_RUN_STYLE_LANG_KEYWORD;
				_tmp18_ = __valadoc_content_run_style_dup0 (&_tmp17_);
				result = _tmp18_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label8) ? _tmp1_label8 : (_tmp1_label8 = g_quark_from_static_string ("lang-literal")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp19_;
				ValadocContentRunStyle* _tmp20_;
				_tmp19_ = VALADOC_CONTENT_RUN_STYLE_LANG_LITERAL;
				_tmp20_ = __valadoc_content_run_style_dup0 (&_tmp19_);
				result = _tmp20_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label9) ? _tmp1_label9 : (_tmp1_label9 = g_quark_from_static_string ("lang-basic-type")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp21_;
				ValadocContentRunStyle* _tmp22_;
				_tmp21_ = VALADOC_CONTENT_RUN_STYLE_LANG_BASIC_TYPE;
				_tmp22_ = __valadoc_content_run_style_dup0 (&_tmp21_);
				result = _tmp22_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label10) ? _tmp1_label10 : (_tmp1_label10 = g_quark_from_static_string ("lang-type")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp23_;
				ValadocContentRunStyle* _tmp24_;
				_tmp23_ = VALADOC_CONTENT_RUN_STYLE_LANG_TYPE;
				_tmp24_ = __valadoc_content_run_style_dup0 (&_tmp23_);
				result = _tmp24_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label11) ? _tmp1_label11 : (_tmp1_label11 = g_quark_from_static_string ("lang-preprocessor")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp25_;
				ValadocContentRunStyle* _tmp26_;
				_tmp25_ = VALADOC_CONTENT_RUN_STYLE_LANG_PREPROCESSOR;
				_tmp26_ = __valadoc_content_run_style_dup0 (&_tmp25_);
				result = _tmp26_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label12) ? _tmp1_label12 : (_tmp1_label12 = g_quark_from_static_string ("lang-comment")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp27_;
				ValadocContentRunStyle* _tmp28_;
				_tmp27_ = VALADOC_CONTENT_RUN_STYLE_LANG_COMMENT;
				_tmp28_ = __valadoc_content_run_style_dup0 (&_tmp27_);
				result = _tmp28_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label13) ? _tmp1_label13 : (_tmp1_label13 = g_quark_from_static_string ("xml-escape")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp29_;
				ValadocContentRunStyle* _tmp30_;
				_tmp29_ = VALADOC_CONTENT_RUN_STYLE_XML_ESCAPE;
				_tmp30_ = __valadoc_content_run_style_dup0 (&_tmp29_);
				result = _tmp30_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label14) ? _tmp1_label14 : (_tmp1_label14 = g_quark_from_static_string ("xml-element")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp31_;
				ValadocContentRunStyle* _tmp32_;
				_tmp31_ = VALADOC_CONTENT_RUN_STYLE_XML_ELEMENT;
				_tmp32_ = __valadoc_content_run_style_dup0 (&_tmp31_);
				result = _tmp32_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label15) ? _tmp1_label15 : (_tmp1_label15 = g_quark_from_static_string ("xml-attribute")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp33_;
				ValadocContentRunStyle* _tmp34_;
				_tmp33_ = VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE;
				_tmp34_ = __valadoc_content_run_style_dup0 (&_tmp33_);
				result = _tmp34_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label16) ? _tmp1_label16 : (_tmp1_label16 = g_quark_from_static_string ("xml-attribute-value")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp35_;
				ValadocContentRunStyle* _tmp36_;
				_tmp35_ = VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE_VALUE;
				_tmp36_ = __valadoc_content_run_style_dup0 (&_tmp35_);
				result = _tmp36_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label17) ? _tmp1_label17 : (_tmp1_label17 = g_quark_from_static_string ("xml-comment")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp37_;
				ValadocContentRunStyle* _tmp38_;
				_tmp37_ = VALADOC_CONTENT_RUN_STYLE_XML_COMMENT;
				_tmp38_ = __valadoc_content_run_style_dup0 (&_tmp37_);
				result = _tmp38_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label18) ? _tmp1_label18 : (_tmp1_label18 = g_quark_from_static_string ("xml-cdata")))) {
		switch (0) {
			default:
			{
				ValadocContentRunStyle _tmp39_;
				ValadocContentRunStyle* _tmp40_;
				_tmp39_ = VALADOC_CONTENT_RUN_STYLE_XML_CDATA;
				_tmp40_ = __valadoc_content_run_style_dup0 (&_tmp39_);
				result = _tmp40_;
				return result;
			}
		}
	}
	result = NULL;
	return result;
}

const gchar*
valadoc_content_run_style_to_string (ValadocContentRunStyle self)
{
	const gchar* result;
	switch (self) {
		case VALADOC_CONTENT_RUN_STYLE_NONE:
		{
			result = "none";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_BOLD:
		{
			result = "bold";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_ITALIC:
		{
			result = "italic";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_UNDERLINED:
		{
			result = "underlined";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_MONOSPACED:
		{
			result = "monospaced";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_STROKE:
		{
			result = "stroke";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_ESCAPE:
		{
			result = "lang-escape";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_KEYWORD:
		{
			result = "lang-keyword";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_LITERAL:
		{
			result = "lang-literal";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_BASIC_TYPE:
		{
			result = "lang-basic-type";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_TYPE:
		{
			result = "lang-type";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_PREPROCESSOR:
		{
			result = "lang-preprocessor";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_COMMENT:
		{
			result = "lang-comment";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_ESCAPE:
		{
			result = "xml-escape";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_ELEMENT:
		{
			result = "xml-element";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE:
		{
			result = "xml-attribute";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE_VALUE:
		{
			result = "xml-attribute-value";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_COMMENT:
		{
			result = "xml-comment";
			return result;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_CDATA:
		{
			result = "xml-cdata";
			return result;
		}
		default:
		break;
	}
	_vala_assert (TRUE, "true");
	result = "";
	return result;
}

static GType
valadoc_content_run_style_get_type_once (void)
{
	static const GEnumValue values[] = {{VALADOC_CONTENT_RUN_STYLE_NONE, "VALADOC_CONTENT_RUN_STYLE_NONE", "none"}, {VALADOC_CONTENT_RUN_STYLE_BOLD, "VALADOC_CONTENT_RUN_STYLE_BOLD", "bold"}, {VALADOC_CONTENT_RUN_STYLE_ITALIC, "VALADOC_CONTENT_RUN_STYLE_ITALIC", "italic"}, {VALADOC_CONTENT_RUN_STYLE_UNDERLINED, "VALADOC_CONTENT_RUN_STYLE_UNDERLINED", "underlined"}, {VALADOC_CONTENT_RUN_STYLE_MONOSPACED, "VALADOC_CONTENT_RUN_STYLE_MONOSPACED", "monospaced"}, {VALADOC_CONTENT_RUN_STYLE_STROKE, "VALADOC_CONTENT_RUN_STYLE_STROKE", "stroke"}, {VALADOC_CONTENT_RUN_STYLE_LANG_KEYWORD, "VALADOC_CONTENT_RUN_STYLE_LANG_KEYWORD", "lang-keyword"}, {VALADOC_CONTENT_RUN_STYLE_LANG_LITERAL, "VALADOC_CONTENT_RUN_STYLE_LANG_LITERAL", "lang-literal"}, {VALADOC_CONTENT_RUN_STYLE_LANG_BASIC_TYPE, "VALADOC_CONTENT_RUN_STYLE_LANG_BASIC_TYPE", "lang-basic-type"}, {VALADOC_CONTENT_RUN_STYLE_LANG_TYPE, "VALADOC_CONTENT_RUN_STYLE_LANG_TYPE", "lang-type"}, {VALADOC_CONTENT_RUN_STYLE_LANG_PREPROCESSOR, "VALADOC_CONTENT_RUN_STYLE_LANG_PREPROCESSOR", "lang-preprocessor"}, {VALADOC_CONTENT_RUN_STYLE_LANG_COMMENT, "VALADOC_CONTENT_RUN_STYLE_LANG_COMMENT", "lang-comment"}, {VALADOC_CONTENT_RUN_STYLE_LANG_ESCAPE, "VALADOC_CONTENT_RUN_STYLE_LANG_ESCAPE", "lang-escape"}, {VALADOC_CONTENT_RUN_STYLE_XML_ESCAPE, "VALADOC_CONTENT_RUN_STYLE_XML_ESCAPE", "xml-escape"}, {VALADOC_CONTENT_RUN_STYLE_XML_ELEMENT, "VALADOC_CONTENT_RUN_STYLE_XML_ELEMENT", "xml-element"}, {VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE, "VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE", "xml-attribute"}, {VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE_VALUE, "VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE_VALUE", "xml-attribute-value"}, {VALADOC_CONTENT_RUN_STYLE_XML_COMMENT, "VALADOC_CONTENT_RUN_STYLE_XML_COMMENT", "xml-comment"}, {VALADOC_CONTENT_RUN_STYLE_XML_CDATA, "VALADOC_CONTENT_RUN_STYLE_XML_CDATA", "xml-cdata"}, {0, NULL, NULL}};
	GType valadoc_content_run_style_type_id;
	valadoc_content_run_style_type_id = g_enum_register_static ("ValadocContentRunStyle", values);
	return valadoc_content_run_style_type_id;
}

GType
valadoc_content_run_style_get_type (void)
{
	static volatile gsize valadoc_content_run_style_type_id__once = 0;
	if (g_once_init_enter (&valadoc_content_run_style_type_id__once)) {
		GType valadoc_content_run_style_type_id;
		valadoc_content_run_style_type_id = valadoc_content_run_style_get_type_once ();
		g_once_init_leave (&valadoc_content_run_style_type_id__once, valadoc_content_run_style_type_id);
	}
	return valadoc_content_run_style_type_id__once;
}

ValadocContentRunStyle
valadoc_content_run_get_style (ValadocContentRun* self)
{
	ValadocContentRunStyle result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_style;
	return result;
}

void
valadoc_content_run_set_style (ValadocContentRun* self,
                               ValadocContentRunStyle value)
{
	ValadocContentRunStyle old_value;
	g_return_if_fail (self != NULL);
	old_value = valadoc_content_run_get_style (self);
	if (old_value != value) {
		self->priv->_style = value;
		g_object_notify_by_pspec ((GObject *) self, valadoc_content_run_properties[VALADOC_CONTENT_RUN_STYLE_PROPERTY]);
	}
}

 G_GNUC_INTERNAL ValadocContentRun*
valadoc_content_run_construct (GType object_type,
                               ValadocContentRunStyle style)
{
	ValadocContentRun * self = NULL;
	self = (ValadocContentRun*) valadoc_content_inline_content_construct (object_type);
	self->priv->_style = style;
	return self;
}

 G_GNUC_INTERNAL ValadocContentRun*
valadoc_content_run_new (ValadocContentRunStyle style)
{
	return valadoc_content_run_construct (VALADOC_CONTENT_TYPE_RUN, style);
}

static void
valadoc_content_run_real_check (ValadocContentContentElement* base,
                                ValadocApiTree* api_root,
                                ValadocApiNode* container,
                                const gchar* file_path,
                                ValadocErrorReporter* reporter,
                                ValadocSettings* settings)
{
	ValadocContentRun * self;
	self = (ValadocContentRun*) 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);
	VALADOC_CONTENT_CONTENT_ELEMENT_CLASS (valadoc_content_run_parent_class)->check ((ValadocContentContentElement*) G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_CONTENT_TYPE_INLINE_CONTENT, ValadocContentInlineContent), api_root, container, file_path, reporter, settings);
}

static void
valadoc_content_run_real_accept (ValadocContentContentElement* base,
                                 ValadocContentContentVisitor* visitor)
{
	ValadocContentRun * self;
	self = (ValadocContentRun*) base;
	g_return_if_fail (visitor != NULL);
	valadoc_content_content_visitor_visit_run (visitor, self);
}

static ValadocContentContentElement*
valadoc_content_run_real_copy (ValadocContentContentElement* base,
                               ValadocContentContentElement* new_parent)
{
	ValadocContentRun * self;
	ValadocContentRun* run = NULL;
	ValadocContentRunStyle _tmp0_;
	ValadocContentRun* _tmp1_;
	ValadocContentRun* _tmp2_;
	ValadocContentContentElement* result;
	self = (ValadocContentRun*) base;
	_tmp0_ = self->priv->_style;
	_tmp1_ = valadoc_content_run_new (_tmp0_);
	run = _tmp1_;
	_tmp2_ = run;
	valadoc_content_content_element_set_parent ((ValadocContentContentElement*) _tmp2_, new_parent);
	{
		ValaList* _element_list = NULL;
		ValaList* _tmp3_;
		ValaList* _tmp4_;
		gint _element_size = 0;
		ValaList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _element_index = 0;
		_tmp3_ = valadoc_content_inline_content_get_content ((ValadocContentInlineContent*) self);
		_tmp4_ = _tmp3_;
		_element_list = _tmp4_;
		_tmp5_ = _element_list;
		_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_element_size = _tmp7_;
		_element_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			ValadocContentInline* element = NULL;
			ValaList* _tmp10_;
			gpointer _tmp11_;
			ValadocContentInline* copy = NULL;
			ValadocContentInline* _tmp12_;
			ValadocContentRun* _tmp13_;
			ValadocContentContentElement* _tmp14_;
			ValadocContentInline* _tmp15_;
			ValadocContentRun* _tmp16_;
			ValaList* _tmp17_;
			ValaList* _tmp18_;
			ValadocContentInline* _tmp19_;
			_element_index = _element_index + 1;
			_tmp8_ = _element_index;
			_tmp9_ = _element_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _element_list;
			_tmp11_ = vala_list_get (_tmp10_, _element_index);
			element = (ValadocContentInline*) _tmp11_;
			_tmp12_ = element;
			_tmp13_ = run;
			_tmp14_ = valadoc_content_content_element_copy ((ValadocContentContentElement*) _tmp12_, (ValadocContentContentElement*) _tmp13_);
			_tmp15_ = VALADOC_CONTENT_IS_INLINE (_tmp14_) ? ((ValadocContentInline*) _tmp14_) : NULL;
			if (_tmp15_ == NULL) {
				_g_object_unref0 (_tmp14_);
			}
			copy = _tmp15_;
			_tmp16_ = run;
			_tmp17_ = valadoc_content_inline_content_get_content ((ValadocContentInlineContent*) _tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = copy;
			vala_collection_add ((ValaCollection*) _tmp18_, _tmp19_);
			_g_object_unref0 (copy);
			_g_object_unref0 (element);
		}
	}
	result = (ValadocContentContentElement*) run;
	return result;
}

static void
valadoc_content_run_class_init (ValadocContentRunClass * klass,
                                gpointer klass_data)
{
	valadoc_content_run_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ValadocContentRun_private_offset);
	((ValadocContentContentElementClass *) klass)->check = (void (*) (ValadocContentContentElement*, ValadocApiTree*, ValadocApiNode*, const gchar*, ValadocErrorReporter*, ValadocSettings*)) valadoc_content_run_real_check;
	((ValadocContentContentElementClass *) klass)->accept = (void (*) (ValadocContentContentElement*, ValadocContentContentVisitor*)) valadoc_content_run_real_accept;
	((ValadocContentContentElementClass *) klass)->copy = (ValadocContentContentElement* (*) (ValadocContentContentElement*, ValadocContentContentElement*)) valadoc_content_run_real_copy;
	G_OBJECT_CLASS (klass)->get_property = _vala_valadoc_content_run_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_valadoc_content_run_set_property;
	G_OBJECT_CLASS (klass)->finalize = valadoc_content_run_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_CONTENT_RUN_STYLE_PROPERTY, valadoc_content_run_properties[VALADOC_CONTENT_RUN_STYLE_PROPERTY] = g_param_spec_enum ("style", "style", "style", VALADOC_CONTENT_RUN_TYPE_STYLE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
valadoc_content_run_valadoc_content_inline_interface_init (ValadocContentInlineIface * iface,
                                                           gpointer iface_data)
{
	valadoc_content_run_valadoc_content_inline_parent_iface = g_type_interface_peek_parent (iface);
}

static void
valadoc_content_run_instance_init (ValadocContentRun * self,
                                   gpointer klass)
{
	self->priv = valadoc_content_run_get_instance_private (self);
}

static void
valadoc_content_run_finalize (GObject * obj)
{
	ValadocContentRun * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_CONTENT_TYPE_RUN, ValadocContentRun);
	G_OBJECT_CLASS (valadoc_content_run_parent_class)->finalize (obj);
}

static GType
valadoc_content_run_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ValadocContentRunClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_content_run_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocContentRun), 0, (GInstanceInitFunc) valadoc_content_run_instance_init, NULL };
	static const GInterfaceInfo valadoc_content_inline_info = { (GInterfaceInitFunc) valadoc_content_run_valadoc_content_inline_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType valadoc_content_run_type_id;
	valadoc_content_run_type_id = g_type_register_static (VALADOC_CONTENT_TYPE_INLINE_CONTENT, "ValadocContentRun", &g_define_type_info, 0);
	g_type_add_interface_static (valadoc_content_run_type_id, VALADOC_CONTENT_TYPE_INLINE, &valadoc_content_inline_info);
	ValadocContentRun_private_offset = g_type_add_instance_private (valadoc_content_run_type_id, sizeof (ValadocContentRunPrivate));
	return valadoc_content_run_type_id;
}

GType
valadoc_content_run_get_type (void)
{
	static volatile gsize valadoc_content_run_type_id__once = 0;
	if (g_once_init_enter (&valadoc_content_run_type_id__once)) {
		GType valadoc_content_run_type_id;
		valadoc_content_run_type_id = valadoc_content_run_get_type_once ();
		g_once_init_leave (&valadoc_content_run_type_id__once, valadoc_content_run_type_id);
	}
	return valadoc_content_run_type_id__once;
}

static void
_vala_valadoc_content_run_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	ValadocContentRun * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_CONTENT_TYPE_RUN, ValadocContentRun);
	switch (property_id) {
		case VALADOC_CONTENT_RUN_STYLE_PROPERTY:
		g_value_set_enum (value, valadoc_content_run_get_style (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_valadoc_content_run_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	ValadocContentRun * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_CONTENT_TYPE_RUN, ValadocContentRun);
	switch (property_id) {
		case VALADOC_CONTENT_RUN_STYLE_PROPERTY:
		valadoc_content_run_set_style (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

