diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-01-13 16:47:44 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-01-13 16:47:44 (GMT) |
commit | 4f6cbe9e7aec2b4a6c8f286f9097abfb011a6235 (patch) | |
tree | 8c023473bb342780ddf51a893d18369f1319bb5c /src/uscxml/messages/Data.h | |
parent | 0aa0fe08dc308c94379c47d0bf9745e341cb4c81 (diff) | |
download | uscxml-4f6cbe9e7aec2b4a6c8f286f9097abfb011a6235.zip uscxml-4f6cbe9e7aec2b4a6c8f286f9097abfb011a6235.tar.gz uscxml-4f6cbe9e7aec2b4a6c8f286f9097abfb011a6235.tar.bz2 |
First support for serialization and some bug fixes for DOM per data.src
Diffstat (limited to 'src/uscxml/messages/Data.h')
-rw-r--r-- | src/uscxml/messages/Data.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/uscxml/messages/Data.h b/src/uscxml/messages/Data.h index 17d37cb..19134dd 100644 --- a/src/uscxml/messages/Data.h +++ b/src/uscxml/messages/Data.h @@ -71,14 +71,15 @@ public: 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() {} + ~Data() { + } void clear() { type = VERBATIM; compound.clear(); array.clear(); atom.clear(); - adoptedDoc.reset(); +// adoptedDoc.reset(); binary = Blob(); node = NULL; } @@ -234,7 +235,7 @@ protected: #endif XERCESC_NS::DOMNode* node; - std::shared_ptr<XERCESC_NS::DOMDocument> adoptedDoc; +// std::shared_ptr<XERCESC_NS::DOMDocument> adoptedDoc; std::map<std::string, Data> compound; std::list<Data> array; std::string atom; @@ -242,7 +243,10 @@ protected: Type type; protected: + static std::string jsonEscape(const std::string& expr); + static std::string jsonUnescape(const std::string& expr); friend USCXML_API std::ostream& operator<< (std::ostream& os, const Data& data); + }; USCXML_API std::ostream& operator<< (std::ostream& os, const Data& data); |