QOF
0.8.7
|
Files | |
file | qofgobj.h |
QOF to GLib GObject mapping. | |
Functions | |
void | qof_gobject_init (void) |
void | qof_gobject_shutdown (void) |
void | qof_gobject_register (QofType type, GObjectClass *obclass) |
void | qof_gobject_register_instance (QofBook *book, QofType, GObject *) |
The API defined in this file allows a user to register any GLib GObject (and any object derived from one, e.g. GTK/Gnome) with the QOF system, as a QOF Object Class. This allows the QOF Query routines to be used to search over collections of GObjects.
XXX Only GObject properties are searchable, data and other hanging off the GObject is not. Fix this. This needs fixing.
void qof_gobject_init | ( | void | ) |
void qof_gobject_register | ( | QofType | type, |
GObjectClass * | obclass | ||
) |
Register a GObject class with the QOF subsystem. Doing this will make the properties associated with this GObject searchable using the QOF subsystem.
The QofType can be any string you desire, although typically you might want to set it to G_OBJECT_CLASS_NAME() of the object class. Note that this type will become the name of the "table" that is searched by SQL queries: e.g. in order to be able to say "SELECT * FROM MyStuff;" you must first say: qof_gobject_register ("MyStuff", gobj_class);
Definition at line 222 of file qofgobj.c.
Register an instance of a GObject with the QOF subsystem.
The QofType can be any string you desire, although typically you might want to set it to G_OBJECT_CLASS_NAME() of the object class. Note that this type will become the name of the "table" that is searched by SQL queries: e.g. in order to be able to say "SELECT * FROM MyStuff;" you must first say: qof_gobject_register_instance (book, "MyStuff", obj);
The 'book' argument specifies an anchor point for the collection of all of the registered instances. By working with disjoint books, you can have multiple disjoint searchable sets of objects.
Definition at line 93 of file qofgobj.c.