rewrite and reoganize tools functions

* create stdext namespace which contains additional C++ algorithms
* organize stdext in string, math, cast and exception utilities
This commit is contained in:
Eduardo Bart
2012-05-28 10:06:26 -03:00
parent 2676eb4da3
commit 4c80d783d6
75 changed files with 856 additions and 652 deletions

View File

@@ -107,8 +107,8 @@ protected:
template<typename T>
T OTMLNode::value() {
T ret;
if(!Fw::cast(m_value, ret))
throw OTMLException(shared_from_this(), Fw::mkstr("failed to cast node value to type '", Fw::demangleType<T>(), "'"));
if(!stdext::cast(m_value, ret))
throw OTMLException(shared_from_this(), stdext::mkstr("failed to cast node value to type '", stdext::demangle_type<T>(), "'"));
return ret;
}
@@ -141,7 +141,7 @@ T OTMLNode::valueAtIndex(int childIndex, const T& def) {
template<typename T>
void OTMLNode::write(const T& v) {
m_value = Fw::safeCast<std::string>(v);
m_value = stdext::safe_cast<std::string>(v);
}
template<typename T>