[QuantLibAddin-cvs] QuantLibAddin/qlo typefactory.hpp,1.11,1.12
Brought to you by:
ericehlers,
nando
|
From: Eric E. <eri...@us...> - 2006-06-30 17:29:38
|
Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16181/qlo Modified Files: typefactory.hpp Log Message: implement using directive for checkType() Index: typefactory.hpp =================================================================== RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/typefactory.hpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** typefactory.hpp 30 Jun 2006 14:12:05 -0000 1.11 --- typefactory.hpp 30 Jun 2006 17:29:34 -0000 1.12 *************** *** 53,63 **** static TypeMapPtr type_map; if(!type_map) { ! QL_REQUIRE( ! RegistryClass::instance().getAllTypesMap().find(typeid(T).name()) != ! RegistryClass::instance().getAllTypesMap().end(), "Error retrieving Enumeration from Registry - the type '" << typeid(T).name() << "' is not available!"); ! type_map = ! RegistryClass::instance().getAllTypesMap().find(typeid(T).name())->second; } return type_map; --- 53,62 ---- static TypeMapPtr type_map; if(!type_map) { ! AllTypeMap::const_iterator i = ! RegistryClass::instance().getAllTypesMap().find(typeid(T).name()); ! QL_REQUIRE(i != RegistryClass::instance().getAllTypesMap().end(), "Error retrieving Enumeration from Registry - the type '" << typeid(T).name() << "' is not available!"); ! type_map = i->second; } return type_map; *************** *** 71,77 **** return *(static_cast<T*>(this->getType(id))); } ! T *checkType(const std::string& id) { ! return RegistryManager<T, EnumTypeRegistry>::checkType(id); ! } }; --- 70,74 ---- return *(static_cast<T*>(this->getType(id))); } ! using RegistryManager<T, EnumTypeRegistry>::checkType; }; |