summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Message.h
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-07 18:37:10 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-07 18:37:10 (GMT)
commitce6f68d3a24759b9758ee0c5c2486ea53a1827af (patch)
tree479272d5c4959e77d1339d2a3c3ba4563b2ef115 /src/uscxml/Message.h
parent9ce1655e4db76e9a9a5db7b97fb0317d2c4d49ae (diff)
downloaduscxml-ce6f68d3a24759b9758ee0c5c2486ea53a1827af.zip
uscxml-ce6f68d3a24759b9758ee0c5c2486ea53a1827af.tar.gz
uscxml-ce6f68d3a24759b9758ee0c5c2486ea53a1827af.tar.bz2
Fixed JSON in content
Diffstat (limited to 'src/uscxml/Message.h')
-rw-r--r--src/uscxml/Message.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/uscxml/Message.h b/src/uscxml/Message.h
index 9f5e8e2..3d41f70 100644
--- a/src/uscxml/Message.h
+++ b/src/uscxml/Message.h
@@ -31,6 +31,10 @@ public:
explicit Data(const Arabica::DOM::Node<std::string>& dom);
virtual ~Data() {}
+ operator bool() const {
+ return (atom.length() > 0 || !compound.empty() || !array.empty());
+ }
+
static Data fromJSON(const std::string& jsonString);
static Data fromXML(const std::string& xmlString);
Arabica::DOM::Document<std::string> toDocument();