Re: Expose a QuantLib class method to QuantLibAddin

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Expose-a-QuantLib-class-method-to-QuantLibAddin-tp319p323.html


On Thu, 2011-06-30 at 11:54 +0200, g m wrote:
> I'm Actually trying to expose the LocalVolSurface class, I need to use
> its localVolImpl(Time, Real) method.
> my understanding is that I have to write Constructor and Method
> descriptions in a xml file (I chose volatilities.xml file),
> compile the qlgensrc project, then, write a representation of
> QuantLib::LocalVolSurface class in the QuantLibObjects project
> (in volatilities.hpp and volatilities.cpp) to have something like
> QuantLibAddin::LocalVolSurface. Is that right?

Correct.  Also look at termstructures.hpp, which defines the base
classes.

> The other issue is that the LocalVolSurface::localVolImpl is a
> protected method and I've got compilation errors because of that.
> How can I expose such method to Excel?

Export the public LocalVolSurface::localVol(Time, Real, bool) instead.

Luigi


--

Vin: It's like this fellow I knew in El Paso. One day, he just took
all his clothes off and jumped in a mess of cactus. I asked him that
same question, "Why?"
Calvera: And?
Vin: He said, "It seemed like a good idea at the time."
-- The Magnificent Seven



------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users