Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9015/qlo
Modified Files:
clientutils.cpp clientutils.hpp
Log Message:
improved support for conversion of datatypes
Index: clientutils.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/clientutils.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** clientutils.hpp 19 May 2006 16:56:16 -0000 1.1
--- clientutils.hpp 23 May 2006 10:31:10 -0000 1.2
***************
*** 34,43 ****
*/
/*! convert a long to a QuantLib date
*/
! QuantLib::Date createQLDate(const long &date);
! std::vector < QuantLib::Date > createQLDate(const std::vector < long > &dates);
! std::vector < long > dateToLongVec(const std::vector < QuantLib::Date > &v);
}
--- 34,46 ----
*/
+ // Eric - 23-5-2005 - these functions have been superceded by enhanced
+ // data conversions in gensrc - this file will be removed
+
/*! convert a long to a QuantLib date
*/
! //QuantLib::Date createQLDate(const long &date);
! //std::vector < QuantLib::Date > createQLDate(const std::vector < long > &dates);
! //std::vector < long > dateToLongVec(const std::vector < QuantLib::Date > &v);
}
Index: clientutils.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/clientutils.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** clientutils.cpp 19 May 2006 16:56:16 -0000 1.1
--- clientutils.cpp 23 May 2006 10:31:10 -0000 1.2
***************
*** 24,49 ****
namespace QuantLibAddin {
! QuantLib::Date createQLDate(const long &date) {
! if (date)
! return QuantLib::Date(date);
! else
! return QuantLib::Date();
! }
! std::vector < QuantLib::Date > createQLDate(const std::vector < long > &dates) {
! std::vector < QuantLib::Date > ret;
! for (std::vector < long >::const_iterator i = dates.begin();
! i != dates.end(); i++)
! ret.push_back(QuantLib::Date(*i));
! return ret;
! }
! std::vector < long > dateToLongVec(const std::vector < QuantLib::Date > &v) {
! std::vector < long > ret;
! for (std::vector < QuantLib::Date >::const_iterator i = v.begin();
! i != v.end(); i++)
! ret.push_back(i->serialNumber());
! return ret;
! }
}
--- 24,49 ----
namespace QuantLibAddin {
! //QuantLib::Date createQLDate(const long &date) {
! // if (date)
! // return QuantLib::Date(date);
! // else
! // return QuantLib::Date();
! //}
! //std::vector < QuantLib::Date > createQLDate(const std::vector < long > &dates) {
! // std::vector < QuantLib::Date > ret;
! // for (std::vector < long >::const_iterator i = dates.begin();
! // i != dates.end(); i++)
! // ret.push_back(QuantLib::Date(*i));
! // return ret;
! //}
! //std::vector < long > dateToLongVec(const std::vector < QuantLib::Date > &v) {
! // std::vector < long > ret;
! // for (std::vector < QuantLib::Date >::const_iterator i = v.begin();
! // i != v.end(); i++)
! // ret.push_back(i->serialNumber());
! // return ret;
! //}
}
|