Exposing the BondFunctions class using SWIG.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Exposing the BondFunctions class using SWIG.

Simon Shakeshaft

Hi,

Recently I needed to use the BondFunctions class from C#.  I don’t believe this is exposed from the current SWIG implementation, so please find attached a SWIG interface file which exposes most of the methods.  Please note this has only been tested in a C# environment.

Also attached are some changes to the date.i class to make use of C# operator overloading for ==, !=, >, <, +,  -  and also overrides for Equals(object) and GetHashCode() methods – conditional on SWIGCSHARP as the target.

(ql.i has the minor change to include bondfunctions.i.)

I also have a small C# unit test project [28 tests] covering these changes, which I can upload at some point if of any interest.

Cheers
Simon




------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

bondfunctions.i (14K) Download Attachment
date.i (14K) Download Attachment
ql.i (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Exposing the BondFunctions class using SWIG.

Luigi Ballabio
Hi Simon,
    thanks, I've added your code to the repository.

Luigi

On Fri, Dec 7, 2012 at 2:59 PM, Simon Shakeshaft
<[hidden email]> wrote:

> Hi,
>
> Recently I needed to use the BondFunctions class from C#.  I don’t believe
> this is exposed from the current SWIG implementation, so please find
> attached a SWIG interface file which exposes most of the methods.  Please
> note this has only been tested in a C# environment.
>
> Also attached are some changes to the date.i class to make use of C#
> operator overloading for ==, !=, >, <, +,  -  and also overrides for
> Equals(object) and GetHashCode() methods – conditional on SWIGCSHARP as the
> target.
>
> (ql.i has the minor change to include bondfunctions.i.)
>
> I also have a small C# unit test project [28 tests] covering these changes,
> which I can upload at some point if of any interest.
>
> Cheers
> Simon
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev