summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-16 18:35:17 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-16 18:35:17 (GMT)
commit60c543c1d8c6699cc96829f15b16ecc60ac0b410 (patch)
treef0087f620d45246acf0268da539cb815796d88c0 /src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
parent4d186e24e44fe07f04708c2dc38387534c02c7fd (diff)
downloaduscxml-60c543c1d8c6699cc96829f15b16ecc60ac0b410.zip
uscxml-60c543c1d8c6699cc96829f15b16ecc60ac0b410.tar.gz
uscxml-60c543c1d8c6699cc96829f15b16ecc60ac0b410.tar.bz2
Added license information and bug fixes
Diffstat (limited to 'src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp')
-rw-r--r--src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
index 092426e..fe93213 100644
--- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
@@ -1,3 +1,22 @@
+/**
+ * @file
+ * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
#include "uscxml/Common.h"
#include "uscxml/config.h"
#include "SWIDataModel.h"
@@ -30,7 +49,7 @@ using namespace Arabica::DOM;
#ifdef BUILD_AS_PLUGINS
PLUMA_CONNECTOR
-bool connect(pluma::Host& host) {
+bool pluginConnect(pluma::Host& host) {
host.add( new SWIDataModelProvider() );
return true;
}
@@ -106,8 +125,8 @@ boost::shared_ptr<DataModelImpl> SWIDataModel::create(InterpreterImpl* interpret
int rc = PL_set_engine(engine, NULL);
assert(rc == PL_ENGINE_SET);
- (void)rc;
-
+ (void)rc;
+
_plModule = boost::replace_all_copy(interpreter->getSessionId(), "-", "");
boost::replace_all(_plModule, "0", "g");
boost::replace_all(_plModule, "1", "h");
@@ -232,7 +251,7 @@ void SWIDataModel::setEvent(const Event& event) {
} else if (event.content.size() > 0) {
PlCall("assert", PlCompound("event", PlCompound("data", PlString(Interpreter::spaceNormalize(event.content).c_str()))));
} else if (event.data) {
- LOG(ERROR) << "No support for structured data from events in prolog datamodel yet";
+ LOG(ERROR) << "No support for structured data from events in prolog datamodel yet";
}
// event.params