|
From: Andrea <mar...@go...> - 2009-10-21 17:00:24
|
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.
|