[Top][All Lists]

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

[lmi] multi dimensional editor API draft

From: Vadim Zeitlin
Subject: [lmi] multi dimensional editor API draft
Date: Tue, 8 Nov 2005 15:24:09 +0100


 here is the long promised draft of the API for the control to be used for
the product editor. Please see:

- the main header file: http://www.tt-solutions.com/lmi/multidimgrid.h.html
  with syntax highlighting (or, if you want to download it, just the ASCII
  version: http://www.tt-solutions.com/lmi/multidimgrid.h) which declares
  all public files which will be used by lmi

- the docs generated from the above header by doxygen:

- a small test: http://www.tt-solutions.com/lmi/test_multidimgrid.cpp.html
  (or http://www.tt-solutions.com/lmi/test_multidimgrid.cpp without
  highlight) -- just to show that this class wasn't specific to lmi (of
  course, this is what we want to use it for but at this (design) stage
  I'd like to avoid any dependencies on lmi-specific things), I've chosen
  a completely different example to test it: it allows to select the
  quantity of equity market options which are characterized by many
  different parameters. The test doesn't work as the classes are not
  implemented yet but it does compile.

 As you can see, I've finally written both untyped (dangerous but dynamically
configurable) and type-safe (but less flexible as the structure of the data
must be known at compile-time) versions. I think we get the best of both
worlds this way and without too much price to pay as, as usual, the
type-safe version just sits atop of the untyped one, so there is no code
duplication. And, thanks to the great boost preprocessor library, writing
the family of grid classes for "all" values of N (== number of axis) is
pretty simple.

 I've also found a pretty simple solution to the problem of "Duration"
axis: thinking about the example of the test above I've realized that it
was a quite general problem (in practice you'd want to select just a range
of option strikes instead of hardcoding 10..100) and so I've added a
possibility to show a "filtering" or "adjusting" control near the axis
selection one -- this will allow us to implement "Duration".

 I didn't add any functions to the grid class itself yet and I didn't even
expose the grid which is really used for data viewing/entry neither. I do
realize that we'll probably have to do both of these things later but as
it's not really needed so far, I prefer to keep the interface minimalistic:
it's always easier to add functions later than to remove/change existing

 Please let me know what do you think of all this as I'm starting to
implement this and if there are things to change, sooner I know about them,
better it would be.

 Thanks in advance!

reply via email to

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