Re: Re: Customizing QLAddin: mini how-to + question
Posted by
François du Vignaud on
Feb 13, 2006; 2:06am
URL: http://quantlib.414.s1.nabble.com/Customizing-QLAddin-mini-how-to-question-tp4453p4454.html
> 1) I am not sure if it is possible, but it wold be nice to have a
generic
> function in excel like "ohMethodValue(handle, methodName as string,
> parameterArray) as variant". The difference from "ohFieldValue" in
this case is
> that "methodName" is a method of getObject, so that if methodName =
"XYZ", it
> will call : returnValue =
objectPointer->getObject().XYZ(parameterArray). If
> returnValue is an object the handle is returned.
It's a neat idea and yes it's possible. There would have to be some
kind of message map which would associate strings with member
functions (not a straightforward task). The code to initialize this
container might be generated by srcgen based on metadata.
This would greatly increase the complexity of the design and my first
reaction is that the cost exceeds the benefit but I'm open to
discussion.
Hello Eric,
I'm a new user of Quantlib
and I must say that I'm really impressed by the quality of your work, many thanks for easing quant life so much !
I agree with Ago's idea about a generic function wrapping every object creation. I would also like to suggest to make arguments generic by storing them in some sort of map object. User would always have to define two arrays for every object instanciation. One array would contain arguments names and the second one would contain the corresponding values. A generic function would parse and store these arrays in an "argument map" then call the right function. I have good examples of such design to provide you with if you are interested in that idea. Thanks in advance for your attention,
rgds,
François
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.