/* txr-doc.c generated by valac 0.16.1, the Vala compiler
 * generated from txr-doc.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>


#define TYPE_TXR_DOC_IFACE (txr_doc_iface_get_type ())
#define TXR_DOC_IFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TXR_DOC_IFACE, TXRDocIface))
#define IS_TXR_DOC_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TXR_DOC_IFACE))
#define TXR_DOC_IFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_TXR_DOC_IFACE, TXRDocIfaceIface))

typedef struct _TXRDocIface TXRDocIface;
typedef struct _TXRDocIfaceIface TXRDocIfaceIface;

#define TYPE_TXR_OBJECT (txr_object_get_type ())
#define TXR_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TXR_OBJECT, TXRObject))
#define TXR_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TXR_OBJECT, TXRObjectClass))
#define IS_TXR_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TXR_OBJECT))
#define IS_TXR_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TXR_OBJECT))
#define TXR_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TXR_OBJECT, TXRObjectClass))

typedef struct _TXRObject TXRObject;
typedef struct _TXRObjectClass TXRObjectClass;
typedef struct _TXRObjectPrivate TXRObjectPrivate;

#define TYPE_TXR_DOC (txr_doc_get_type ())
#define TXR_DOC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TXR_DOC, TXRDoc))
#define TXR_DOC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TXR_DOC, TXRDocClass))
#define IS_TXR_DOC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TXR_DOC))
#define IS_TXR_DOC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TXR_DOC))
#define TXR_DOC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TXR_DOC, TXRDocClass))

typedef struct _TXRDoc TXRDoc;
typedef struct _TXRDocClass TXRDocClass;
typedef struct _TXRDocPrivate TXRDocPrivate;

struct _TXRDocIfaceIface {
	GTypeInterface parent_iface;
	gchar* (*gen) (TXRDocIface* self);
};

struct _TXRObject {
	GObject parent_instance;
	TXRObjectPrivate * priv;
	gint object_field;
};

struct _TXRObjectClass {
	GObjectClass parent_class;
	void (*copy) (TXRObject* self, TXRObject* copy);
};

struct _TXRDoc {
	TXRObject parent_instance;
	TXRDocPrivate * priv;
	gint doc_field;
};

struct _TXRDocClass {
	TXRObjectClass parent_class;
};


static gpointer txr_doc_parent_class = NULL;

GType txr_doc_iface_get_type (void) G_GNUC_CONST;
gchar* txr_doc_iface_gen (TXRDocIface* self);
GType txr_object_get_type (void) G_GNUC_CONST;
GType txr_doc_get_type (void) G_GNUC_CONST;
enum  {
	TXR_DOC_DUMMY_PROPERTY
};
static void txr_doc_real_copy (TXRObject* base, TXRObject* copy);
void txr_object_copy (TXRObject* self, TXRObject* copy);
TXRDoc* txr_doc_new (void);
TXRDoc* txr_doc_construct (GType object_type);
TXRObject* txr_object_new (void);
TXRObject* txr_object_construct (GType object_type);
static void txr_doc_finalize (GObject* obj);


gchar* txr_doc_iface_gen (TXRDocIface* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return TXR_DOC_IFACE_GET_INTERFACE (self)->gen (self);
}


static void txr_doc_iface_base_init (TXRDocIfaceIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
	}
}


GType txr_doc_iface_get_type (void) {
	static volatile gsize txr_doc_iface_type_id__volatile = 0;
	if (g_once_init_enter (&txr_doc_iface_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TXRDocIfaceIface), (GBaseInitFunc) txr_doc_iface_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType txr_doc_iface_type_id;
		txr_doc_iface_type_id = g_type_register_static (G_TYPE_INTERFACE, "TXRDocIface", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (txr_doc_iface_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&txr_doc_iface_type_id__volatile, txr_doc_iface_type_id);
	}
	return txr_doc_iface_type_id__volatile;
}


static void txr_doc_real_copy (TXRObject* base, TXRObject* copy) {
	TXRDoc * self;
	FILE* _tmp0_;
	TXRObject* _tmp1_;
	self = (TXRDoc*) base;
	g_return_if_fail (copy != NULL);
	_tmp0_ = stdout;
	fprintf (_tmp0_, "TXRDoc:copy() called\n");
	_tmp1_ = copy;
	if (IS_TXR_OBJECT (_tmp1_)) {
		TXRObject* _tmp2_;
		TXRObject* _tmp3_;
		gint _tmp4_;
		_tmp2_ = copy;
		TXR_OBJECT_CLASS (txr_doc_parent_class)->copy (TXR_OBJECT (self), _tmp2_);
		_tmp3_ = copy;
		_tmp4_ = self->doc_field;
		TXR_DOC (_tmp3_)->doc_field = _tmp4_;
	}
}


TXRDoc* txr_doc_construct (GType object_type) {
	TXRDoc * self = NULL;
	self = (TXRDoc*) txr_object_construct (object_type);
	return self;
}


TXRDoc* txr_doc_new (void) {
	return txr_doc_construct (TYPE_TXR_DOC);
}


static void txr_doc_class_init (TXRDocClass * klass) {
	txr_doc_parent_class = g_type_class_peek_parent (klass);
	TXR_OBJECT_CLASS (klass)->copy = txr_doc_real_copy;
	G_OBJECT_CLASS (klass)->finalize = txr_doc_finalize;
}


static void txr_doc_instance_init (TXRDoc * self) {
}


static void txr_doc_finalize (GObject* obj) {
	TXRDoc * self;
	self = TXR_DOC (obj);
	G_OBJECT_CLASS (txr_doc_parent_class)->finalize (obj);
}


GType txr_doc_get_type (void) {
	static volatile gsize txr_doc_type_id__volatile = 0;
	if (g_once_init_enter (&txr_doc_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TXRDocClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) txr_doc_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TXRDoc), 0, (GInstanceInitFunc) txr_doc_instance_init, NULL };
		GType txr_doc_type_id;
		txr_doc_type_id = g_type_register_static (TYPE_TXR_OBJECT, "TXRDoc", &g_define_type_info, 0);
		g_once_init_leave (&txr_doc_type_id__volatile, txr_doc_type_id);
	}
	return txr_doc_type_id__volatile;
}



