summaryrefslogtreecommitdiffstats
path: root/src/uscxml/messages
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-12-09 12:25:11 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-12-09 12:25:11 (GMT)
commit9b8e09c3fde755ec26e5c21b9640f53ed9329d05 (patch)
treec7001e5bfc551a24e3cee0b3fb014791e0685b44 /src/uscxml/messages
parent9fae96bbf295fcd867d60bf45d9c3b825ae692c2 (diff)
downloaduscxml-9b8e09c3fde755ec26e5c21b9640f53ed9329d05.zip
uscxml-9b8e09c3fde755ec26e5c21b9640f53ed9329d05.tar.gz
uscxml-9b8e09c3fde755ec26e5c21b9640f53ed9329d05.tar.bz2
Removed easylogging due to JNI segfaults
Diffstat (limited to 'src/uscxml/messages')
-rw-r--r--src/uscxml/messages/Data.cpp4
-rw-r--r--src/uscxml/messages/Event.h10
2 files changed, 10 insertions, 4 deletions
diff --git a/src/uscxml/messages/Data.cpp b/src/uscxml/messages/Data.cpp
index 089de96..a75e774 100644
--- a/src/uscxml/messages/Data.cpp
+++ b/src/uscxml/messages/Data.cpp
@@ -24,7 +24,7 @@
#include "uscxml/util/DOM.h"
-#include "easylogging++.h"
+#include "uscxml/interpreter/Logging.h"
#ifdef HAS_STRING_H
#include <string.h>
@@ -290,4 +290,4 @@ std::string Data::toJSON(const Data& data) {
return os.str();
}
-} \ No newline at end of file
+}
diff --git a/src/uscxml/messages/Event.h b/src/uscxml/messages/Event.h
index 8b7bb91..2edbd3e 100644
--- a/src/uscxml/messages/Event.h
+++ b/src/uscxml/messages/Event.h
@@ -90,7 +90,7 @@ public:
};
Event() : eventType(INTERNAL), hideSendId(false), uuid(UUID::getUUID()) {}
- Event(const std::string& name, Type type = INTERNAL) : name(name), eventType(type), hideSendId(false) {}
+ explicit Event(const std::string& name, Type type = INTERNAL) : name(name), eventType(type), hideSendId(false) {}
bool operator< (const Event& other) const {
return this < &other;
}
@@ -109,6 +109,12 @@ public:
return name.size() > 0;
}
+ operator std::string() {
+ std::stringstream ss;
+ ss << *this;
+ return ss.str();
+ }
+
typedef std::multimap<std::string, Data> params_t;
typedef std::map<std::string, Data> namelist_t;
@@ -192,7 +198,7 @@ class USCXML_API ErrorEvent : public Event {
public:
ErrorEvent() : Event() {}
ErrorEvent(const std::string& msg) : Event("error.platform") {
- data.compound["msg"] = msg;
+ data.compound["msg"] = Data(msg, Data::VERBATIM);
}
};