[QuantLibAddin-cvs] QuantLibAddin/qlo index.cpp, 1.18, 1.19 index.hpp, 1.15, 1.16
Brought to you by:
ericehlers,
nando
|
From: Katiuscia M. <kma...@us...> - 2007-01-02 20:30:37
|
Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12223/qlo Modified Files: index.cpp index.hpp Log Message: added commented line to make an ObjectClass rather than libraryClass. This is needed to add checks on the length of the dates and values vectors. Index: index.cpp =================================================================== RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/index.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** index.cpp 11 Dec 2006 09:40:04 -0000 1.18 --- index.cpp 2 Jan 2007 20:30:31 -0000 1.19 *************** *** 28,31 **** --- 28,40 ---- namespace QuantLibAddin { + void Index::addFixings(const std::vector<QuantLib::Date>& dates, + const std::vector<QuantLib::Real>& values) { + QL_REQUIRE(dates.size()==values.size(), + "size mismatch between dates (" << dates.size() << + ") and values (" << values.size() << ")"); + libraryObject_->addFixings(dates.begin(), dates.end(), + values.begin()); + } + IborIndex::IborIndex(const std::string& indexName, const QuantLib::Period& p, Index: index.hpp =================================================================== RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/index.hpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** index.hpp 11 Dec 2006 09:40:04 -0000 1.15 --- index.hpp 2 Jan 2007 20:30:31 -0000 1.16 *************** *** 29,33 **** namespace QuantLibAddin { ! class Index : public ObjHandler::LibraryObject<QuantLib::Index> {}; class InterestRateIndex : public Index {}; --- 29,37 ---- namespace QuantLibAddin { ! class Index : public ObjHandler::LibraryObject<QuantLib::Index> { ! public: ! void addFixings(const std::vector<QuantLib::Date>& dates, ! const std::vector<QuantLib::Real>& values); ! }; class InterestRateIndex : public Index {}; |