Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3060/qlo
Modified Files:
calendarfactory.cpp typefactory.hpp
Log Message:
using boost::algorithm::to_upper_copy instead of QuantLib::uppercase
Index: calendarfactory.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/calendarfactory.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** calendarfactory.cpp 5 Dec 2006 10:20:20 -0000 1.9
--- calendarfactory.cpp 2 Jan 2007 12:04:53 -0000 1.10
***************
*** 57,61 ****
*/
bool Create<QuantLib::Calendar>::testID() {
! idUpper = QuantLib::uppercase(idOriginal);
static std::string join("JOIN");
return idUpper.compare(0, 4, join) == 0;
--- 57,61 ----
*/
bool Create<QuantLib::Calendar>::testID() {
! idUpper = boost::algorithm::to_upper_copy(idOriginal);
static std::string join("JOIN");
return idUpper.compare(0, 4, join) == 0;
Index: typefactory.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/typefactory.hpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** typefactory.hpp 6 Dec 2006 15:30:55 -0000 1.50
--- typefactory.hpp 2 Jan 2007 12:04:53 -0000 1.51
***************
*** 22,26 ****
#include <qlo/typeregistry.hpp>
#include <ql/Instruments/payoffs.hpp>
- #include <ql/Utilities/strings.hpp>
#include <ql/Math/matrix.hpp>
#include <ql/Math/interpolation2D.hpp>
--- 22,25 ----
***************
*** 37,40 ****
--- 36,40 ----
#include <ql/Calendars/jointcalendar.hpp>
#include <oh/exception.hpp>
+ #include <boost/algorithm/string/case_conv.hpp>
namespace QuantLibAddin {
***************
*** 46,50 ****
void *getType(const KeyClass& id) {
typename RegistryClass::TypeMapPtr type_map = getTypeMap();
! KeyClass idUpper = uppercase(id);
typename RegistryClass::TypeMap::iterator i;
for (i = type_map->begin(); i != type_map->end(); i++)
--- 46,50 ----
void *getType(const KeyClass& id) {
typename RegistryClass::TypeMapPtr type_map = getTypeMap();
! KeyClass idUpper = QuantLibAddin::uppercase(id);
typename RegistryClass::TypeMap::iterator i;
for (i = type_map->begin(); i != type_map->end(); i++)
***************
*** 63,69 ****
type_map = i->second;
}
! std::string idUpper = QuantLib::uppercase(id);
for (typename RegistryClass::TypeMap::iterator i = type_map->begin(); i != type_map->end(); i++)
! if (QuantLib::uppercase(i->first) == idUpper)
return true;
return false;
--- 63,69 ----
type_map = i->second;
}
! std::string idUpper = boost::algorithm::to_upper_copy(id);
for (typename RegistryClass::TypeMap::iterator i = type_map->begin(); i != type_map->end(); i++)
! if (boost::algorithm::to_upper_copy(i->first) == idUpper)
return true;
return false;
***************
*** 286,294 ****
inline std::string uppercase(const std::string &s) {
! return QuantLib::uppercase(s);
}
inline KeyPair uppercase(const KeyPair &s) {
! return KeyPair(QuantLib::uppercase(s.first), QuantLib::uppercase(s.second));
}
--- 286,295 ----
inline std::string uppercase(const std::string &s) {
! return boost::algorithm::to_upper_copy(s);
}
inline KeyPair uppercase(const KeyPair &s) {
! return KeyPair(boost::algorithm::to_upper_copy(s.first),
! boost::algorithm::to_upper_copy(s.second));
}
|