diff options
Diffstat (limited to 'src/uscxml/plugins/datamodel/lua')
-rw-r--r-- | src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp | 9 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/lua/LuaDataModel.h | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp index c204946..c23b483 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp @@ -20,6 +20,7 @@ #include <boost/algorithm/string.hpp> #include "uscxml/Common.h" +#include "uscxml/util/String.h" #include "LuaDataModel.h" // disable forcing to bool performance warning @@ -28,7 +29,7 @@ #include "LuaBridge.h" #pragma warning(pop) -#include "uscxml/DOMUtils.h" +#include "uscxml/dom/DOMUtils.h" #include "uscxml/Message.h" #include <glog/logging.h> @@ -123,7 +124,7 @@ LuaDataModel::LuaDataModel() { static int luaInFunction(lua_State * l) { luabridge::LuaRef ref = luabridge::getGlobal(l, "__interpreter"); - InterpreterImpl* interpreter = ref.cast<InterpreterImpl*>(); + InterpreterInfo* interpreter = ref.cast<InterpreterInfo*>(); int stackSize = lua_gettop(l); for (int i = 0; i < stackSize; i++) { @@ -278,7 +279,7 @@ void LuaDataModel::setEvent(const Event& event) { std::string trimmed = boost::trim_copy(event.content); if ((boost::starts_with(trimmed, "'") && boost::ends_with(trimmed, "'")) || (boost::starts_with(trimmed, "\"") && boost::ends_with(trimmed, "\""))) { - luaEvent["data"] = InterpreterImpl::spaceNormalize(event.content); + luaEvent["data"] = spaceNormalize(event.content); } else { Data tmp(event.content, Data::INTERPRETED); luaEvent["data"] = getDataAsLua(_luaState, tmp); @@ -464,7 +465,7 @@ void LuaDataModel::assign(const Arabica::DOM::Element<std::string>& assignElem, try { eval(Arabica::DOM::Element<std::string>(), key + " = " + content + ";"); } catch (...) { - eval(Arabica::DOM::Element<std::string>(), key + " = " + "\"" + InterpreterImpl::spaceNormalize(content) + "\";"); + eval(Arabica::DOM::Element<std::string>(), key + " = " + "\"" + spaceNormalize(content) + "\";"); } } else { eval(Arabica::DOM::Element<std::string>(), key + " = " + "nil;"); diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.h b/src/uscxml/plugins/datamodel/lua/LuaDataModel.h index bce1d62..eb23815 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.h +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.h @@ -20,7 +20,8 @@ #ifndef LUADATAMODEL_H_113E014C #define LUADATAMODEL_H_113E014C -#include "uscxml/Interpreter.h" +#include "uscxml/InterpreterInfo.h" +#include "uscxml/plugins/DataModel.h" #include <list> #ifdef BUILD_AS_PLUGINS |