Re: More SWIG Interface Files

Posted by Toyin Akin on
URL: http://quantlib.414.s1.nabble.com/More-SWIG-Interface-Files-tp1016p1019.html


Hi Robert,

I had the same problems as you when I started looking at the C# wrapper.

Basically, the C# wrappers are just a thin wrapper over the C++ classes.

You'll see many cases where the C# constructor takes input arguments, the
constructor passes the arguments to the swig c++ layer but the actual C#
class does not contain any fields, properties and in some cases methods. In
the cases where there are methods, you'll find that not all the methods are
mapped to the c++ layer.

As you start to do significant work with the C# wrappers, you'll find that
you'll nees that class, or that method exposed.

This causes problems when you want to do manipulation with reflection  or
serialisation.
Serilisation will not work because the C# wrappers do not own the data.
Reflection will just show a class with constructors.

This is also true for the java wrappers.

I believe that the current wrappers are maintaned so thay are compilable
with the latest releases of QuantLib, but no new significant functionality
has been added to the swig interfaces for quite some time.

QuantLib, however is moving at quite a fast pace.

Having said all this, creating wrappers that model the c++ classes one to
one is a lot of hard work.
You have to ensure that the wrappers work for the python, ruby, java and all
the other languages.
That"s why the current logic within the wrappers are not straight forward,
but I must confess I am not a swig expert.

Luigi did a great job on the current wrappers, but I believe that a lot of
his time is now spent maintaining the underlying library (as well as his
regular day job!!)

In my opinion, QuantLib probably needs someone to keep track of what's going
on within the library and then (probably when the library enters the
beta-release-phase) reflect the changes within these swig wrappers.

A lot of work!!

My two cents...

Toyin Akin,
www.QuantTools.com

>From: "Metzner Robert" <[hidden email]>
>To: "Luigi Ballabio" <[hidden email]>
>CC: [hidden email]
>Subject: Re: [Quantlib-users] More SWIG Interface Files
>Date: Fri, 15 Jun 2007 11:40:15 +0200
>
>
>Dear Luigi,
>i am a little under pressure with the projects i have to
>process and under this aspect i have to talk with my
>purchasers.
>If they accept i will try to create the missing interfaces.
>Unfortunately i am a newbie in swig, so it will become
>hard for me and i would be glad if i could get some help.
>
>Another open Question in this context is if the interfaces
>are complete per C++ Object.
>i could instanciate a BlackScholesProcess Object, but could
>not call a method in it, because there are no methods in the
>object, but in the superobject.
>Can You or anyone give me some information about this ?
>
>Regards Robert
>
>-----Ursprüngliche Nachricht-----
>Von: Luigi Ballabio [mailto:[hidden email]]
>Gesendet: Freitag, 15. Juni 2007 11:31
>An: Metzner Robert
>Cc: [hidden email]
>Betreff: Re: [Quantlib-users] More SWIG Interface Files
>
>On Thu, 2007-06-14 at 14:40 +0200, Metzner Robert wrote:
> > the last days i spent with wrapping Quantlib with a java Project in
> > Eclipse.
> > Now i saw that there are arount 60 - 70 SWIG Interface Files, but the
> > Quantlib has arount 500 Source files.
> > I specially miss the inteface to the BlackScholesCalculator class.
> >
> > Did anyone create this or these interfaces ?
> > Can anyone give me the interface i miss ?
>
>Robert,
>unfortunately, the SWIG bindings use to lag behind the library---
>functionality is added when one of the developers need it.
>Do you think you can have a try at writing the interfaces yourself?
>
>Later,
>Luigi
>
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>QuantLib-users mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/quantlib-users
_________________________________________________________________
Win tickets to the sold out Live Earth concert!  http://liveearth.uk.msn.com



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users