diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-12-09 12:25:11 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-12-09 12:25:11 (GMT) |
commit | 9b8e09c3fde755ec26e5c21b9640f53ed9329d05 (patch) | |
tree | c7001e5bfc551a24e3cee0b3fb014791e0685b44 /src/uscxml/messages/Event.h | |
parent | 9fae96bbf295fcd867d60bf45d9c3b825ae692c2 (diff) | |
download | uscxml-9b8e09c3fde755ec26e5c21b9640f53ed9329d05.zip uscxml-9b8e09c3fde755ec26e5c21b9640f53ed9329d05.tar.gz uscxml-9b8e09c3fde755ec26e5c21b9640f53ed9329d05.tar.bz2 |
Removed easylogging due to JNI segfaults
Diffstat (limited to 'src/uscxml/messages/Event.h')
-rw-r--r-- | src/uscxml/messages/Event.h | 10 |
1 files changed, 8 insertions, 2 deletions
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); } }; |