diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-07-22 12:38:43 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-07-22 12:38:43 (GMT) |
commit | f2d8c967076e5d8ebd3ca718e14edef8acb5f87c (patch) | |
tree | 0bed80b7ff8081a6108e7c847a4489de272679c8 /src/uscxml/Factory.h | |
parent | 7bd0256239f247ed01ee6c673e31283c794bb3d0 (diff) | |
download | uscxml-f2d8c967076e5d8ebd3ca718e14edef8acb5f87c.zip uscxml-f2d8c967076e5d8ebd3ca718e14edef8acb5f87c.tar.gz uscxml-f2d8c967076e5d8ebd3ca718e14edef8acb5f87c.tar.bz2 |
Removed iOS project again
Diffstat (limited to 'src/uscxml/Factory.h')
-rw-r--r-- | src/uscxml/Factory.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/uscxml/Factory.h b/src/uscxml/Factory.h index 7b08982..2a0ec43 100644 --- a/src/uscxml/Factory.h +++ b/src/uscxml/Factory.h @@ -10,12 +10,14 @@ #include <string> #include <set> #include <boost/shared_ptr.hpp> +#include <limits> namespace uscxml { // see http://stackoverflow.com/questions/228005/alternative-to-itoa-for-converting-integer-to-string-c template <typename T> std::string toStr(T tmp) { std::ostringstream out; + out.precision(std::numeric_limits<double>::digits10 + 1); out << tmp; return out.str(); } @@ -28,9 +30,9 @@ template <typename T> T strTo(std::string tmp) { } inline bool isNumeric( const char* pszInput, int nNumberBase) { - std::string base = "0123456789ABCDEF"; + std::string base = ".0123456789ABCDEF"; std::string input = pszInput; - return (input.find_first_not_of(base.substr(0, nNumberBase)) == std::string::npos); + return (input.find_first_not_of(base.substr(0, nNumberBase + 1)) == std::string::npos); } class InterpreterImpl; @@ -252,6 +254,8 @@ public: virtual void setEvent(const Event& event) = 0; virtual Data getStringAsData(const std::string& content) = 0; + size_t replaceExpressions(std::string& content); + // foreach virtual uint32_t getLength(const std::string& expr) = 0; virtual void setForeach(const std::string& item, @@ -363,6 +367,10 @@ public: return _impl->isDeclared(expr); } + size_t replaceExpressions(std::string& content) { + return _impl->replaceExpressions(content); + } + protected: boost::shared_ptr<DataModelImpl> _impl; }; |