Posted by
Luigi Ballabio on
Mar 08, 2013; 8:41am
URL: http://quantlib.414.s1.nabble.com/SWIG-FittedBondDiscountCurve-FittingMethod-Conversion-tp14106p14112.html
Oh, I see. My bad. You can't use "using" for getting at an inner
class, it only strips away namespaces. You'll just have to use
using QuantLib::FittedBondDiscountCurve;
and then refer to FittingMethod in full as
FittedBondDiscountCurve::FittingMethod.
Otherwise, you can use a typedef instead of a using declaration, as in:
typedef QuantLib::FittedBondDiscountCurve::FittingMethod FittingMethod;
which will then let you use the short name.
Luigi
On Fri, Mar 8, 2013 at 9:35 AM, Billy Ng <
[hidden email]> wrote:
> %{
> using QuantLib::InterpolatedDiscountCurve;
> using QuantLib::FittedBondDiscountCurve;
> using QuantLib::BondHelper;
> using QuantLib::FittedBondDiscountCurve::FittingMethod;
> %}
>
> The error is .\quantlib_wrapper.cpp(5282) : error C2885: 'QuantLib::FittedBondDiscountCurve::FittingMethod': not a valid using-declaration at non-class scope
>
> I add both the FittedBondDiscountCurve and FittingMethod definitions in discountcurve.i, using
> %define export_fitted_bond_discount_curve(Name,FittingMethod) to generate different fitting mothods
>
> Billy
>
> -----Original Message-----
> From: Luigi Ballabio [mailto:
[hidden email]]
> Sent: Friday, March 08, 2013 4:22 PM
> To: Billy Ng
> Cc: QuantLib QuantLib;
[hidden email]
> Subject: Re: [Quantlib-users] SWIG: FittedBondDiscountCurve::FittingMethod Conversion?
>
>
> Billy,
> using QuantLib::FittedBondDiscountCurve::FittingMethod;
> seems correct. What do you mean by "doesn't work"? What error do you get?
>
> Luigi
>
> On Fri, Mar 8, 2013 at 9:05 AM, Billy Ng <
[hidden email]> wrote:
>> Hi,
>>
>> Any example/clue in translating the Class
>> FittedBondDiscountCurve::FittingMethod to java using SWIG
>> (ql/termstructures/yield/fittedbonddiscountcurve.hpp)?
>> And thus, the subsequent Nonlinear Fitting Methods Derived Classes such as
>> CubicBSplinesFitting (ql/termstructures/yield/nonlinearfittingmethods.hpp)?
>>
>> My issue is that either staement in my i-File does not work
>> using QuantLib::FittedBondDiscountCurve::FittingMethod;
>> using QuantLib::FittingMethod;
>>
>> Billy
>>
>> ------------------------------------------------------------------------------
>> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
>> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
>> endpoint security space. For insight on selecting the right partner to
>> tackle endpoint security challenges, access the full report.
>>
http://p.sf.net/sfu/symantec-dev2dev>> _______________________________________________
>> QuantLib-users mailing list
>>
[hidden email]
>>
https://lists.sourceforge.net/lists/listinfo/quantlib-users>>
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev