Posted by
Ferdinando M. Ametrano-2 on
URL: http://quantlib.414.s1.nabble.com/Return-object-in-QLXL-tp8942p8943.html
Hi Peter
On Fri, Jun 11, 2010 at 6:03 PM, Peter Caspers <
[hidden email]> wrote:
> a member function which returns a shared_ptr<KerndelDensity>
> [...]
> I did not find an example in the existing code where an object
> (other than native types) is returned, so can someone explain
> to me, how to do this?
in QLXL if you have to return a shared_ptr<T> it's equivalent to
create a new Object in the repository, i.e. a new pointer to a new or
already existing object
Take a look at trunk\QuantLibAddin\qlo\vanillaswap.hpp for examples.
One can create a VanillaSwap in the classic way, or using helper
factories (MakeVanillaSwap, MakeIMMSwap), or can retrieve a new
pointer to an existing instance (SwapIndex->underlyingSwap(),
SwapRateHelper->swap()(
Let me know if you need more help
ciao -- Nando
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev