Top | ![]() |
![]() |
![]() |
![]() |
FoObject * | fo_object_new () |
void | fo_object_debug_dump () |
gchar * | fo_object_debug_sprintf () |
gchar * | fo_object_sprintf () |
void | fo_object_log_error () |
void | fo_object_log_warning () |
void | fo_object_log_debug () |
gboolean | fo_object_log_or_propagate_error () |
gboolean | fo_object_maybe_propagate_error () |
guint | fo_object_hash () |
gboolean | fo_object_equal () |
GObject ╰── FoObject ├── FoNode ├── FoDatatype ├── FoContext ├── FoProperty ╰── FoHashTable
Top of the object hierarchy for libfo.
Extends GObject to add some common debugging and logging functions.
FoObject *
fo_object_new (void
);
Creates a new FoObject initialized to default value.
void fo_object_debug_dump (gpointer object
,gint depth
);
Calls debug_dump method of class of object
, if object
is an
FoObject or descendant type of FoObject.
gchar *
fo_object_debug_sprintf (gpointer object
);
Calls debug_sprintf method of class of object
, if object
is an
FoObject or descendant type of FoObject.
gchar *
fo_object_sprintf (gpointer object
);
Calls sprintf method of class of object
, if object
is an
FoObject or descendant type of FoObject.
void fo_object_log_error (FoObject *object
,GError **error
);
Calls the 'log_error' method of the class of object
.
The called method clears error
.
object |
FoObject that is subject of |
|
error |
GError with information about error that occurred. |
void fo_object_log_warning (FoObject *object
,GError **warning
);
Calls the 'log_warning' method of the class of object
.
The called method clears error
.
object |
FoObject that is subject of |
|
warning |
GError with information about warning that occurred. |
void fo_object_log_debug (FoObject *object
,GError **debug
);
Calls the 'log_debug' method of the class of object
.
The called method clears error
.
gboolean fo_object_log_or_propagate_error (FoObject *fo_object
,GError **dest
,GError *src
);
If can propagate src
to dest
, do so, otherwise log src
using
fo_object_log_error()
.
fo_object |
FoObject that is the subject of |
|
dest |
GError to which to propagate |
|
src |
GError with information about error that occurred. |
gboolean fo_object_maybe_propagate_error (FoObject *fo_object
,GError **dest
,GError *src
,gboolean continue_after_error
);
If continue_after_error
is FALSE
and can propagate src
to dest
,
then do so, otherwise log src
using fo_object_log_error()
.
fo_object |
FoObject that is the subject of |
|
dest |
GError to which to propagate |
|
src |
GError with information about error that occurred. |
|
continue_after_error |
Whether or not to continue after an error. |
guint fo_object_hash (FoObject *object
,GError **error
);
Create a hash code for the object.
object |
FoObject for which to get hash value. |
|
error |
GError with information about error that occurred. |
struct FoObjectClass { GObjectClass parent_class; void (* debug_dump) (FoObject *object, gint depth); char* (* debug_sprintf) (FoObject *object); char* (* print_sprintf) (FoObject *object); void (* log_error) (FoObject *object, GError **error); void (* log_warning) (FoObject *object, GError **warning); void (* log_debug) (FoObject *object, GError **debug); gboolean (* log_or_propagate_error) (FoObject *fo_object, GError **dest, GError *src); gboolean (* maybe_propagate_error) (FoObject *fo_object, GError **dest, GError *src, gboolean continue_after_error); guint (* hash_func) (gconstpointer key); gboolean (* equal_func) (gconstpointer a, gconstpointer b); };