| xmlroff Reference Manual |
|---|
FoObject — FoObject is wonderful
struct FoObject; struct FoObjectClass; FoObject* fo_object_new (void); void fo_object_debug_dump (gpointer object, gint depth); gchar* fo_object_debug_sprintf (gpointer object); gchar* fo_object_sprintf (gpointer object); void fo_object_log_error (FoObject *object, GError **error); void fo_object_log_warning (FoObject *object, GError **warning); void fo_object_log_debug (FoObject *object, GError **debug); gboolean fo_object_log_or_propagate_error (FoObject *fo_object, GError **dest, GError *src); gboolean fo_object_maybe_propagate_error (FoObject *fo_object, GError **dest, GError *src, gboolean continue_after_error); guint fo_object_hash (FoObject *object, GError **error); gboolean fo_object_equal (FoObject *a, FoObject *b, GError **error);
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);
};
FoObject* fo_object_new (void);
Creates a new FoObject initialized to default value.
| Returns : | the new FoObject. |
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.
| object : | The FoObject object. |
| depth : | Indent level to add to the output. |
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.
| object : | The FoObject object. |
| Returns : | Result of debug_sprintf method of class of object. |
gchar* fo_object_sprintf (gpointer object);
Calls sprintf method of class of object, if object is an FoObject or descendant type of FoObject.
| object : | The FoObject object. |
| Returns : | Result of sprintf method of class of object. |
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. |
| 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 error. |
| 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.
| object : | FoObject that is subject of error. |
| debug : | GError with debugging information. |
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 src. |
| dest : | GError to which to propagate src, or NULL. |
| src : | GError with information about error that occurred. |
| Returns : | TRUE if error propagated, otherwise FALSE. |
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 src. |
| dest : | GError to which to propagate src, or NULL. |
| src : | GError with information about error that occurred. |
| continue_after_error : | Whether or not to continue after an error. |
| Returns : | TRUE if error propagated, otherwise FALSE. |
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. |
| Returns : | Hash code for the object. |
gboolean fo_object_equal (FoObject *a, FoObject *b, GError **error);
Compare a to b using the 'equal_func' of the class of a.
| a : | First object to compare. |
| b : | Second object to compare. |
| error : | GError with information about error that occurred. |
| Returns : | TRUE if the objects are equal. |
| << FoObject is wonderful | FoNode is wonderful >> |