Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

GLib GObjects
[Object: Dynamic Object Class Framework]


Detailed Description

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.


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 *)


Function Documentation

void qof_gobject_init void   ) 
 

Initalize and shut down this subsystem.

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);

void qof_gobject_register_instance QofBook book,
QofType  ,
GObject * 
 

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.


Generated on Sun May 23 15:41:48 2004 for QOF by doxygen 1.3.6-20040222