diff options
author | alexzhornyak <alexander.zhornyak@gmail.com> | 2017-05-07 17:00:12 (GMT) |
---|---|---|
committer | alexzhornyak <alexander.zhornyak@gmail.com> | 2017-05-07 17:00:12 (GMT) |
commit | 43936ecb53a0eb582eaf3a56ec0c016f8c47ae7f (patch) | |
tree | 2ea3905b58db14856b141cde0aeefb0aead04bd2 /src/uscxml/interpreter | |
parent | 75bf929119ca976e0d6b8da75770d07b510d5824 (diff) | |
download | uscxml-43936ecb53a0eb582eaf3a56ec0c016f8c47ae7f.zip uscxml-43936ecb53a0eb582eaf3a56ec0c016f8c47ae7f.tar.gz uscxml-43936ecb53a0eb582eaf3a56ec0c016f8c47ae7f.tar.bz2 |
evalAsScript
Implemented evalAsScript function
Diffstat (limited to 'src/uscxml/interpreter')
-rw-r--r-- | src/uscxml/interpreter/BasicContentExecutor.cpp | 2 | ||||
-rw-r--r-- | src/uscxml/interpreter/ContentExecutorImpl.h | 1 | ||||
-rw-r--r-- | src/uscxml/interpreter/InterpreterImpl.h | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/uscxml/interpreter/BasicContentExecutor.cpp b/src/uscxml/interpreter/BasicContentExecutor.cpp index 7ffda91..96777b1 100644 --- a/src/uscxml/interpreter/BasicContentExecutor.cpp +++ b/src/uscxml/interpreter/BasicContentExecutor.cpp @@ -291,7 +291,7 @@ void BasicContentExecutor::processLog(XERCESC_NS::DOMElement* content) { void BasicContentExecutor::processScript(XERCESC_NS::DOMElement* content) { // download as necessary std::string scriptContent(X(content->getTextContent())); - _callbacks->evalAsData(scriptContent); + _callbacks->evalAsScript(scriptContent); } diff --git a/src/uscxml/interpreter/ContentExecutorImpl.h b/src/uscxml/interpreter/ContentExecutorImpl.h index 5f0acfe..6afeca8 100644 --- a/src/uscxml/interpreter/ContentExecutorImpl.h +++ b/src/uscxml/interpreter/ContentExecutorImpl.h @@ -59,6 +59,7 @@ public: uint32_t iteration) = 0; virtual Data evalAsData(const std::string& expr) = 0; + virtual void evalAsScript(const std::string& content) = 0; virtual Data getAsData(const std::string& expr) = 0; virtual void assign(const std::string& location, const Data& data, const std::map<std::string, std::string>& attrs) = 0; diff --git a/src/uscxml/interpreter/InterpreterImpl.h b/src/uscxml/interpreter/InterpreterImpl.h index a68298b..aa439c0 100644 --- a/src/uscxml/interpreter/InterpreterImpl.h +++ b/src/uscxml/interpreter/InterpreterImpl.h @@ -187,6 +187,10 @@ public: return _dataModel.evalAsData(expr); } + virtual void evalAsScript(const std::string& content) { + _dataModel.evalAsScript(content); + } + virtual Data getAsData(const std::string& expr) { return _dataModel.getAsData(expr); } |