Here follows a list of functions that are used with SBaseObjectInstace and its children.
void s_base_object_set_deinit_method (SBaseObjectInstance * self, void (* method)(SBaseObjectInstance *))
This function is used to set the method to deinitize an object.
set it to a method that deinitize your object.
Here follows an example of how to use the helper functions with your own objets.
void s_base_object_set_to_string_method (SBaseObjectInstance * self, void (* method)(SBaseObjectInstance *))
This fuction is used to set the to_string method.
Here follows an example of how to use the helper functions with your own objets.
Foo * s_error_new () { Foo * self = malloc (sizeof (Foo)); FooClass * klass = malloc (sizeof (FooClass)); s_base_object_set_class ((SBaseObjectInstance *) self, (SBaseObjectClass *) klass); s_base_object_initize ((SBaseObjectInstance *) self); s_base_object_set_deinit_method ((SBaseObjectInstance *) self, method_foo_deinit); s_base_object_set_to_string_method ((SBaseObjectInstance *) self, method_foo_to_string); return self; }