lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Product editor API


From: Vadim Zeitlin
Subject: [lmi] Product editor API
Date: Tue, 18 Oct 2005 02:21:53 +0200

 Hello,

 I'm designing the API of the MultiDimGrid class (suggestions for better
names would be gratefully accepted) which is going to be used in the
product editor window and I have a couple of questions:

1. I suppose we're going to have an arbitrary number N of axis (i.e. not
   limited nor fixed) and each axis can take different number of values.
   The only question is whether these values can always be handled as
   strings or is it important to keep type information for them, i.e.
   also handle integer (and maybe real/float?) values? One place where this
   could be useful is the combobox for choosing the value of a dimension
   which is neither X nor Y axis: if we knew that some dimension is
   numeric, we could use a spin control instead of combobox which would be
   more convenient to the user. Another advantage would be the possibility
   to specify the axis values as (min, max[, step]) instead of having to
   enumerate all of them, which is the only way to do it for strings.
   The disadvantage is, of course, that API would be more complex.

   So should we handle integer axis specially or just treat everything as
   text?

2. Along the same lines, what about the values in the grid? Here I suppose
   we do want to have integers and reals and also strings. Is there
   anything else?

3. I want to separate the data access from the GUI control, hence
   MultiDimGrid would be used with a MultiDimTable (if this reminds you of
   wxGrid and wxGridTable it's not a coincidence, of course). The question
   is what should be the interface of this table class: it can be either
   similar to wxGridTable and be completely stateless and hence have a
   single method taking N parameters (values for all dimensions) and
   returning the value of a cell. Or it could have a SetSlice() method
   taking N-2 values for the fixed dimensions and then a GetGrid() method
   returning all values for the 2 remaining axis at once which could be
   more efficient. But looking at the amount of data we have here,
   efficiency is probably not very relevant and so convenience -- of
   implementing this class in lmi -- is more important. So do you think it
   would be more convenient to have a single GetValue(D1 d1, ... DN dn) or
   something else? Notice that the same question also exists for setter
   function(s).


 Thank you,
VZ





reply via email to

[Prev in Thread] Current Thread [Next in Thread]