diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-12-12 12:58:40 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-12-12 12:58:40 (GMT) |
commit | 7b55e48d57c061bd65e7718a41bfddd90084345e (patch) | |
tree | a371c34147528f5ed0a3a8e53bf6c2d52149dcc0 /src/uscxml/messages | |
parent | 277ca19814890939d5d0e4551e3acb651b1c42e6 (diff) | |
download | uscxml-7b55e48d57c061bd65e7718a41bfddd90084345e.zip uscxml-7b55e48d57c061bd65e7718a41bfddd90084345e.tar.gz uscxml-7b55e48d57c061bd65e7718a41bfddd90084345e.tar.bz2 |
Added test / example for pausable eventqueue
Diffstat (limited to 'src/uscxml/messages')
-rw-r--r-- | src/uscxml/messages/Data.h | 4 | ||||
-rw-r--r-- | src/uscxml/messages/Event.h | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/uscxml/messages/Data.h b/src/uscxml/messages/Data.h index c863e41..cee5afd 100644 --- a/src/uscxml/messages/Data.h +++ b/src/uscxml/messages/Data.h @@ -64,10 +64,10 @@ public: // we will have to drop this constructor as it interferes with operator Data() and requires C++11 template <typename T> - Data(T value, typename std::enable_if<! std::is_base_of<Data, T>::value>::type* = nullptr) + explicit Data(T value, typename std::enable_if<! std::is_base_of<Data, T>::value>::type* = nullptr) : node(NULL), atom(toStr(value)), type(VERBATIM) {} template <typename T> - Data(T value, Type type, typename std::enable_if<! std::is_base_of<Data, T>::value>::type* = nullptr) + explicit Data(T value, Type type, typename std::enable_if<! std::is_base_of<Data, T>::value>::type* = nullptr) : node(NULL), atom(toStr(value)), type(type) {} ~Data() {} diff --git a/src/uscxml/messages/Event.h b/src/uscxml/messages/Event.h index 2edbd3e..59b2690 100644 --- a/src/uscxml/messages/Event.h +++ b/src/uscxml/messages/Event.h @@ -109,12 +109,12 @@ public: return name.size() > 0; } - operator std::string() { - std::stringstream ss; - ss << *this; - return ss.str(); - } - + 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; @@ -198,7 +198,7 @@ class USCXML_API ErrorEvent : public Event { public: ErrorEvent() : Event() {} ErrorEvent(const std::string& msg) : Event("error.platform") { - data.compound["msg"] = Data(msg, Data::VERBATIM); + data.compound["msg"] = Data(msg, Data::VERBATIM); } }; |