Re-working GNCId: removing GNCIdType enum
Derek Atkins
warlord@MIT.EDU
24 Nov 2001 20:10:32 -0500
Dave Peticolas <dave@krondo.com> writes:
> > app-utils/gnc-component-manager.c
>
> Here we would need a hash table for the event masks,
> and the code would need to be generalized to all the
> types and not just accounts & transactions (that needs
> to be done anyway).
I don't understand how events work well enough to know where
or how to create this hash table.
> > backend/postgres/events.c
>
> This one is complicated, we would have to make a general
> mechanism for detection events for the other, newer types.
> This would probably need to be part of the backend extension
> mechanism.
I think this is similar to the previous statement.
> > backend/postgres/gncquery.c
>
> Here I'm not sure using other types besided
> accounts, transactions, and splits would
> make sense, unless guid Queries are extended
> to handle new types.
Well, we've been talking about extending Queries ;)
> > engine/Query.c
>
> Same as above. If you want to extend the GUID predicates,
> a dynamic hash of predicates would be needed. Otherwise,
> a static hash for just the types used now would probably
> be fine. Keep in mind that Queries right now are mainly
> for finding Splits & Transactions. If we want to make them
> general, we need a lot more, as you & Linas have been
> discussing.
Indeed.
> > gnome/top-level.c
>
> This code is supposed to bring up an appropriate register
> given the type of the guid. For most of the newer types it
> probably would not make much sense.
Hmm.. Ok... So this couldn't be used to bring up non-register
editing windows?
> Of the above, the component manager, the Query.c, and possibly
> the events code would be performance-impacted by lots of strcmp
> operations.
Which pretty much seems to cover all of it. So, how many hash
tables do we need? Where do they live? What do they contain?
And how/when do they get initialized?
> dave
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available