summaryrefslogtreecommitdiffstats
path: root/src/uscxml/transform/Transformer.h
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-05-12 13:12:33 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-05-12 13:12:33 (GMT)
commitb62e7979600feee23dc7cdb61042a8fc7673122b (patch)
treef7351372f37979dd2d048e0b68a16a4cd3b2aadb /src/uscxml/transform/Transformer.h
parent1b11b310be61e51b3ac5ebb83f7c8a33aef3d6e8 (diff)
downloaduscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.zip
uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.tar.gz
uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.tar.bz2
Major Refactoring v2.0
Diffstat (limited to 'src/uscxml/transform/Transformer.h')
-rw-r--r--src/uscxml/transform/Transformer.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/uscxml/transform/Transformer.h b/src/uscxml/transform/Transformer.h
index c8498ff..a490533 100644
--- a/src/uscxml/transform/Transformer.h
+++ b/src/uscxml/transform/Transformer.h
@@ -28,7 +28,15 @@ namespace uscxml {
class USCXML_API TransformerImpl {
public:
- TransformerImpl() {}
+ TransformerImpl(const Interpreter& other) {
+ interpreter = other; // we need to keep a reference to retain the document!
+ other.getImpl()->init();
+ _document = other.getImpl()->_document;
+ _baseURL = other.getImpl()->_baseURL;
+ _scxml = other.getImpl()->_scxml;
+ _name = other.getImpl()->_name;
+ _binding = other.getImpl()->_binding;
+ }
virtual void writeTo(std::ostream& stream) = 0;
virtual operator Interpreter() {
@@ -39,10 +47,18 @@ protected:
std::multimap<std::string, std::string> _extensions;
std::list<std::string> _options;
+ xercesc::DOMDocument* _document;
+ xercesc::DOMElement* _scxml;
+
+ Interpreter interpreter;
+ InterpreterImpl::Binding _binding;
+ URL _baseURL;
+ std::string _name;
+
friend class Transformer;
};
-class USCXML_API Transformer : public boost::enable_shared_from_this<Transformer> {
+class USCXML_API Transformer {
public:
// Transformer(const Interpreter& source) { _impl = new (source) }