_QofObject Struct Reference
[Object: Describing data structure.]

#include <qofobject.h>

Detailed Description

This is the QofObject Class descriptor

Definition at line 70 of file qofobject.h.

Data Fields

gint interface_version
QofIdType e_type
const gchar * type_label
gpointer(* create )(QofBook *)
void(* book_begin )(QofBook *)
void(* book_end )(QofBook *)
gboolean(* is_dirty )(QofCollection *)
void(* mark_clean )(QofCollection *)
void(* foreach )(QofCollection *, QofEntityForeachCB, gpointer)
const gchar *(* printable )(gpointer instance)
gint(* version_cmp )(gpointer instance_left, gpointer instance_right)

Field Documentation

gpointer(* _QofObject::create)(QofBook *)

Create a new instance of this object type. This routine might be NULL if the object type doesn't provide a way of creating new instances.

void(* _QofObject::book_begin)(QofBook *)

book_begin is called from within the Book routines to create module-specific hooks in a book whenever a book is created.

void(* _QofObject::book_end)(QofBook *)

book_end is called when the book is being closed, to clean up (and free memory).

gboolean(* _QofObject::is_dirty)(QofCollection *)

Determine if there are any dirty items in this book

void(* _QofObject::mark_clean)(QofCollection *)

Mark this object's book clean (for after a load)

void(* _QofObject::foreach)(QofCollection *, QofEntityForeachCB, gpointer)

Traverse over all of the items in the collection, calling the callback on each item. The third argument can be any arbitrary caller-supplied data, and is passed to the callback. Although (*foreach) may be NULL, allmost all objects should provide this routine, as without it, little of interest can be done.

const gchar*(* _QofObject::printable)(gpointer instance)

Given a particular item of this type, return a printable string.

gint(* _QofObject::version_cmp)(gpointer instance_left, gpointer instance_right)

Given a pair of items of this type, this routine returns value indicating which item is 'newer'. This routine is used by storage backends to determine if the local or the remote copy of a particular item is the latest, 'uptodate' version. Tis routine should return an integer less than, equal to, or greater than zero if 'instance_left' is found to be, respecitvely, earlier than, equal to or later than than 'instance_right'.

The documentation for this struct was generated from the following file:
Generated on Thu Jan 31 22:50:27 2008 for QOF by  doxygen 1.5.4