/* ToNfa complement. */ static GObject *to_nfa_complement (CompilerKitVisitor *self, GObject *obj) { CompilerKitComplement *comp; g_assert(COMPILERKIT_IS_COMPLEMENT(obj)); comp = COMPILERKIT_COMPLEMENT (obj); compilerkit_visitor_visit(self, compilerkit_complement_get_node (comp)); return NULL; }
/** * compilerkit_complement_dispose: * @fn compilerkit_complement_dispose * Reverse what compilerkit_complement_init allocated. * @pre GObject is not NULL. * @param GObject* An object to dispose. * @return void */ static void compilerkit_complement_dispose (GObject* object) { CompilerKitComplement *self = COMPILERKIT_COMPLEMENT (object); CompilerKitComplementPrivate* priv; priv = COMPILERKIT_COMPLEMENT_GET_PRIVATE (self); /** @todo Deallocate memory as necessary */ G_OBJECT_CLASS (compilerkit_complement_parent_class)->dispose (object); }
/** * compilerkit_complement_dispose: * @fn compilerkit_complement_dispose * Reverse what compilerkit_complement_init allocated. * @pre GObject is not NULL. * @param GObject* An object to dispose. * @return void */ static void compilerkit_complement_dispose (GObject* object) { CompilerKitComplement *self = COMPILERKIT_COMPLEMENT (object); CompilerKitComplementPrivate* priv; priv = COMPILERKIT_COMPLEMENT_GET_PRIVATE (self); g_object_unref (priv->node); G_OBJECT_CLASS (compilerkit_complement_parent_class)->dispose (object); }
/* StringBuilder complement. */ static GObject *string_builder_complement (CompilerKitVisitor *self, GObject *obj) { CompilerKitComplement *comp; GString *str = (GString *) compilerkit_visitor_get_state(self); g_assert(COMPILERKIT_IS_COMPLEMENT(obj)); comp = COMPILERKIT_COMPLEMENT (obj); g_string_append_c (str, '!'); compilerkit_visitor_visit(self, compilerkit_complement_get_node (comp)); return NULL; }
/** * compilerkit_complement_new: * @fn compilerkit_complement_new * @memberof CompilerKitComplement * Construct a CompilerKitComplement instance. * @pre None * @param None * @return A new CompilerKitComplement struct. */ CompilerKitComplement* compilerkit_complement_new (void) { return COMPILERKIT_COMPLEMENT (g_object_new (COMPILERKIT_TYPE_COMPLEMENT, NULL)); }
/** * compilerkit_complement_new: * @fn compilerkit_complement_new * @memberof CompilerKitComplement * Construct a CompilerKitComplement instance. * @pre None * @param GObject* Node to complement. * @return A new CompilerKitComplement struct, cast to GObject*. */ GObject *compilerkit_complement_new (GObject *node) { CompilerKitComplement *result = COMPILERKIT_COMPLEMENT(g_object_new (COMPILERKIT_TYPE_COMPLEMENT, NULL)); result->priv->node = node; return result; }