It would seem to me that the design for using things like muParser would be to
create a function object wrapper, which QuantLib objects could understand and
then subclass them for particular scripting languages. Something like
class AbstractFunctionObject : public AdaptableUnaryFunction {
virtual operator() (Real a) = 0;
}
class MuParserFunctionObject : public AbstractFunctionObject {
}
That way you can have
class PythonFunctionObject : public AbstractFunctionObject {
}
class RFunctionObject : public AbstractFunctionObject {
}
And then use your favorite scripting language to generate something that can
be used for payoff functions. Also, this would put all of the scripting
dependent code into one single class, which would make it easy for the
compilation in include or exclude different interfaces to different scripting
languages.
--
-------------------------------------------------------------------------------
Joseph Wang Ph.D. -
[hidden email]
China Derivatives Researcher and Software Developer - QuantLib
http://en.wikiversity.org/wiki/User:Roadrunner