Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10920/qlo
Added Files:
conversions.cpp conversions.hpp
Removed Files:
clientutils.cpp clientutils.hpp
Log Message:
replace "return_func='xxx'" with conversion of QL datatypes for return values
--- NEW FILE: conversions.cpp ---
/*
Copyright (C) 2005 Plamen Neykov
Copyright (C) 2004, 2005, 2006 Eric Ehlers
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it under the
terms of the QuantLib license. You should have received a copy of the
license along with this program; if not, please email qua...@li...
The license is also available online at http://quantlib.org/html/license.html
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
#if defined(HAVE_CONFIG_H) // Dynamically created by configure
#include <qlo/config.hpp>
#endif
#include <qlo/conversions.hpp>
namespace QuantLibAddin {
double libraryToScalar(const QuantLib::InterestRate &i) {
return i.rate();
}
long libraryToScalar(const QuantLib::Date &d) {
return d.serialNumber();
}
std::vector < long > libraryToVector(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;
}
}
--- NEW FILE: conversions.hpp ---
/*
Copyright (C) 2005 Plamen Neykov
Copyright (C) 2004, 2005, 2006 Eric Ehlers
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it under the
terms of the QuantLib license. You should have received a copy of the
license along with this program; if not, please email qua...@li...
The license is also available online at http://quantlib.org/html/license.html
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
/*! \file
\brief Miscellaneous utility functions available to clients
of %QuantLibAddin i.e. the Addins
*/
#ifndef qla_conversions_hpp
#define qla_conversions_hpp
#include <ql/date.hpp>
#include <ql/interestrate.hpp>
#include <vector>
namespace QuantLibAddin {
/*! \group conversions
Conversion of library types to C++ types.
Called by autogenerated addin code.
*/
double libraryToScalar(const QuantLib::InterestRate&);
long libraryToScalar(const QuantLib::Date&);
std::vector < long > libraryToVector(const std::vector<QuantLib::Date>&);
}
#endif
--- clientutils.hpp DELETED ---
--- clientutils.cpp DELETED ---
|