Login  Register

Re: Adding functions to QuantLib SWIG

Posted by Luigi Ballabio on Dec 24, 2013; 11:00am
URL: http://quantlib.414.s1.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

The constructor should be defined (it is in my copy of the generated
Callability.cs), and should take three arguments. I'm not sure about
the syntax for accessing static class members, so correct things like
Callability.Call if I'm writing them wrong; but does something like
the following work?

CallabilityPrice price = new CallabilityPrice(100.0,
CallabilityPrice.Type.Clean);
Callability callability = new Callability(price, Callability.Call,
Date(25, Month.December, 2016));

Also, it's strange that you should have to change the types in the
bond constructor. But I guess that's a problem for another time.

Later,
    Luigi


On Thu, Dec 19, 2013 at 8:38 PM, smazzucca <[hidden email]> wrote:

> Luigi,
>
> I got this to work (I was doing something wrong), so that's great because I
> know going forward I can add missing interfaces!
>
> Predictably, I am now stuck at the next step... The CallableFixedRateBond C#
> constructor expects a SWIGTYPE_p_CallabilitySchedule type, but that seemed
> wrong, so I changed it to use a CallabilitySchedule which seems to work.
>
> To create a CallabilitySchedule I need to pass a Callability instance and
> that's where I get stuck.
>
> Although I can declare a Callability variable:
> Callability callability; //Works
>
> I don't have access to the constructor:
> Callability callability = new Callability();    //The type
> 'QuantLib.Callability' has no constructors defined
>
> Am I on the right track ? Can you shed some light, please ?
>
> Thank you,
> Simon
>
>
>
> --
> View this message in context: http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14761.html
> Sent from the quantlib-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users