Posted by
Luigi Ballabio on
Aug 07, 2014; 10:24am
URL: http://quantlib.414.s1.nabble.com/Adding-Swig-Capabilities-for-the-Fixed-Rate-Bond-Forward-Class-tp15671p15702.html
In short (too short, probably, but of course you can follow up if you
get stuck):
- it's an instrument, so instead of just showing SWIG its declaration
you'll have to jump through a couple of hoops to export it as a
shared_ptr but still masquerade it as the instrument class. See, for
instance, how FixedRateBond is exported in SWIG/bonds.i (also mind the
%{ ... %} block at the beginning of the file where a few typedefs are
declared.
- its constructor takes a pointer to FixedRateBond, which is not
available directly (it's masqueraded as above). You'll have to declare
the parameter as a FixedRateBondPtr, and then cast it inside the
exported constructor. See, for instance, how BondHelper does it in
SWIG/ratehelpers.i.
Later,
Luigi
On Mon, Aug 4, 2014 at 12:50 PM, John Orford <
[hidden email]> wrote:
--
<
https://implementingquantlib.blogspot.com>
<
https://twitter.com/lballabio>
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users