Posted by
andrea-110 on
URL: http://quantlib.414.s1.nabble.com/QuantLib-SWING-is-it-possible-to-use-polymorphism-tp13142p13144.html
On 21/10/09 15:55, Luigi Ballabio wrote:
> On Mon, 2009-10-19 at 10:53 +0100, Andrea wrote:
>> I've tried to use polymorphism in QuantLib-SWING Java version
>>
>> Something like
>>
>> class MyPayoff extends Payoff {}
>
> Andrea,
> unfortunately, polymorphism doesn't currently work across languages.
> Sorry.
>
> Luigi
Indeed.
I've tried to use directors and it seems to work well if there are no shared_ptr involved.
My problem now is
given
class A; (with some virtual functions)
class B
{
virtual boost::shared_ptr<A> a() = 0;
};
I don't seem to be able to create a shared_ptr in the target language.
Everything would be very easy if instead of the shared_ptr the code had a raw pointer.
I guess I need some SWIG expert here.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev