summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/lua
diff options
context:
space:
mode:
authorStefan Radomski <sradomski@mintwerk.de>2016-02-23 11:28:18 (GMT)
committerStefan Radomski <sradomski@mintwerk.de>2016-02-23 11:28:18 (GMT)
commit7212d5a3dbbd2845d09df96b2c345132c8a24931 (patch)
tree194bf3525bc7b607013301b79dde6c9950ccbf2e /src/uscxml/plugins/datamodel/lua
parent8e62f3801b98bf4b7f7f85b848b2fe6339c99162 (diff)
downloaduscxml-7212d5a3dbbd2845d09df96b2c345132c8a24931.zip
uscxml-7212d5a3dbbd2845d09df96b2c345132c8a24931.tar.gz
uscxml-7212d5a3dbbd2845d09df96b2c345132c8a24931.tar.bz2
Some refactoring for improved compile times
Diffstat (limited to 'src/uscxml/plugins/datamodel/lua')
-rw-r--r--src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp9
-rw-r--r--src/uscxml/plugins/datamodel/lua/LuaDataModel.h3
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