[QuantLibAddin-cvs] QuantLibAddin/qlo xibor.cpp,1.2,1.3 xibor.hpp,1.2,1.3
Brought to you by:
ericehlers,
nando
|
From: Ferdinando A. <na...@us...> - 2006-05-31 18:40:21
|
Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30379/qlo Modified Files: xibor.cpp xibor.hpp Log Message: removing useless code (which is now autogenerated) Index: xibor.hpp =================================================================== RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/xibor.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xibor.hpp 24 May 2006 14:59:44 -0000 1.2 --- xibor.hpp 31 May 2006 18:40:05 -0000 1.3 *************** *** 42,47 **** const QuantLib::Xibor& getObject() const {return *index_;} - double fixing(const QuantLib::Date &fixingDate) const; - virtual boost::shared_ptr<void> getReference() const { return boost::static_pointer_cast<void>(index_); --- 42,45 ---- Index: xibor.cpp =================================================================== RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/xibor.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xibor.cpp 24 May 2006 14:59:44 -0000 1.2 --- xibor.cpp 31 May 2006 18:40:05 -0000 1.3 *************** *** 42,64 **** const std::vector<double> &fixings) { ! QuantLib::Handle<QuantLib::YieldTermStructure> forecastingTermStructure(fwdYC); ! index_ = boost::shared_ptr<QuantLib::Xibor>(new QuantLib::Xibor(indexName, ! tenor, timeUnits, ! fixingDays, crr, calendar, ! fltBDC, fltDayCounter, forecastingTermStructure)); ! QL_REQUIRE(fixings.size() == lDates.size(), "Xibor::Xibor the nuber of given dates does not match the number of fixings!"); if(lDates.size() > 0 && !(lDates.size() == 1 && lDates[0] == 0)) { std::vector<QuantLib::Date> dates(lDates.size()); ! std::transform(lDates.begin(), lDates.end(), dates.begin(), make_date); QuantLib::History history(dates, fixings); ! QuantLib::IndexManager::instance().setHistory(index_->name(), history); } } - - double Xibor::fixing(const QuantLib::Date &fixingDate) const{ - return index_->fixing(fixingDate); - } - } - --- 42,65 ---- const std::vector<double> &fixings) { ! QuantLib::Handle<QuantLib::YieldTermStructure> ! forecastingTermStructure(fwdYC); ! index_ = boost::shared_ptr<QuantLib::Xibor>( ! new QuantLib::Xibor(indexName, ! tenor, timeUnits, ! fixingDays, crr, calendar, ! fltBDC, fltDayCounter, ! forecastingTermStructure)); ! QL_REQUIRE(fixings.size() == lDates.size(), ! "Xibor::Xibor the nuber of given dates does not match the number" ! " of fixings!"); if(lDates.size() > 0 && !(lDates.size() == 1 && lDates[0] == 0)) { std::vector<QuantLib::Date> dates(lDates.size()); ! std::transform(lDates.begin(), lDates.end(), dates.begin(), ! make_date); QuantLib::History history(dates, fixings); ! QuantLib::IndexManager::instance().setHistory(index_->name(), ! history); } } } |