|
From: smazzucca <sma...@co...> - 2013-12-31 21:17:58
|
I am trying to add CPIBond to the SWIG interface file but I can tell that
some of my syntax is wrong:
%rename(CPIBond) CPIBondPtr;
class CPIBondPtr : public BondPtr {
%feature("kwargs") CPIBondPtr;
public:
%extend {
CPIBondPtr(
Real faceAmount,
bool growthOnly,
Real baseCPI,
const Period& observationLag,
const boost::shared_ptr<ZeroInflationIndex>& cpiIndex,
CPI::InterpolationType observationInterpolation,
const Schedule& schedule,
const std::vector<Rate>& coupons,
const DayCounter& accrualDayCounter,
BusinessDayConvention paymentConvention = ModifiedFollowing,
const Date& issueDate = Date()) {
return new CPIBondPtr(
new CPIBond(faceAmount, growthOnly, baseCPI,
observationLag, cpiIndex, observationInterpolation,
schedule, coupons, accrualDayCounter,
paymentConvention, issueDate));
}
}
};
Is there a map I can use to convert all the types ? If I had that, I think I
would be more independent in doing these conversions (and I have many more
in my future...).
Thank you,
Simon
--
View this message in context: http://quantlib.10058.n7.nabble.com/CPIBond-in-C-tp14797.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
|