diff options
author | Stefan Radomski <sradomski@mintwerk.de> | 2016-02-23 11:28:18 (GMT) |
---|---|---|
committer | Stefan Radomski <sradomski@mintwerk.de> | 2016-02-23 11:28:18 (GMT) |
commit | 7212d5a3dbbd2845d09df96b2c345132c8a24931 (patch) | |
tree | 194bf3525bc7b607013301b79dde6c9950ccbf2e /src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp | |
parent | 8e62f3801b98bf4b7f7f85b848b2fe6339c99162 (diff) | |
download | uscxml-7212d5a3dbbd2845d09df96b2c345132c8a24931.zip uscxml-7212d5a3dbbd2845d09df96b2c345132c8a24931.tar.gz uscxml-7212d5a3dbbd2845d09df96b2c345132c8a24931.tar.bz2 |
Some refactoring for improved compile times
Diffstat (limited to 'src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp')
-rw-r--r-- | src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp | 9 |
1 files changed, 5 insertions, 4 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;"); |