/* Generated by GOB (v2.0.20)   (do not edit directly) */

/* End world hunger, donate to the World Food Programme, http://www.wfp.org */

#define GOB_VERSION_MAJOR 2
#define GOB_VERSION_MINOR 0
#define GOB_VERSION_PATCHLEVEL 20

#define selfp (self->_priv)

#include <string.h> /* memset() */

#include "notifying-string.h"

#include "notifying-string-private.h"

#ifdef G_LIKELY
#define ___GOB_LIKELY(expr) G_LIKELY(expr)
#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
#else /* ! G_LIKELY */
#define ___GOB_LIKELY(expr) (expr)
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
/* self casting macros */
#define SELF(x) NOTIFYING_STRING(x)
#define SELF_CONST(x) NOTIFYING_STRING_CONST(x)
#define IS_SELF(x) NOTIFYING_IS_STRING(x)
#define TYPE_SELF NOTIFYING_TYPE_STRING
#define SELF_CLASS(x) NOTIFYING_STRING_CLASS(x)

#define SELF_GET_CLASS(x) NOTIFYING_STRING_GET_CLASS(x)

/* self typedefs */
typedef NotifyingString Self;
typedef NotifyingStringClass SelfClass;

/* here are local prototypes */
static void notifying_string_init (NotifyingString * o) G_GNUC_UNUSED;
static void notifying_string_class_init (NotifyingStringClass * c) G_GNUC_UNUSED;

/*
 * Signal connection wrapper macro shortcuts
 */
#define self_connect__changed(object,func,data)	notifying_string_connect__changed((object),(func),(data))
#define self_connect_after__changed(object,func,data)	notifying_string_connect_after__changed((object),(func),(data))
#define self_connect_data__changed(object,func,data,destroy_data,flags)	notifying_string_connect_data__changed((object),(func),(data),(destroy_data),(flags))

enum {
	CHANGED_SIGNAL,
	LAST_SIGNAL
};

static guint object_signals[LAST_SIGNAL] = {0};

/* pointer to the class of our parent */
static GObjectClass *parent_class = NULL;

/* Short form macros */
#define self_changed notifying_string_changed
#define self_new notifying_string_new
#define self_set notifying_string_set
#define self_get notifying_string_get
GType
notifying_string_get_type (void)
{
	static GType type = 0;

	if ___GOB_UNLIKELY(type == 0) {
		static const GTypeInfo info = {
			sizeof (NotifyingStringClass),
			(GBaseInitFunc) NULL,
			(GBaseFinalizeFunc) NULL,
			(GClassInitFunc) notifying_string_class_init,
			(GClassFinalizeFunc) NULL,
			NULL /* class_data */,
			sizeof (NotifyingString),
			0 /* n_preallocs */,
			(GInstanceInitFunc) notifying_string_init,
			NULL
		};

		type = g_type_register_static (G_TYPE_OBJECT, "NotifyingString", &info, (GTypeFlags)0);
	}

	return type;
}

/* a macro for creating a new object of our type */
#define GET_NEW ((NotifyingString *)g_object_new(notifying_string_get_type(), NULL))

/* a function for creating a new object of our type */
#include <stdarg.h>
static NotifyingString * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
static NotifyingString *
GET_NEW_VARG (const char *first, ...)
{
	NotifyingString *ret;
	va_list ap;
	va_start (ap, first);
	ret = (NotifyingString *)g_object_new_valist (notifying_string_get_type (), first, ap);
	va_end (ap);
	return ret;
}


static void
___finalize(GObject *obj_self)
{
#define __GOB_FUNCTION__ "Notifying:String::finalize"
	NotifyingString *self G_GNUC_UNUSED = NOTIFYING_STRING (obj_self);
	gpointer priv G_GNUC_UNUSED = self->_priv;
#line 5 "common/notifying-string.gob"
	if(self->_priv->value) { g_free ((gpointer) self->_priv->value); self->_priv->value = NULL; }
#line 115 "notifying-string.c"
	if(G_OBJECT_CLASS(parent_class)->finalize) \
		(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
}
#undef __GOB_FUNCTION__

static void 
notifying_string_init (NotifyingString * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "Notifying:String::init"
	o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,NOTIFYING_TYPE_STRING,NotifyingStringPrivate);
#line 4 "common/notifying-string.gob"
	o->_priv->value =  NULL ;
#line 128 "notifying-string.c"
}
#undef __GOB_FUNCTION__
static void 
notifying_string_class_init (NotifyingStringClass * c G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "Notifying:String::class_init"
	GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;

	g_type_class_add_private(c,sizeof(NotifyingStringPrivate));

	parent_class = g_type_class_ref (G_TYPE_OBJECT);

	object_signals[CHANGED_SIGNAL] =
		g_signal_new ("changed",
			G_TYPE_FROM_CLASS (g_object_class),
			(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
			G_STRUCT_OFFSET (NotifyingStringClass, changed),
			NULL, NULL,
			g_cclosure_marshal_VOID__VOID,
			G_TYPE_NONE, 0);

	c->changed = NULL;
	g_object_class->finalize = ___finalize;
}
#undef __GOB_FUNCTION__



#line 7 "common/notifying-string.gob"
void 
notifying_string_changed (NotifyingString * self)
{
#line 161 "notifying-string.c"
	GValue ___param_values[1];
	GValue ___return_val;

memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));

#line 7 "common/notifying-string.gob"
	g_return_if_fail (self != NULL);
#line 7 "common/notifying-string.gob"
	g_return_if_fail (NOTIFYING_IS_STRING (self));
#line 172 "notifying-string.c"

	___param_values[0].g_type = 0;
	g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
	g_value_set_instance (&___param_values[0], (gpointer) self);

	g_signal_emitv (___param_values,
		object_signals[CHANGED_SIGNAL],
		0 /* detail */,
		&___return_val);

	g_value_unset (&___param_values[0]);
}

#line 12 "common/notifying-string.gob"
GObject * 
notifying_string_new (void)
{
#line 190 "notifying-string.c"
#define __GOB_FUNCTION__ "Notifying:String::new"
{
#line 12 "common/notifying-string.gob"
	
		return (GObject *) GET_NEW;
	}}
#line 197 "notifying-string.c"
#undef __GOB_FUNCTION__

#line 16 "common/notifying-string.gob"
void 
notifying_string_set (NotifyingString * self, const gchar * value)
{
#line 204 "notifying-string.c"
#define __GOB_FUNCTION__ "Notifying:String::set"
#line 16 "common/notifying-string.gob"
	g_return_if_fail (self != NULL);
#line 16 "common/notifying-string.gob"
	g_return_if_fail (NOTIFYING_IS_STRING (self));
#line 210 "notifying-string.c"
{
#line 16 "common/notifying-string.gob"
	
		self->_priv->value = g_strdup(value);
		self_changed(self);
	}}
#line 217 "notifying-string.c"
#undef __GOB_FUNCTION__

#line 21 "common/notifying-string.gob"
gchar * 
notifying_string_get (NotifyingString * self)
{
#line 224 "notifying-string.c"
#define __GOB_FUNCTION__ "Notifying:String::get"
#line 21 "common/notifying-string.gob"
	g_return_val_if_fail (self != NULL, (gchar * )0);
#line 21 "common/notifying-string.gob"
	g_return_val_if_fail (NOTIFYING_IS_STRING (self), (gchar * )0);
#line 230 "notifying-string.c"
{
#line 21 "common/notifying-string.gob"
	
		return g_strdup(self->_priv->value);
	}}
#line 236 "notifying-string.c"
#undef __GOB_FUNCTION__
