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

/* TNode.vala
 *
 * Copyright (C) 2015  Daniel Espinosa <esodan@gmail.com>
 *
 * 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, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *      Daniel Espinosa <esodan@gmail.com>
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gio/gio.h>
#include <libxml/xmlwriter.h>


#define GXML_TYPE_NODE (gxml_node_get_type ())
#define GXML_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NODE, GXmlNode))
#define GXML_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NODE))
#define GXML_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_NODE, GXmlNodeIface))

typedef struct _GXmlNode GXmlNode;
typedef struct _GXmlNodeIface GXmlNodeIface;

#define GXML_TYPE_ELEMENT_LIST (gxml_element_list_get_type ())
#define GXML_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_ELEMENT_LIST, GXmlElementList))
#define GXML_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_ELEMENT_LIST, GXmlElementListClass))
#define GXML_IS_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_ELEMENT_LIST))
#define GXML_IS_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_ELEMENT_LIST))
#define GXML_ELEMENT_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_ELEMENT_LIST, GXmlElementListClass))

typedef struct _GXmlElementList GXmlElementList;
typedef struct _GXmlElementListClass GXmlElementListClass;

#define GXML_TYPE_NAMESPACE (gxml_namespace_get_type ())
#define GXML_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NAMESPACE, GXmlNamespace))
#define GXML_IS_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NAMESPACE))
#define GXML_NAMESPACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_NAMESPACE, GXmlNamespaceIface))

typedef struct _GXmlNamespace GXmlNamespace;
typedef struct _GXmlNamespaceIface GXmlNamespaceIface;

#define GXML_TYPE_NODE_TYPE (gxml_node_type_get_type ())

#define GXML_TYPE_DOCUMENT (gxml_document_get_type ())
#define GXML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOCUMENT, GXmlDocument))
#define GXML_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOCUMENT))
#define GXML_DOCUMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOCUMENT, GXmlDocumentIface))

typedef struct _GXmlDocument GXmlDocument;
typedef struct _GXmlDocumentIface GXmlDocumentIface;

#define GXML_TYPE_TNODE (gxml_tnode_get_type ())
#define GXML_TNODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_TNODE, GXmlTNode))
#define GXML_TNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_TNODE, GXmlTNodeClass))
#define GXML_IS_TNODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_TNODE))
#define GXML_IS_TNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_TNODE))
#define GXML_TNODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_TNODE, GXmlTNodeClass))

typedef struct _GXmlTNode GXmlTNode;
typedef struct _GXmlTNodeClass GXmlTNodeClass;
typedef struct _GXmlTNodePrivate GXmlTNodePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GXML_TYPE_TNAMESPACE (gxml_tnamespace_get_type ())
#define GXML_TNAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_TNAMESPACE, GXmlTNamespace))
#define GXML_TNAMESPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_TNAMESPACE, GXmlTNamespaceClass))
#define GXML_IS_TNAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_TNAMESPACE))
#define GXML_IS_TNAMESPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_TNAMESPACE))
#define GXML_TNAMESPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_TNAMESPACE, GXmlTNamespaceClass))

typedef struct _GXmlTNamespace GXmlTNamespace;
typedef struct _GXmlTNamespaceClass GXmlTNamespaceClass;

#define GXML_TNODE_TYPE_TCHILDREN_LIST (gxml_tnode_tchildren_list_get_type ())
#define GXML_TNODE_TCHILDREN_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TNODE_TYPE_TCHILDREN_LIST, GXmlTNodeTChildrenList))
#define GXML_TNODE_TCHILDREN_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TNODE_TYPE_TCHILDREN_LIST, GXmlTNodeTChildrenListClass))
#define GXML_TNODE_IS_TCHILDREN_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TNODE_TYPE_TCHILDREN_LIST))
#define GXML_TNODE_IS_TCHILDREN_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TNODE_TYPE_TCHILDREN_LIST))
#define GXML_TNODE_TCHILDREN_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TNODE_TYPE_TCHILDREN_LIST, GXmlTNodeTChildrenListClass))

typedef struct _GXmlTNodeTChildrenList GXmlTNodeTChildrenList;
typedef struct _GXmlTNodeTChildrenListClass GXmlTNodeTChildrenListClass;
typedef struct _GXmlTNodeTChildrenListPrivate GXmlTNodeTChildrenListPrivate;

struct _GXmlNamespaceIface {
	GTypeInterface parent_iface;
	gchar* (*get_uri) (GXmlNamespace* self);
	gchar* (*get_prefix) (GXmlNamespace* self);
};

typedef enum  {
	GXML_NODE_TYPE_X_UNKNOWN = 0,
	GXML_NODE_TYPE_ELEMENT = 1,
	GXML_NODE_TYPE_ATTRIBUTE,
	GXML_NODE_TYPE_TEXT,
	GXML_NODE_TYPE_CDATA_SECTION,
	GXML_NODE_TYPE_ENTITY_REFERENCE,
	GXML_NODE_TYPE_ENTITY,
	GXML_NODE_TYPE_PROCESSING_INSTRUCTION,
	GXML_NODE_TYPE_COMMENT,
	GXML_NODE_TYPE_DOCUMENT,
	GXML_NODE_TYPE_DOCUMENT_TYPE,
	GXML_NODE_TYPE_DOCUMENT_FRAGMENT,
	GXML_NODE_TYPE_NOTATION
} GXmlNodeType;

struct _GXmlDocumentIface {
	GTypeInterface parent_iface;
	GXmlNode* (*create_element) (GXmlDocument* self, const gchar* name, GError** error);
	GXmlNode* (*create_text) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_comment) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_cdata) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_pi) (GXmlDocument* self, const gchar* target, const gchar* data);
	gboolean (*save) (GXmlDocument* self, GCancellable* cancellable, GError** error);
	gboolean (*save_as) (GXmlDocument* self, GFile* f, GCancellable* cancellable, GError** error);
	gboolean (*get_indent) (GXmlDocument* self);
	void (*set_indent) (GXmlDocument* self, gboolean value);
	gboolean (*get_ns_top) (GXmlDocument* self);
	void (*set_ns_top) (GXmlDocument* self, gboolean value);
	gboolean (*get_prefix_default_ns) (GXmlDocument* self);
	void (*set_prefix_default_ns) (GXmlDocument* self, gboolean value);
	gboolean (*get_backup) (GXmlDocument* self);
	void (*set_backup) (GXmlDocument* self, gboolean value);
	GXmlNode* (*get_root) (GXmlDocument* self);
	GFile* (*get_file) (GXmlDocument* self);
	void (*set_file) (GXmlDocument* self, GFile* value);
};

struct _GXmlNodeIface {
	GTypeInterface parent_iface;
	GXmlNode* (*get) (GXmlNode* self, const gchar* key);
	GXmlElementList* (*get_elements_by_property_value) (GXmlNode* self, const gchar* property, const gchar* value);
	gchar* (*to_string) (GXmlNode* self);
	gboolean (*set_namespace) (GXmlNode* self, const gchar* uri, const gchar* prefix);
	gchar* (*ns_prefix) (GXmlNode* self);
	gchar* (*ns_uri) (GXmlNode* self);
	GeeList* (*get_namespaces) (GXmlNode* self);
	GeeBidirList* (*get_childs) (GXmlNode* self);
	GeeBidirList* (*get_children) (GXmlNode* self);
	GeeMap* (*get_attrs) (GXmlNode* self);
	gchar* (*get_name) (GXmlNode* self);
	gchar* (*get_value) (GXmlNode* self);
	void (*set_value) (GXmlNode* self, const gchar* value);
	GXmlNodeType (*get_type_node) (GXmlNode* self);
	GXmlDocument* (*get_document) (GXmlNode* self);
	GXmlNode* (*get_parent) (GXmlNode* self);
};

struct _GXmlTNode {
	GObject parent_instance;
	GXmlTNodePrivate * priv;
	gchar* _name;
	gchar* _value;
	GXmlDocument* _doc;
	GXmlNode* _parent;
	xmlTextWriter* tw;
};

struct _GXmlTNodeClass {
	GObjectClass parent_class;
	gboolean (*set_namespace) (GXmlTNode* self, const gchar* uri, const gchar* prefix);
	gchar* (*to_string) (GXmlTNode* self);
	void (*set_parent) (GXmlTNode* self, GXmlNode* node);
	GeeMap* (*get_attrs) (GXmlTNode* self);
	GeeBidirList* (*get_children) (GXmlTNode* self);
	GXmlDocument* (*get_document) (GXmlTNode* self);
	gchar* (*get_name) (GXmlTNode* self);
	GeeList* (*get_namespaces) (GXmlTNode* self);
	GXmlNodeType (*get_type_node) (GXmlTNode* self);
	gchar* (*get_value) (GXmlTNode* self);
	void (*set_value) (GXmlTNode* self, const gchar* value);
	GXmlNode* (*get_parent) (GXmlTNode* self);
};

struct _GXmlTNodeTChildrenList {
	GeeAbstractBidirList parent_instance;
	GXmlTNodeTChildrenListPrivate * priv;
};

struct _GXmlTNodeTChildrenListClass {
	GeeAbstractBidirListClass parent_class;
};

struct _GXmlTNodeTChildrenListPrivate {
	GXmlNode* _parent;
	GeeArrayList* list;
};


static gpointer gxml_tnode_parent_class = NULL;
static gpointer gxml_tnode_tchildren_list_parent_class = NULL;
static GXmlNodeIface* gxml_tnode_gxml_node_parent_iface = NULL;

GType gxml_element_list_get_type (void) G_GNUC_CONST;
GType gxml_namespace_get_type (void) G_GNUC_CONST;
GType gxml_node_type_get_type (void) G_GNUC_CONST;
GType gxml_document_get_type (void) G_GNUC_CONST;
GType gxml_node_get_type (void) G_GNUC_CONST;
GType gxml_tnode_get_type (void) G_GNUC_CONST;
enum  {
	GXML_TNODE_DUMMY_PROPERTY,
	GXML_TNODE_ATTRS,
	GXML_TNODE_CHILDREN,
	GXML_TNODE_DOCUMENT,
	GXML_TNODE_NAME,
	GXML_TNODE_NAMESPACES,
	GXML_TNODE_TYPE_NODE,
	GXML_TNODE_VALUE,
	GXML_TNODE_PARENT
};
gboolean gxml_tnode_set_namespace (GXmlTNode* self, const gchar* uri, const gchar* prefix);
static gboolean gxml_tnode_real_set_namespace (GXmlTNode* self, const gchar* uri, const gchar* prefix);
GXmlDocument* gxml_tnode_get_document (GXmlTNode* self);
GeeList* gxml_node_get_namespaces (GXmlNode* self);
gchar* gxml_namespace_get_uri (GXmlNamespace* self);
gchar* gxml_namespace_get_prefix (GXmlNamespace* self);
GeeList* gxml_tnode_get_namespaces (GXmlTNode* self);
GType gxml_tnamespace_get_type (void) G_GNUC_CONST;
GXmlTNamespace* gxml_tnamespace_new (GXmlDocument* d, const gchar* uri, const gchar* prefix);
GXmlTNamespace* gxml_tnamespace_construct (GType object_type, GXmlDocument* d, const gchar* uri, const gchar* prefix);
gchar* gxml_tnode_to_string (GXmlTNode* self);
static gchar* gxml_tnode_real_to_string (GXmlTNode* self);
void gxml_tnode_set_parent (GXmlTNode* self, GXmlNode* node);
static void gxml_tnode_real_set_parent (GXmlTNode* self, GXmlNode* node);
GXmlTNode* gxml_tnode_construct (GType object_type);
GeeMap* gxml_tnode_get_attrs (GXmlTNode* self);
GeeBidirList* gxml_tnode_get_children (GXmlTNode* self);
GXmlTNodeTChildrenList* gxml_tnode_tchildren_list_new (GXmlNode* e);
GXmlTNodeTChildrenList* gxml_tnode_tchildren_list_construct (GType object_type, GXmlNode* e);
GType gxml_tnode_tchildren_list_get_type (void) G_GNUC_CONST;
gchar* gxml_tnode_get_name (GXmlTNode* self);
GXmlNodeType gxml_tnode_get_type_node (GXmlTNode* self);
gchar* gxml_tnode_get_value (GXmlTNode* self);
void gxml_tnode_set_value (GXmlTNode* self, const gchar* value);
GXmlNode* gxml_tnode_get_parent (GXmlTNode* self);
static GObject * gxml_tnode_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
void gxml_init_init (void);
#define GXML_TNODE_TCHILDREN_LIST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GXML_TNODE_TYPE_TCHILDREN_LIST, GXmlTNodeTChildrenListPrivate))
enum  {
	GXML_TNODE_TCHILDREN_LIST_DUMMY_PROPERTY,
	GXML_TNODE_TCHILDREN_LIST_READ_ONLY,
	GXML_TNODE_TCHILDREN_LIST_SIZE
};
static inline GeeBidirListIterator* gxml_tnode_tchildren_list_real_bidir_list_iterator (GeeAbstractBidirList* base);
static inline GXmlNode* gxml_tnode_tchildren_list_real_get (GeeAbstractList* base, gint index);
static inline gint gxml_tnode_tchildren_list_real_index_of (GeeAbstractList* base, GXmlNode* item);
static inline void gxml_tnode_tchildren_list_real_insert (GeeAbstractList* base, gint index, GXmlNode* item);
static inline GeeListIterator* gxml_tnode_tchildren_list_real_list_iterator (GeeAbstractList* base);
static inline GXmlNode* gxml_tnode_tchildren_list_real_remove_at (GeeAbstractList* base, gint index);
static inline void gxml_tnode_tchildren_list_real_set (GeeAbstractList* base, gint index, GXmlNode* item);
static inline GeeList* gxml_tnode_tchildren_list_real_slice (GeeAbstractList* base, gint start, gint stop);
static gboolean gxml_tnode_tchildren_list_real_add (GeeAbstractCollection* base, GXmlNode* item);
static inline void gxml_tnode_tchildren_list_real_clear (GeeAbstractCollection* base);
static inline gboolean gxml_tnode_tchildren_list_real_contains (GeeAbstractCollection* base, GXmlNode* item);
static inline GeeIterator* gxml_tnode_tchildren_list_real_iterator (GeeAbstractCollection* base);
static inline gboolean gxml_tnode_tchildren_list_real_remove (GeeAbstractCollection* base, GXmlNode* item);
static void gxml_tnode_tchildren_list_finalize (GObject* obj);
static void _vala_gxml_tnode_tchildren_list_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void gxml_tnode_finalize (GObject* obj);
static void _vala_gxml_tnode_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gxml_tnode_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static gboolean gxml_tnode_real_set_namespace (GXmlTNode* self, const gchar* uri, const gchar* prefix) {
	gboolean result = FALSE;
	gboolean found = FALSE;
	gboolean _tmp29_ = FALSE;
	g_return_val_if_fail (uri != NULL, FALSE);
	found = FALSE;
	{
		GeeList* _ns_list = NULL;
		GXmlDocument* _tmp0_ = NULL;
		GXmlDocument* _tmp1_ = NULL;
		GeeList* _tmp2_ = NULL;
		GeeList* _tmp3_ = NULL;
		gint _ns_size = 0;
		GeeList* _tmp4_ = NULL;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		gint _ns_index = 0;
		_tmp0_ = gxml_tnode_get_document (self);
		_tmp1_ = _tmp0_;
		_tmp2_ = gxml_node_get_namespaces ((GXmlNode*) _tmp1_);
		_tmp3_ = _tmp2_;
		_ns_list = _tmp3_;
		_tmp4_ = _ns_list;
		_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_ns_size = _tmp6_;
		_ns_index = -1;
		while (TRUE) {
			gint _tmp7_ = 0;
			gint _tmp8_ = 0;
			gint _tmp9_ = 0;
			GXmlNamespace* ns = NULL;
			GeeList* _tmp10_ = NULL;
			gint _tmp11_ = 0;
			gpointer _tmp12_ = NULL;
			gboolean _tmp13_ = FALSE;
			GXmlNamespace* _tmp14_ = NULL;
			gchar* _tmp15_ = NULL;
			gchar* _tmp16_ = NULL;
			gchar* _tmp17_ = NULL;
			const gchar* _tmp18_ = NULL;
			gboolean _tmp19_ = FALSE;
			_tmp7_ = _ns_index;
			_ns_index = _tmp7_ + 1;
			_tmp8_ = _ns_index;
			_tmp9_ = _ns_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _ns_list;
			_tmp11_ = _ns_index;
			_tmp12_ = gee_list_get (_tmp10_, _tmp11_);
			ns = (GXmlNamespace*) _tmp12_;
			_tmp14_ = ns;
			_tmp15_ = gxml_namespace_get_uri (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = _tmp16_;
			_tmp18_ = uri;
			_tmp19_ = g_strcmp0 (_tmp17_, _tmp18_) == 0;
			_g_free0 (_tmp17_);
			if (_tmp19_) {
				GXmlNamespace* _tmp20_ = NULL;
				gchar* _tmp21_ = NULL;
				gchar* _tmp22_ = NULL;
				gchar* _tmp23_ = NULL;
				const gchar* _tmp24_ = NULL;
				_tmp20_ = ns;
				_tmp21_ = gxml_namespace_get_prefix (_tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = _tmp22_;
				_tmp24_ = prefix;
				_tmp13_ = g_strcmp0 (_tmp23_, _tmp24_) == 0;
				_g_free0 (_tmp23_);
			} else {
				_tmp13_ = FALSE;
			}
			if (_tmp13_) {
				GeeList* _tmp25_ = NULL;
				GeeList* _tmp26_ = NULL;
				GeeList* _tmp27_ = NULL;
				GXmlNamespace* _tmp28_ = NULL;
				_tmp25_ = gxml_tnode_get_namespaces (self);
				_tmp26_ = _tmp25_;
				_tmp27_ = _tmp26_;
				_tmp28_ = ns;
				gee_collection_add ((GeeCollection*) _tmp27_, _tmp28_);
				_g_object_unref0 (_tmp27_);
				found = TRUE;
			}
			_g_object_unref0 (ns);
		}
		_g_object_unref0 (_ns_list);
	}
	_tmp29_ = found;
	if (!_tmp29_) {
		GXmlTNamespace* nns = NULL;
		GXmlDocument* _tmp30_ = NULL;
		GXmlDocument* _tmp31_ = NULL;
		const gchar* _tmp32_ = NULL;
		const gchar* _tmp33_ = NULL;
		GXmlTNamespace* _tmp34_ = NULL;
		GXmlDocument* _tmp35_ = NULL;
		GXmlDocument* _tmp36_ = NULL;
		GeeList* _tmp37_ = NULL;
		GeeList* _tmp38_ = NULL;
		GeeList* _tmp39_ = NULL;
		GXmlTNamespace* _tmp40_ = NULL;
		GeeList* _tmp41_ = NULL;
		GeeList* _tmp42_ = NULL;
		GeeList* _tmp43_ = NULL;
		GXmlTNamespace* _tmp44_ = NULL;
		_tmp30_ = gxml_tnode_get_document (self);
		_tmp31_ = _tmp30_;
		_tmp32_ = uri;
		_tmp33_ = prefix;
		_tmp34_ = gxml_tnamespace_new (_tmp31_, _tmp32_, _tmp33_);
		nns = _tmp34_;
		_tmp35_ = gxml_tnode_get_document (self);
		_tmp36_ = _tmp35_;
		_tmp37_ = gxml_node_get_namespaces ((GXmlNode*) _tmp36_);
		_tmp38_ = _tmp37_;
		_tmp39_ = _tmp38_;
		_tmp40_ = nns;
		gee_collection_add ((GeeCollection*) _tmp39_, (GXmlNamespace*) _tmp40_);
		_g_object_unref0 (_tmp39_);
		_tmp41_ = gxml_tnode_get_namespaces (self);
		_tmp42_ = _tmp41_;
		_tmp43_ = _tmp42_;
		_tmp44_ = nns;
		gee_collection_add ((GeeCollection*) _tmp43_, (GXmlNamespace*) _tmp44_);
		_g_object_unref0 (_tmp43_);
		_g_object_unref0 (nns);
	}
	result = TRUE;
	return result;
}


gboolean gxml_tnode_set_namespace (GXmlTNode* self, const gchar* uri, const gchar* prefix) {
	g_return_val_if_fail (self != NULL, FALSE);
	return GXML_TNODE_GET_CLASS (self)->set_namespace (self, uri, prefix);
}


static gchar* gxml_tnode_real_to_string (GXmlTNode* self) {
	gchar* result = NULL;
	GType _tmp0_ = 0UL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_tmp0_ = G_TYPE_FROM_INSTANCE ((GObject*) self);
	_tmp1_ = g_type_name (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}


gchar* gxml_tnode_to_string (GXmlTNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_TNODE_GET_CLASS (self)->to_string (self);
}


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


static void gxml_tnode_real_set_parent (GXmlTNode* self, GXmlNode* node) {
	GXmlNode* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	g_return_if_fail (node != NULL);
	_tmp0_ = node;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->_parent);
	self->_parent = _tmp1_;
}


void gxml_tnode_set_parent (GXmlTNode* self, GXmlNode* node) {
	g_return_if_fail (self != NULL);
	GXML_TNODE_GET_CLASS (self)->set_parent (self, node);
}


GXmlTNode* gxml_tnode_construct (GType object_type) {
	GXmlTNode * self = NULL;
	self = (GXmlTNode*) g_object_new (object_type, NULL);
	return self;
}


GeeMap* gxml_tnode_get_attrs (GXmlTNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_TNODE_GET_CLASS (self)->get_attrs (self);
}


static GeeMap* gxml_tnode_real_get_attrs (GXmlTNode* base) {
	GeeMap* result;
	GXmlTNode* self;
	GeeHashMap* _tmp0_ = NULL;
	self = base;
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GXML_TYPE_NODE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	result = (GeeMap*) _tmp0_;
	return result;
}


GeeBidirList* gxml_tnode_get_children (GXmlTNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_TNODE_GET_CLASS (self)->get_children (self);
}


static GeeBidirList* gxml_tnode_real_get_children (GXmlTNode* base) {
	GeeBidirList* result;
	GXmlTNode* self;
	GXmlTNodeTChildrenList* _tmp0_ = NULL;
	self = base;
	_tmp0_ = gxml_tnode_tchildren_list_new ((GXmlNode*) self);
	result = (GeeBidirList*) _tmp0_;
	return result;
}


GXmlDocument* gxml_tnode_get_document (GXmlTNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_TNODE_GET_CLASS (self)->get_document (self);
}


static GXmlDocument* gxml_tnode_real_get_document (GXmlTNode* base) {
	GXmlDocument* result;
	GXmlTNode* self;
	GXmlDocument* _tmp0_ = NULL;
	self = base;
	_tmp0_ = self->_doc;
	result = _tmp0_;
	return result;
}


gchar* gxml_tnode_get_name (GXmlTNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_TNODE_GET_CLASS (self)->get_name (self);
}


static gchar* gxml_tnode_real_get_name (GXmlTNode* base) {
	gchar* result;
	GXmlTNode* self;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	self = base;
	_tmp0_ = self->_name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


GeeList* gxml_tnode_get_namespaces (GXmlTNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_TNODE_GET_CLASS (self)->get_namespaces (self);
}


static GeeList* gxml_tnode_real_get_namespaces (GXmlTNode* base) {
	GeeList* result;
	GXmlTNode* self;
	GeeArrayList* _tmp0_ = NULL;
	self = base;
	_tmp0_ = gee_array_list_new (GXML_TYPE_NODE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	result = (GeeList*) _tmp0_;
	return result;
}


GXmlNodeType gxml_tnode_get_type_node (GXmlTNode* self) {
	g_return_val_if_fail (self != NULL, 0);
	return GXML_TNODE_GET_CLASS (self)->get_type_node (self);
}


static GXmlNodeType gxml_tnode_real_get_type_node (GXmlTNode* base) {
	GXmlNodeType result;
	GXmlTNode* self;
	self = base;
	result = GXML_NODE_TYPE_DOCUMENT;
	return result;
}


gchar* gxml_tnode_get_value (GXmlTNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_TNODE_GET_CLASS (self)->get_value (self);
}


static gchar* gxml_tnode_real_get_value (GXmlTNode* base) {
	gchar* result;
	GXmlTNode* self;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	self = base;
	_tmp0_ = self->_value;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


void gxml_tnode_set_value (GXmlTNode* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	GXML_TNODE_GET_CLASS (self)->set_value (self, value);
}


static void gxml_tnode_real_set_value (GXmlTNode* base, const gchar* value) {
	GXmlTNode* self;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	self = base;
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->_value);
	self->_value = _tmp1_;
	g_object_notify ((GObject *) self, "value");
}


GXmlNode* gxml_tnode_get_parent (GXmlTNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_TNODE_GET_CLASS (self)->get_parent (self);
}


static GXmlNode* gxml_tnode_real_get_parent (GXmlTNode* base) {
	GXmlNode* result;
	GXmlTNode* self;
	GXmlNode* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	GObject* _tmp2_ = NULL;
	GXmlNode* _tmp3_ = NULL;
	self = base;
	_tmp0_ = self->_parent;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = self->_parent;
	_tmp2_ = g_object_ref ((GObject*) _tmp1_);
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GXML_TYPE_NODE, GXmlNode));
	result = _tmp3_;
	return result;
}


static GObject * gxml_tnode_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GXmlTNode * self;
	parent_class = G_OBJECT_CLASS (gxml_tnode_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_TNODE, GXmlTNode);
	gxml_init_init ();
	return obj;
}


GXmlTNodeTChildrenList* gxml_tnode_tchildren_list_construct (GType object_type, GXmlNode* e) {
	GXmlTNodeTChildrenList * self = NULL;
	GXmlNode* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	g_return_val_if_fail (e != NULL, NULL);
	self = (GXmlTNodeTChildrenList*) gee_abstract_bidir_list_construct (object_type, GXML_TYPE_NODE, (GBoxedCopyFunc) g_object_ref, g_object_unref);
	_tmp0_ = e;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_parent);
	self->priv->_parent = _tmp1_;
	return self;
}


GXmlTNodeTChildrenList* gxml_tnode_tchildren_list_new (GXmlNode* e) {
	return gxml_tnode_tchildren_list_construct (GXML_TNODE_TYPE_TCHILDREN_LIST, e);
}


static inline GeeBidirListIterator* gxml_tnode_tchildren_list_real_bidir_list_iterator (GeeAbstractBidirList* base) {
	GXmlTNodeTChildrenList * self;
	GeeBidirListIterator* result = NULL;
	GeeArrayList* _tmp0_ = NULL;
	GeeBidirListIterator* _tmp1_ = NULL;
	self = (GXmlTNodeTChildrenList*) base;
	_tmp0_ = self->priv->list;
	_tmp1_ = gee_abstract_bidir_list_bidir_list_iterator ((GeeAbstractBidirList*) _tmp0_);
	result = _tmp1_;
	return result;
}


static inline GXmlNode* gxml_tnode_tchildren_list_real_get (GeeAbstractList* base, gint index) {
	GXmlTNodeTChildrenList * self;
	GXmlNode* result = NULL;
	GeeArrayList* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gpointer _tmp2_ = NULL;
	self = (GXmlTNodeTChildrenList*) base;
	_tmp0_ = self->priv->list;
	_tmp1_ = index;
	_tmp2_ = gee_abstract_list_get ((GeeAbstractList*) _tmp0_, _tmp1_);
	result = (GXmlNode*) _tmp2_;
	return result;
}


static inline gint gxml_tnode_tchildren_list_real_index_of (GeeAbstractList* base, GXmlNode* item) {
	GXmlTNodeTChildrenList * self;
	gint result = 0;
	GeeArrayList* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	self = (GXmlTNodeTChildrenList*) base;
	g_return_val_if_fail (item != NULL, 0);
	_tmp0_ = self->priv->list;
	_tmp1_ = item;
	_tmp2_ = gee_abstract_list_index_of ((GeeAbstractList*) _tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}


static inline void gxml_tnode_tchildren_list_real_insert (GeeAbstractList* base, gint index, GXmlNode* item) {
	GXmlTNodeTChildrenList * self;
	GeeArrayList* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	GXmlNode* _tmp2_ = NULL;
	self = (GXmlTNodeTChildrenList*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->list;
	_tmp1_ = index;
	_tmp2_ = item;
	gee_abstract_list_insert ((GeeAbstractList*) _tmp0_, _tmp1_, _tmp2_);
}


static inline GeeListIterator* gxml_tnode_tchildren_list_real_list_iterator (GeeAbstractList* base) {
	GXmlTNodeTChildrenList * self;
	GeeListIterator* result = NULL;
	GeeArrayList* _tmp0_ = NULL;
	GeeListIterator* _tmp1_ = NULL;
	self = (GXmlTNodeTChildrenList*) base;
	_tmp0_ = self->priv->list;
	_tmp1_ = gee_abstract_list_list_iterator ((GeeAbstractList*) _tmp0_);
	result = _tmp1_;
	return result;
}


static inline GXmlNode* gxml_tnode_tchildren_list_real_remove_at (GeeAbstractList* base, gint index) {
	GXmlTNodeTChildrenList * self;
	GXmlNode* result = NULL;
	GeeArrayList* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gpointer _tmp2_ = NULL;
	self = (GXmlTNodeTChildrenList*) base;
	_tmp0_ = self->priv->list;
	_tmp1_ = index;
	_tmp2_ = gee_abstract_list_remove_at ((GeeAbstractList*) _tmp0_, _tmp1_);
	result = (GXmlNode*) _tmp2_;
	return result;
}


static inline void gxml_tnode_tchildren_list_real_set (GeeAbstractList* base, gint index, GXmlNode* item) {
	GXmlTNodeTChildrenList * self;
	GeeArrayList* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	GXmlNode* _tmp2_ = NULL;
	self = (GXmlTNodeTChildrenList*) base;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->list;
	_tmp1_ = index;
	_tmp2_ = item;
	gee_abstract_list_set ((GeeAbstractList*) _tmp0_, _tmp1_, _tmp2_);
}


static inline GeeList* gxml_tnode_tchildren_list_real_slice (GeeAbstractList* base, gint start, gint stop) {
	GXmlTNodeTChildrenList * self;
	GeeList* result = NULL;
	GeeArrayList* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	GeeList* _tmp3_ = NULL;
	self = (GXmlTNodeTChildrenList*) base;
	_tmp0_ = self->priv->list;
	_tmp1_ = start;
	_tmp2_ = stop;
	_tmp3_ = gee_abstract_list_slice ((GeeAbstractList*) _tmp0_, _tmp1_, _tmp2_);
	result = _tmp3_;
	return result;
}


static gboolean gxml_tnode_tchildren_list_real_add (GeeAbstractCollection* base, GXmlNode* item) {
	GXmlTNodeTChildrenList * self;
	gboolean result = FALSE;
	GXmlNode* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	GeeArrayList* _tmp2_ = NULL;
	GXmlNode* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	self = (GXmlTNodeTChildrenList*) base;
	g_return_val_if_fail (item != NULL, FALSE);
	_tmp0_ = item;
	_tmp1_ = self->priv->_parent;
	gxml_tnode_set_parent (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GXML_TYPE_TNODE) ? ((GXmlTNode*) _tmp0_) : NULL, _tmp1_);
	_tmp2_ = self->priv->list;
	_tmp3_ = item;
	_tmp4_ = gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, _tmp3_);
	result = _tmp4_;
	return result;
}


static inline void gxml_tnode_tchildren_list_real_clear (GeeAbstractCollection* base) {
	GXmlTNodeTChildrenList * self;
	GeeArrayList* _tmp0_ = NULL;
	self = (GXmlTNodeTChildrenList*) base;
	_tmp0_ = self->priv->list;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
}


static inline gboolean gxml_tnode_tchildren_list_real_contains (GeeAbstractCollection* base, GXmlNode* item) {
	GXmlTNodeTChildrenList * self;
	gboolean result = FALSE;
	GeeArrayList* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	self = (GXmlTNodeTChildrenList*) base;
	g_return_val_if_fail (item != NULL, FALSE);
	_tmp0_ = self->priv->list;
	_tmp1_ = item;
	_tmp2_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}


static inline GeeIterator* gxml_tnode_tchildren_list_real_iterator (GeeAbstractCollection* base) {
	GXmlTNodeTChildrenList * self;
	GeeIterator* result = NULL;
	GeeArrayList* _tmp0_ = NULL;
	GeeIterator* _tmp1_ = NULL;
	self = (GXmlTNodeTChildrenList*) base;
	_tmp0_ = self->priv->list;
	_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp0_);
	result = _tmp1_;
	return result;
}


static inline gboolean gxml_tnode_tchildren_list_real_remove (GeeAbstractCollection* base, GXmlNode* item) {
	GXmlTNodeTChildrenList * self;
	gboolean result = FALSE;
	GeeArrayList* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	self = (GXmlTNodeTChildrenList*) base;
	g_return_val_if_fail (item != NULL, FALSE);
	_tmp0_ = self->priv->list;
	_tmp1_ = item;
	_tmp2_ = gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}


static gboolean gxml_tnode_tchildren_list_real_get_read_only (GeeAbstractCollection* base) {
	gboolean result;
	GXmlTNodeTChildrenList* self;
	GeeArrayList* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	self = (GXmlTNodeTChildrenList*) base;
	_tmp0_ = self->priv->list;
	_tmp1_ = gee_abstract_collection_get_read_only ((GeeCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


static gint gxml_tnode_tchildren_list_real_get_size (GeeAbstractCollection* base) {
	gint result;
	GXmlTNodeTChildrenList* self;
	GeeArrayList* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	self = (GXmlTNodeTChildrenList*) base;
	_tmp0_ = self->priv->list;
	_tmp1_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


static void gxml_tnode_tchildren_list_class_init (GXmlTNodeTChildrenListClass * klass) {
	gxml_tnode_tchildren_list_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GXmlTNodeTChildrenListPrivate));
	((GeeAbstractBidirListClass *) klass)->bidir_list_iterator = gxml_tnode_tchildren_list_real_bidir_list_iterator;
	((GeeAbstractListClass *) klass)->get = gxml_tnode_tchildren_list_real_get;
	((GeeAbstractListClass *) klass)->index_of = gxml_tnode_tchildren_list_real_index_of;
	((GeeAbstractListClass *) klass)->insert = gxml_tnode_tchildren_list_real_insert;
	((GeeAbstractListClass *) klass)->list_iterator = gxml_tnode_tchildren_list_real_list_iterator;
	((GeeAbstractListClass *) klass)->remove_at = gxml_tnode_tchildren_list_real_remove_at;
	((GeeAbstractListClass *) klass)->set = gxml_tnode_tchildren_list_real_set;
	((GeeAbstractListClass *) klass)->slice = gxml_tnode_tchildren_list_real_slice;
	((GeeAbstractCollectionClass *) klass)->add = gxml_tnode_tchildren_list_real_add;
	((GeeAbstractCollectionClass *) klass)->clear = gxml_tnode_tchildren_list_real_clear;
	((GeeAbstractCollectionClass *) klass)->contains = gxml_tnode_tchildren_list_real_contains;
	((GeeAbstractCollectionClass *) klass)->iterator = gxml_tnode_tchildren_list_real_iterator;
	((GeeAbstractCollectionClass *) klass)->remove = gxml_tnode_tchildren_list_real_remove;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = gxml_tnode_tchildren_list_real_get_read_only;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = gxml_tnode_tchildren_list_real_get_size;
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_tnode_tchildren_list_get_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_tnode_tchildren_list_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_TCHILDREN_LIST_READ_ONLY, g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_TCHILDREN_LIST_SIZE, g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void gxml_tnode_tchildren_list_instance_init (GXmlTNodeTChildrenList * self) {
	GeeArrayList* _tmp0_ = NULL;
	self->priv = GXML_TNODE_TCHILDREN_LIST_GET_PRIVATE (self);
	_tmp0_ = gee_array_list_new (GXML_TYPE_NODE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	self->priv->list = _tmp0_;
}


static void gxml_tnode_tchildren_list_finalize (GObject* obj) {
	GXmlTNodeTChildrenList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TNODE_TYPE_TCHILDREN_LIST, GXmlTNodeTChildrenList);
	_g_object_unref0 (self->priv->_parent);
	_g_object_unref0 (self->priv->list);
	G_OBJECT_CLASS (gxml_tnode_tchildren_list_parent_class)->finalize (obj);
}


GType gxml_tnode_tchildren_list_get_type (void) {
	static volatile gsize gxml_tnode_tchildren_list_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_tnode_tchildren_list_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlTNodeTChildrenListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_tnode_tchildren_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlTNodeTChildrenList), 0, (GInstanceInitFunc) gxml_tnode_tchildren_list_instance_init, NULL };
		GType gxml_tnode_tchildren_list_type_id;
		gxml_tnode_tchildren_list_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_BIDIR_LIST, "GXmlTNodeTChildrenList", &g_define_type_info, 0);
		g_once_init_leave (&gxml_tnode_tchildren_list_type_id__volatile, gxml_tnode_tchildren_list_type_id);
	}
	return gxml_tnode_tchildren_list_type_id__volatile;
}


static void _vala_gxml_tnode_tchildren_list_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlTNodeTChildrenList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TNODE_TYPE_TCHILDREN_LIST, GXmlTNodeTChildrenList);
	switch (property_id) {
		case GXML_TNODE_TCHILDREN_LIST_READ_ONLY:
		g_value_set_boolean (value, gee_abstract_collection_get_read_only ((GeeAbstractCollection*) self));
		break;
		case GXML_TNODE_TCHILDREN_LIST_SIZE:
		g_value_set_int (value, gee_abstract_collection_get_size ((GeeAbstractCollection*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void gxml_tnode_class_init (GXmlTNodeClass * klass) {
	gxml_tnode_parent_class = g_type_class_peek_parent (klass);
	((GXmlTNodeClass *) klass)->set_namespace = gxml_tnode_real_set_namespace;
	((GXmlTNodeClass *) klass)->to_string = gxml_tnode_real_to_string;
	((GXmlTNodeClass *) klass)->set_parent = gxml_tnode_real_set_parent;
	GXML_TNODE_CLASS (klass)->get_attrs = gxml_tnode_real_get_attrs;
	GXML_TNODE_CLASS (klass)->get_children = gxml_tnode_real_get_children;
	GXML_TNODE_CLASS (klass)->get_document = gxml_tnode_real_get_document;
	GXML_TNODE_CLASS (klass)->get_name = gxml_tnode_real_get_name;
	GXML_TNODE_CLASS (klass)->get_namespaces = gxml_tnode_real_get_namespaces;
	GXML_TNODE_CLASS (klass)->get_type_node = gxml_tnode_real_get_type_node;
	GXML_TNODE_CLASS (klass)->get_value = gxml_tnode_real_get_value;
	GXML_TNODE_CLASS (klass)->set_value = gxml_tnode_real_set_value;
	GXML_TNODE_CLASS (klass)->get_parent = gxml_tnode_real_get_parent;
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_tnode_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_tnode_set_property;
	G_OBJECT_CLASS (klass)->constructor = gxml_tnode_constructor;
	G_OBJECT_CLASS (klass)->finalize = gxml_tnode_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_ATTRS, g_param_spec_object ("attrs", "attrs", "attrs", GEE_TYPE_MAP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_CHILDREN, g_param_spec_object ("children", "children", "children", GEE_TYPE_BIDIR_LIST, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_DOCUMENT, g_param_spec_object ("document", "document", "document", GXML_TYPE_DOCUMENT, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_NAMESPACES, g_param_spec_object ("namespaces", "namespaces", "namespaces", GEE_TYPE_LIST, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_TYPE_NODE, g_param_spec_enum ("type-node", "type-node", "type-node", GXML_TYPE_NODE_TYPE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_VALUE, g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_TNODE_PARENT, g_param_spec_object ("parent", "parent", "parent", GXML_TYPE_NODE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void gxml_tnode_gxml_node_interface_init (GXmlNodeIface * iface) {
	gxml_tnode_gxml_node_parent_iface = g_type_interface_peek_parent (iface);
	iface->set_namespace = (gboolean (*)(GXmlNode*, const gchar*, const gchar*)) gxml_tnode_set_namespace;
	iface->to_string = (gchar* (*)(GXmlNode*)) gxml_tnode_to_string;
	iface->get_attrs = (GeeMap* (*) (GXmlNode *)) gxml_tnode_get_attrs;
	iface->get_children = (GeeBidirList* (*) (GXmlNode *)) gxml_tnode_get_children;
	iface->get_document = (GXmlDocument* (*) (GXmlNode *)) gxml_tnode_get_document;
	iface->get_name = (gchar* (*) (GXmlNode *)) gxml_tnode_get_name;
	iface->get_namespaces = (GeeList* (*) (GXmlNode *)) gxml_tnode_get_namespaces;
	iface->get_type_node = (GXmlNodeType (*) (GXmlNode *)) gxml_tnode_get_type_node;
	iface->get_value = (gchar* (*) (GXmlNode *)) gxml_tnode_get_value;
	iface->set_value = (void (*) (GXmlNode *, const gchar*)) gxml_tnode_set_value;
	iface->get_parent = (GXmlNode* (*) (GXmlNode *)) gxml_tnode_get_parent;
}


static void gxml_tnode_instance_init (GXmlTNode * self) {
	self->_name = NULL;
	self->_value = NULL;
}


static void gxml_tnode_finalize (GObject* obj) {
	GXmlTNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_TNODE, GXmlTNode);
	_g_free0 (self->_name);
	_g_free0 (self->_value);
	_g_object_unref0 (self->_doc);
	_g_object_unref0 (self->_parent);
	G_OBJECT_CLASS (gxml_tnode_parent_class)->finalize (obj);
}


/**
 * Base node abstract class implemeting {@link GXml.Node} interface, not tied to libxml-2.0 library.
 */
GType gxml_tnode_get_type (void) {
	static volatile gsize gxml_tnode_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_tnode_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlTNodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_tnode_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlTNode), 0, (GInstanceInitFunc) gxml_tnode_instance_init, NULL };
		static const GInterfaceInfo gxml_node_info = { (GInterfaceInitFunc) gxml_tnode_gxml_node_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gxml_tnode_type_id;
		gxml_tnode_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlTNode", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (gxml_tnode_type_id, GXML_TYPE_NODE, &gxml_node_info);
		g_once_init_leave (&gxml_tnode_type_id__volatile, gxml_tnode_type_id);
	}
	return gxml_tnode_type_id__volatile;
}


static void _vala_gxml_tnode_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlTNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_TNODE, GXmlTNode);
	switch (property_id) {
		case GXML_TNODE_ATTRS:
		g_value_take_object (value, gxml_tnode_get_attrs (self));
		break;
		case GXML_TNODE_CHILDREN:
		g_value_take_object (value, gxml_tnode_get_children (self));
		break;
		case GXML_TNODE_DOCUMENT:
		g_value_set_object (value, gxml_tnode_get_document (self));
		break;
		case GXML_TNODE_NAME:
		g_value_take_string (value, gxml_tnode_get_name (self));
		break;
		case GXML_TNODE_NAMESPACES:
		g_value_take_object (value, gxml_tnode_get_namespaces (self));
		break;
		case GXML_TNODE_TYPE_NODE:
		g_value_set_enum (value, gxml_tnode_get_type_node (self));
		break;
		case GXML_TNODE_VALUE:
		g_value_take_string (value, gxml_tnode_get_value (self));
		break;
		case GXML_TNODE_PARENT:
		g_value_take_object (value, gxml_tnode_get_parent (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gxml_tnode_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GXmlTNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_TNODE, GXmlTNode);
	switch (property_id) {
		case GXML_TNODE_VALUE:
		gxml_tnode_set_value (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



