first draft of a merge rule set
Neil Williams
linux at codehelp.co.uk
Wed Apr 14 16:57:54 EDT 2004
On Wednesday 14 Apr 2004 3:01, Derek Atkins wrote:
> Hi,
>
> I'll try to keep my comments high level as best as possible..
Thanks.
> g_merge sounds like a glib function. This should either be 'qof_merge'
> or 'gnc_merge', depending on where it lives and how general it is.
Excellent, thanks. Just the tip I needed.
> > #define GMGINT64 14
>
> UGG! Why are you doing this? The objects are all pluggable _for a
First draft - I'm still getting use to GnuCash and glib.
> bunch of #defines. If you have a #define it makes it VERY hard for a
> plug-in module to insert a new data type.
OK. I can change that.
> Again, I'm not sure you really need to do this. Can't you just add to
> the object definitions?
Fine - I wasn't sure whether to use that route.
> > #define GMGNC_COMMODITY_FIELDS(x) { \
> > create_rule(x, "fullname", GMSTRING); \
> > create_rule(x, "namespace", GMSTRING); \
> > create_rule(x, "mnemonic", GMSTRING); \
> > create_rule(x, "printname", GMSTRING); \
> > create_rule(x, "exchange_code", GMSTRING); \
> > create_rule(x, "fraction", GMINT); \
> > create_rule(x, "unique_name", GMSTRING); \
> > create_rule(x, "mark", GMGINT16); \
> > create_rule(x, "quote_flag", GMGBOOLEAN); \
> > create_rule(x, "quote_source", GMGNC_QUOTE_SOURCE); }
> >
> > So far, a routine is working to assemble these rule sets into a workable
> > structure.
>
> This is looking AWFULLY similar to the qof-object definitions.
Gotta spend more time with qof.
> Frankly, the _LAST_ thing we need is _yet another_ place where an
> object needs to be defined. Can we try to centralize this as much
> as possible?
Of course.
> We already need to re-define objects multiple times (C struct,
> QofObject, XML Schema, and SQL Schema).. I know Linas is trying to
> keep this down to two (C struct and QofObject) and then derive the
> XML/SQL Schema from the QofObject.. I'd personally rather continue
> along that path and extend QofObject to meet your needs:
> QofMergeResult qof_object_merge_compare(QofInstance*, QofInstance*);
>
> > Next stage is to get the data into the same structures as the rules,
> > then the comparison functions can start.
>
> I hope the comparison functions are based in the core objects???
They will be, now.
Sorry to take the wrong route.
--
Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/
http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20040414/2a0ef919/attachment.bin
More information about the gnucash-devel
mailing list