r15690 - gnucash/branches/gobject-engine-dev - LibQof now use GType to manages objects, sustituting the actual strig type based; this means less memory and faster object type test and memory usage.

Daniel Espinosa esodan at cvs.gnucash.org
Thu Mar 8 08:23:30 EST 2007


Author: esodan
Date: 2007-03-08 08:23:14 -0500 (Thu, 08 Mar 2007)
New Revision: 15690
Trac: http://svn.gnucash.org/trac/changeset/15690

Modified:
   gnucash/branches/gobject-engine-dev/ChangeLog
   gnucash/branches/gobject-engine-dev/lib/libqof/backend/file/qsf-backend.c
   gnucash/branches/gobject-engine-dev/lib/libqof/backend/file/qsf-xml-map.c
   gnucash/branches/gobject-engine-dev/lib/libqof/backend/file/qsf-xml.c
   gnucash/branches/gobject-engine-dev/lib/libqof/backend/file/qsf-xml.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/Makefile.am
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/gnc-date.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/gnc-numeric.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/gnc-numeric.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/guid.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/guid.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/kvp_frame.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/kvp_frame.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qof.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofbackend-p.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofbackend.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofbackend.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofbook.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofbook.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofbookmerge.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofbookmerge.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofchoice.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofchoice.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofclass.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofclass.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofevent-p.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofevent.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofid.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofid.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofinstance.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofinstance.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofobject.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofobject.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofquery.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofquery.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofquerycore-p.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofquerycore.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofreference.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofreference.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofsession-p.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofsession.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofsession.h
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofutil.c
   gnucash/branches/gobject-engine-dev/lib/libqof/qof/qofutil.h
   gnucash/branches/gobject-engine-dev/src/app-utils/gnc-component-manager.c
   gnucash/branches/gobject-engine-dev/src/engine/Account.c
   gnucash/branches/gobject-engine-dev/src/engine/Account.h
   gnucash/branches/gobject-engine-dev/src/engine/FreqSpec.c
   gnucash/branches/gobject-engine-dev/src/engine/FreqSpec.h
   gnucash/branches/gobject-engine-dev/src/engine/FreqSpecP.h
   gnucash/branches/gobject-engine-dev/src/engine/Group.c
   gnucash/branches/gobject-engine-dev/src/engine/Group.h
   gnucash/branches/gobject-engine-dev/src/engine/GroupP.h
   gnucash/branches/gobject-engine-dev/src/engine/SX-book.c
   gnucash/branches/gobject-engine-dev/src/engine/SX-book.h
   gnucash/branches/gobject-engine-dev/src/engine/Split.h
   gnucash/branches/gobject-engine-dev/src/engine/SplitP.h
   gnucash/branches/gobject-engine-dev/src/engine/Transaction.c
   gnucash/branches/gobject-engine-dev/src/engine/Transaction.h
   gnucash/branches/gobject-engine-dev/src/engine/gnc-commodity.h
   gnucash/branches/gobject-engine-dev/src/engine/gnc-engine.h
   gnucash/branches/gobject-engine-dev/src/engine/gnc-lot.h
   gnucash/branches/gobject-engine-dev/src/engine/gnc-pricedb.c
   gnucash/branches/gobject-engine-dev/src/engine/gnc-pricedb.h
   gnucash/branches/gobject-engine-dev/src/gnome-utils/gnc-main-window.c
Log:
LibQof now use GType to manages objects, sustituting the actual strig type based; this means less memory and faster object type test and memory usage.

QofBackend now use GError to store backend erros, you need to call commit and begin edit with a parameter GError** to get any error in these calls, or use 
the QofBackend's API to set and delete this errors.

QofEntity and QofInstance have been merged together and now QofInstance (may in the future GncObject) manages the GUID and the book the object belongs to.
The type system use the GObject's GType system to know the object's types.

QofObject and QofClass have been modified in order to fit in the new type system, but the work pretends in the next milestones deprecate them and eventualy delete
from the GC code.

KvpValue and KvpFrame doesn't change to much, just a few to fit in the new type system; but now we can sustitud KvpValue with GValue with out afect KvpFrame,
even better, this will save too many code here and there to manage the KvpValue type system (this is diferent from the Qof object type system), and get unifed type
system using just GType. All the objects managed by KvpValue has its own GType, some derived from GObject, some from QofInstance (derived from GObject too), 
and some derived from a GBoxed (any struct type).

The file backend, has been changed in order to fit in the new type system too, but actualy it breaks the load of previews files saved in the old type system,
becouse when you save a file some data is saved with its type's name, but I'll add code to manage this converting the old type names to the new type's name. The
names used in GType is in order to avoid any problem with any previews existing one, just using a prefix Gnc or Qof in each name, this is a practice in GLib and I think we need to follow, i. e. the a type name "book" is "QofBook" and "account" is "GncAccount", this is for all the objects derived from GObject and GBoxed.




More information about the gnucash-patches mailing list