Adding functions to QuantLib SWIG

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

Re: Adding functions to QuantLib SWIG

smazzucca
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
Reply | Threaded
Open this post in threaded view
|

Re: Adding functions to QuantLib SWIG

Luigi Ballabio
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
Reply | Threaded
Open this post in threaded view
|

RE: Adding functions to QuantLib SWIG

smazzucca

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:ml-node+[hidden email]]
Sent: Tuesday, December 24, 2013 6:02 AM
To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Adding functions to QuantLib SWIG

Luigi Ballabio
Here it is. By the way, what version of SWIG are you using?

Luigi


On Tue, Dec 24, 2013 at 4:06 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]
Sent: Tuesday, December 24, 2013 6:02 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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

------------------------------------------------------------------------------
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment


View this message in context: RE: Adding functions to QuantLib SWIG
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

Callability.cs (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Adding functions to QuantLib SWIG

smazzucca

Luigi,

 

There was no attachment.

 

I am using SWIG 2.0.11.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:ml-node+[hidden email]]
Sent: Friday, December 27, 2013 4:38 AM
To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Here it is. By the way, what version of SWIG are you using?

 

Luigi

 

On Tue, Dec 24, 2013 at 4:06 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]
Sent: Tuesday, December 24, 2013 6:02 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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

------------------------------------------------------------------------------
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment

 


View this message in context: RE: Adding functions to QuantLib SWIG

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


Callability.cs (3K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14779.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

Reply | Threaded
Open this post in threaded view
|

Re: Adding functions to QuantLib SWIG

Luigi Ballabio
Strange, I see the attachment in my copy of the mail. Anyway, here it is again.


On Fri, Dec 27, 2013 at 4:27 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

There was no attachment.

 

I am using SWIG 2.0.11.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]
Sent: Friday, December 27, 2013 4:38 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Here it is. By the way, what version of SWIG are you using?

 

Luigi

 

On Tue, Dec 24, 2013 at 4:06 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Tuesday, December 24, 2013 6:02 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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

------------------------------------------------------------------------------
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment

 


View this message in context: RE: Adding functions to QuantLib SWIG

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


------------------------------------------------------------------------------
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


Callability.cs (3K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14779.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.



View this message in context: RE: Adding functions to QuantLib SWIG
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

Callability.cs (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Adding functions to QuantLib SWIG

smazzucca

I see what happened, I get two emails one from you and one from the forum. One had it and one didn’t.

 

Thanks! I’ll let you know what I find.

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:ml-node+[hidden email]]
Sent: Friday, December 27, 2013 10:48 AM
To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Strange, I see the attachment in my copy of the mail. Anyway, here it is again.

 

On Fri, Dec 27, 2013 at 4:27 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

There was no attachment.

 

I am using SWIG 2.0.11.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]
Sent: Friday, December 27, 2013 4:38 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Here it is. By the way, what version of SWIG are you using?

 

Luigi

 

On Tue, Dec 24, 2013 at 4:06 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Tuesday, December 24, 2013 6:02 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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

------------------------------------------------------------------------------
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment

 


View this message in context: RE: Adding functions to QuantLib SWIG

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


------------------------------------------------------------------------------
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


Callability.cs (3K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14779.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


Callability.cs (4K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14782.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

Reply | Threaded
Open this post in threaded view
|

RE: Adding functions to QuantLib SWIG

smazzucca
In reply to this post by Luigi Ballabio

Luigi,

 

Sure enough you have this, that I don’t have:

 

  public Callability(CallabilityPrice price, _Callability.Type type, Date date)

      : this(NQuantLibcPINVOKE.new_Callability(CallabilityPrice.getCPtr(price), (int)type, Date.getCPtr(date)), true)

  {

      if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();

  }

 

Unfortunately it does not compile for me as I don’t have: NQuantLibcPINVOKE.new_Callability. Could I have your NQuantLibcPINVOKE file ?

 

Thank you,

Simon

 

 

 

From: Simon Mazzucca
Sent: Friday, December 27, 2013 10:50 AM
To: 'Luigi Ballabio [via QuantLib]'
Subject: RE: Adding functions to QuantLib SWIG

 

I see what happened, I get two emails one from you and one from the forum. One had it and one didn’t.

 

Thanks! I’ll let you know what I find.

Simon

 

 

From: Luigi Ballabio [via QuantLib] [[hidden email]]
Sent: Friday, December 27, 2013 10:48 AM
To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Strange, I see the attachment in my copy of the mail. Anyway, here it is again.

 

On Fri, Dec 27, 2013 at 4:27 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

There was no attachment.

 

I am using SWIG 2.0.11.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]
Sent: Friday, December 27, 2013 4:38 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Here it is. By the way, what version of SWIG are you using?

 

Luigi

 

On Tue, Dec 24, 2013 at 4:06 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Tuesday, December 24, 2013 6:02 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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

------------------------------------------------------------------------------
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment

 


View this message in context: RE: Adding functions to QuantLib SWIG

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


------------------------------------------------------------------------------
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


Callability.cs (3K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14779.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


Callability.cs (4K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14782.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

Reply | Threaded
Open this post in threaded view
|

Re: Adding functions to QuantLib SWIG

Luigi Ballabio
The problem is that you should be able to generate the same file as me.
How are you invoking SWIG exactly?


On Mon, Dec 30, 2013 at 4:02 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

Sure enough you have this, that I don’t have:

 

  public Callability(CallabilityPrice price, _Callability.Type type, Date date)

      : this(NQuantLibcPINVOKE.new_Callability(CallabilityPrice.getCPtr(price), (int)type, Date.getCPtr(date)), true)

  {

      if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();

  }

 

Unfortunately it does not compile for me as I don’t have: NQuantLibcPINVOKE.new_Callability. Could I have your NQuantLibcPINVOKE file ?

 

Thank you,

Simon

 

 

 

From: Simon Mazzucca
Sent: Friday, December 27, 2013 10:50 AM
To: 'Luigi Ballabio [via QuantLib]'
Subject: RE: Adding functions to QuantLib SWIG

 

I see what happened, I get two emails one from you and one from the forum. One had it and one didn’t.

 

Thanks! I’ll let you know what I find.

Simon

 

 

From: Luigi Ballabio [via QuantLib] [[hidden email]]
Sent: Friday, December 27, 2013 10:48 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Strange, I see the attachment in my copy of the mail. Anyway, here it is again.

 

On Fri, Dec 27, 2013 at 4:27 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

There was no attachment.

 

I am using SWIG 2.0.11.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Friday, December 27, 2013 4:38 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Here it is. By the way, what version of SWIG are you using?

 

Luigi

 

On Tue, Dec 24, 2013 at 4:06 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Tuesday, December 24, 2013 6:02 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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

------------------------------------------------------------------------------
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment

 


View this message in context: RE: Adding functions to QuantLib SWIG

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


------------------------------------------------------------------------------
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


Callability.cs (3K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14779.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


------------------------------------------------------------------------------
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


Callability.cs (4K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14782.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.



View this message in context: RE: Adding functions to QuantLib SWIG
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
Reply | Threaded
Open this post in threaded view
|

RE: Adding functions to QuantLib SWIG

smazzucca

Luigi,

 

The command I execute is:

call "C:\Program Files\swigwin-2.0.11\swig.exe" -csharp -c++ -outdir csharp -namespace QuantLib -o cpp\quantlib_wrap.cpp ..\SWIG\quantlib.i

 

I attached my interface files. I know I changed the bonds one. I don’t think I changed other ones, but that was a few weeks ago, I’m not 100% sure, sorry.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:ml-node+[hidden email]]
Sent: Monday, December 30, 2013 10:34 AM
To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

The problem is that you should be able to generate the same file as me.

How are you invoking SWIG exactly?

 

On Mon, Dec 30, 2013 at 4:02 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

Sure enough you have this, that I don’t have:

 

  public Callability(CallabilityPrice price, _Callability.Type type, Date date)

      : this(NQuantLibcPINVOKE.new_Callability(CallabilityPrice.getCPtr(price), (int)type, Date.getCPtr(date)), true)

  {

      if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();

  }

 

Unfortunately it does not compile for me as I don’t have: NQuantLibcPINVOKE.new_Callability. Could I have your NQuantLibcPINVOKE file ?

 

Thank you,

Simon

 

 

 

From: Simon Mazzucca
Sent: Friday, December 27, 2013 10:50 AM
To: 'Luigi Ballabio [via QuantLib]'
Subject: RE: Adding functions to QuantLib SWIG

 

I see what happened, I get two emails one from you and one from the forum. One had it and one didn’t.

 

Thanks! I’ll let you know what I find.

Simon

 

 

From: Luigi Ballabio [via QuantLib] [[hidden email]]
Sent: Friday, December 27, 2013 10:48 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Strange, I see the attachment in my copy of the mail. Anyway, here it is again.

 

On Fri, Dec 27, 2013 at 4:27 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

There was no attachment.

 

I am using SWIG 2.0.11.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Friday, December 27, 2013 4:38 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Here it is. By the way, what version of SWIG are you using?

 

Luigi

 

On Tue, Dec 24, 2013 at 4:06 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Tuesday, December 24, 2013 6:02 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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

------------------------------------------------------------------------------
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment

 


View this message in context: RE: Adding functions to QuantLib SWIG

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


------------------------------------------------------------------------------
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


Callability.cs (3K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14779.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


------------------------------------------------------------------------------
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


Callability.cs (4K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14782.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14786.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


SWIG interface files.zip (145K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Adding functions to QuantLib SWIG

Luigi Ballabio
Ok, I see. You need a fix for the latest SWIG that still hasn't made its way into a release. Use callability.i from <https://github.com/lballabio/quantlib/blob/master/QuantLib-SWIG/SWIG/callability.i> instead.

Luigi


On Mon, Dec 30, 2013 at 4:39 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

The command I execute is:

call "C:\Program Files\swigwin-2.0.11\swig.exe" -csharp -c++ -outdir csharp -namespace QuantLib -o cpp\quantlib_wrap.cpp ..\SWIG\quantlib.i

 

I attached my interface files. I know I changed the bonds one. I don’t think I changed other ones, but that was a few weeks ago, I’m not 100% sure, sorry.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]
Sent: Monday, December 30, 2013 10:34 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

The problem is that you should be able to generate the same file as me.

How are you invoking SWIG exactly?

 

On Mon, Dec 30, 2013 at 4:02 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

Sure enough you have this, that I don’t have:

 

  public Callability(CallabilityPrice price, _Callability.Type type, Date date)

      : this(NQuantLibcPINVOKE.new_Callability(CallabilityPrice.getCPtr(price), (int)type, Date.getCPtr(date)), true)

  {

      if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();

  }

 

Unfortunately it does not compile for me as I don’t have: NQuantLibcPINVOKE.new_Callability. Could I have your NQuantLibcPINVOKE file ?

 

Thank you,

Simon

 

 

 

From: Simon Mazzucca
Sent: Friday, December 27, 2013 10:50 AM
To: 'Luigi Ballabio [via QuantLib]'
Subject: RE: Adding functions to QuantLib SWIG

 

I see what happened, I get two emails one from you and one from the forum. One had it and one didn’t.

 

Thanks! I’ll let you know what I find.

Simon

 

 

From: Luigi Ballabio [via QuantLib] [[hidden email]]
Sent: Friday, December 27, 2013 10:48 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Strange, I see the attachment in my copy of the mail. Anyway, here it is again.

 

On Fri, Dec 27, 2013 at 4:27 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

There was no attachment.

 

I am using SWIG 2.0.11.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Friday, December 27, 2013 4:38 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Here it is. By the way, what version of SWIG are you using?

 

Luigi

 

On Tue, Dec 24, 2013 at 4:06 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Tuesday, December 24, 2013 6:02 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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

------------------------------------------------------------------------------
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment

 


View this message in context: RE: Adding functions to QuantLib SWIG

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


------------------------------------------------------------------------------
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


Callability.cs (3K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14779.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


------------------------------------------------------------------------------
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


Callability.cs (4K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14782.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14786.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


SWIG interface files.zip (145K) Download Attachment


View this message in context: RE: Adding functions to QuantLib SWIG
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
Reply | Threaded
Open this post in threaded view
|

RE: Adding functions to QuantLib SWIG

smazzucca

Awesome! That worked like a charm.

 

When the analyst comes back, she will help me figure out which params to pass the constructor but it all builds beautifully now.

 

Thanks so much and buon anno! J

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:ml-node+[hidden email]]
Sent: Monday, December 30, 2013 11:03 AM
To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Ok, I see. You need a fix for the latest SWIG that still hasn't made its way into a release. Use callability.i from <https://github.com/lballabio/quantlib/blob/master/QuantLib-SWIG/SWIG/callability.i> instead.

 

Luigi

 

On Mon, Dec 30, 2013 at 4:39 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

The command I execute is:

call "C:\Program Files\swigwin-2.0.11\swig.exe" -csharp -c++ -outdir csharp -namespace QuantLib -o cpp\quantlib_wrap.cpp ..\SWIG\quantlib.i

 

I attached my interface files. I know I changed the bonds one. I don’t think I changed other ones, but that was a few weeks ago, I’m not 100% sure, sorry.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]
Sent: Monday, December 30, 2013 10:34 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

The problem is that you should be able to generate the same file as me.

How are you invoking SWIG exactly?

 

On Mon, Dec 30, 2013 at 4:02 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

Sure enough you have this, that I don’t have:

 

  public Callability(CallabilityPrice price, _Callability.Type type, Date date)

      : this(NQuantLibcPINVOKE.new_Callability(CallabilityPrice.getCPtr(price), (int)type, Date.getCPtr(date)), true)

  {

      if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();

  }

 

Unfortunately it does not compile for me as I don’t have: NQuantLibcPINVOKE.new_Callability. Could I have your NQuantLibcPINVOKE file ?

 

Thank you,

Simon

 

 

 

From: Simon Mazzucca
Sent: Friday, December 27, 2013 10:50 AM
To: 'Luigi Ballabio [via QuantLib]'
Subject: RE: Adding functions to QuantLib SWIG

 

I see what happened, I get two emails one from you and one from the forum. One had it and one didn’t.

 

Thanks! I’ll let you know what I find.

Simon

 

 

From: Luigi Ballabio [via QuantLib] [[hidden email]]
Sent: Friday, December 27, 2013 10:48 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Strange, I see the attachment in my copy of the mail. Anyway, here it is again.

 

On Fri, Dec 27, 2013 at 4:27 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

There was no attachment.

 

I am using SWIG 2.0.11.

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Friday, December 27, 2013 4:38 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Here it is. By the way, what version of SWIG are you using?

 

Luigi

 

On Tue, Dec 24, 2013 at 4:06 PM, smazzucca <[hidden email]> wrote:

Luigi,

 

I definitely don’t have a constructor (see attachment). Can I see your copy of Callability.cs ?

 

Thank you,

Simon

 

 

From: Luigi Ballabio [via QuantLib] [mailto:[hidden email][hidden email]]

Sent: Tuesday, December 24, 2013 6:02 AM


To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

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

------------------------------------------------------------------------------
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14774.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


Callability.cs (3K) Download Attachment

 


View this message in context: RE: Adding functions to QuantLib SWIG

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


------------------------------------------------------------------------------
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


Callability.cs (3K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14779.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


------------------------------------------------------------------------------
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


Callability.cs (4K) Download Attachment

 


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14782.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14786.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.


SWIG interface files.zip (145K) Download Attachment

 


View this message in context: RE: Adding functions to QuantLib SWIG
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


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14788.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

12