GncBusiness v. GNCSession

Derek Atkins warlord@MIT.EDU
23 Nov 2001 17:27:29 -0500


linas@linas.org (Linas Vepstas) writes:

> > > > I don't really care where the entity tables go, but if they're
> > > > moving to books, then I'd like some help rewriting everything.
> > > > That means fixing all of the API and all of the C & scheme code
> > > > that now passes session arguments instead of books.
> > > 
> > > Ughh. But there are no other conceptual difficulties to making this
> > > change, right?  
> > 
> > I don't see any, no.
> 
> If I magically discover I have some spare time (not likely, but..)
> I will try to make this change 'real soon now'.

Are you implying that you will require an active GNCBook* in order
to create any data structures?  Does this mean that you can have
an active GNCBook* even though it is not connected to a Backend*?

For the record, gnc_session_new() calls gnc_book_new() which implies
that yes, there is always a GNCBook* sitting around, even though it is
not connected to a Backend*.  I just wanted to make sure that we were
going to make this explicit.

I have no problem with the GNCEntityTable living in the GNCBook
instead of the GNCSession.  In fact, I think I'd like to extend the
GNCEntityTable to be able to handle arbitrary objects instead of the
hardcoded list of types.

In particular, this means that we would need to change the GNCIdType
enum and all the GNCEntity interfaces, or somehow be able to register
new GNCIdTypes.  Personally I'd like to be able to use arbitrary
strings, or better yet, have a separate GHashTable for each entity.
Is there a preference?

-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