Extending the TTInfo/TTSplitInfo data types?

Derek Atkins warlord@MIT.EDU
21 Nov 2001 09:39:21 -0500


Before I respond, I decided to ignore the TT* objects and just do my
own thing....

Josh Sled <jsled@asynchronous.org> writes:

> | Right now the TT
> | interface is fairly rigid.
> 
> In what way?

It's all just a struct, not a kvp.  So I have to add functions 
and extend the data structure in order to hold more information.

> | 	type / typeID
> 
> What's a 'type'?  How does this intersect with dave_p's recent
> [unannounced? -- I haven't cvs-updated in a couple of weeks] typed-GUID
> work?

The type of entry.  In retrospect this is probably the "action",
which of course already exists :)

> | 	qty / price / tax
> 
> It seems like 'tax' is a split, a the qty/price stuff mimcs
> stocks/commodities ... hopefully you can extend the TTinfo stuff to
> take advantage of that ... which would be nice because the SX template
> transactions should also include the ability to create template
> Stock-account transactions at some point.

Each "split" is a line-item, and the tax is part of the line-item.
When the Order is Invoiced and Posted to an Account, the total Tax
amount will be split to the proper account(s).

> See my reply to your design doc for more thoughts about this.
> 
> | 	discount
> | 	invoiced?
> | 	invoice-ptr
> 
> I get a bit worried when I see this ... I guess these are things that
> related to new first-class [business] engine objects, but I worry about
> what the interface will look like down the road:

This is what I meant by "rigid" above.  In C++ or Java I could just
inherit and extend, but that's not possible in C.  It's also another
reason why I decided to ignore the TT* structs.

> I'm just worried it becomes fragmented-interface hell to support ea. kind
> of object in the system.

Yea.  Besides, the more I learned about it, the more I decided I
didn't need it :)

> ...jsled

-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