http://quantlib.414.s1.nabble.com/How-to-correctly-Extend-swig-PiecewiseYieldCurve-i-tp14298p14302.html
class names from the QuantLib namespace. You'll probably have to add
to the existing ones.
> I tried to add thrd parameter Bootstrap type to export_piecewise_curve like
> this
>
> %define export_piecewise_curve(Name,Base,Interpolator,Bootstrap)
>
> and then
> export_piecewise_curve(PiecewiseFlatForward,ForwardRate,BackwardFlat,IterativeBootstrap);
>
> Code produced by swig looks like this
>
> SWIGINTERN PiecewiseFlatForwardPtr *new_PiecewiseFlatForwardPtr__SWIG_0(Date
> const &referenceDate,std::vector< boost::shared_ptr< RateHelper > > const
> &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > >
> const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const
> &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,BackwardFlat const
> &i=BackwardFlat()){
> return new PiecewiseFlatForwardPtr(
> new
> PiecewiseYieldCurve<ForwardRate,BackwardFlat,IterativeBootstrap>(
> referenceDate,instruments,
> dayCounter, jumps,
> jumpDates,
> accuracy,i));
> }
>
> And compiler curses
>
> Error 7 error C3206: 'boost::dynamic_pointer_cast' : invalid template
> argument for 'T', missing template argument list on class template
> 'QuantLib::PiecewiseYieldCurve'
> C:\quantliball\QuantLib-SWIG\CSharp\cpp\quantlib_wrap.cpp 7634 1
> NQuantLibc
>
> Error 15 error C2065: 'IterativeBootstrap' : undeclared identifier
> C:\quantliball\QuantLib-SWIG\CSharp\cpp\quantlib_wrap.cpp 7649 1
> NQuantLibc
>
>
> I understand that IterativeBootstrap itself is a template class and that’s
> probably the reason, but in test suite similar code compiles fine
> testCurveConsistency<ZeroYield,Cubic,IterativeBootstrap> ...
>
>
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
>
http://p.sf.net/sfu/appdyn_d2d_ap1> _______________________________________________
> QuantLib-dev mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-devGet down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.