summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Interpreter.h
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-12 23:49:43 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-12 23:49:43 (GMT)
commita116aeb2cf5a84fa03f9814c3884561149029267 (patch)
treebdd7dfc15ec1e38edcc9a7532ffad03fe4f6f823 /src/uscxml/Interpreter.h
parent6d0622c0bb8f0e52589c82252f2cc1eb847ad9bf (diff)
downloaduscxml-a116aeb2cf5a84fa03f9814c3884561149029267.zip
uscxml-a116aeb2cf5a84fa03f9814c3884561149029267.tar.gz
uscxml-a116aeb2cf5a84fa03f9814c3884561149029267.tar.bz2
Refactored to PIMPL pattern
Diffstat (limited to 'src/uscxml/Interpreter.h')
-rw-r--r--src/uscxml/Interpreter.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h
index edfdfd2..33204b5 100644
--- a/src/uscxml/Interpreter.h
+++ b/src/uscxml/Interpreter.h
@@ -2,6 +2,7 @@
#define RUNTIME_H_SQ1MBKGN
#include "uscxml/Common.h"
+#include "uscxml/URL.h"
#include <boost/uuid/uuid_generators.hpp>
#include <boost/algorithm/string.hpp>
@@ -76,20 +77,19 @@ public:
bool validate();
void setBaseURI(std::string baseURI) {
- _baseURI = Arabica::io::URI(baseURI);
+ _baseURI = URL(baseURI);
}
- std::string getBaseURI() {
- return _baseURI.as_string();
+ URL getBaseURI() {
+ return _baseURI;
}
- bool makeAbsolute(Arabica::io::URI& uri);
- DataModel* getDataModel() {
+ DataModel getDataModel() {
return _dataModel;
}
- Invoker* getInvoker() {
+ Invoker getInvoker() {
return _invoker;
}
- void setInvoker(Invoker* invoker) {
+ void setInvoker(const Invoker& invoker) {
_invoker = invoker;
}
std::string getNSPrefix() {
@@ -162,7 +162,7 @@ protected:
tthread::mutex _mutex;
tthread::condition_variable _stabilized;
- Arabica::io::URI _baseURI;
+ URL _baseURI;
Arabica::DOM::Document<std::string> _document;
Arabica::DOM::Element<std::string> _scxml;
Arabica::XPath::XPath<std::string> _xpath;
@@ -174,15 +174,16 @@ protected:
Arabica::XPath::NodeSet<std::string> _configuration;
Arabica::XPath::NodeSet<std::string> _statesToInvoke;
- DataModel* _dataModel;
+ DataModel _dataModel;
std::map<std::string, Arabica::XPath::NodeSet<std::string> > _historyValue;
std::list<Event > _internalQueue;
uscxml::concurrency::BlockingQueue<Event> _externalQueue;
DelayedEventQueue* _sendQueue;
- Invoker* _invoker;
+ Invoker _invoker;
- static Arabica::io::URI toBaseURI(const Arabica::io::URI& uri);
+ static URL toBaseURI(const URL& url);
+ bool toAbsoluteURI(URL& uri);
void microstep(const Arabica::XPath::NodeSet<std::string>& enabledTransitions);
void exitStates(const Arabica::XPath::NodeSet<std::string>& enabledTransitions);
@@ -227,12 +228,12 @@ protected:
std::string _name;
std::string _sessionId;
- IOProcessor* getIOProcessor(const std::string& type);
+ IOProcessor getIOProcessor(const std::string& type);
// IOProcessor* getIOProcessorForId(const std::string& sendId);
- std::map<std::string, IOProcessor*> _ioProcessors;
+ std::map<std::string, IOProcessor> _ioProcessors;
std::map<std::string, std::pair<Interpreter*, SendRequest> > _sendIds;
- std::map<std::string, Invoker*> _invokers;
+ std::map<std::string, Invoker> _invokers;
/// We need to remember to adapt them when the DOM is operated upon
std::map<std::string, Arabica::DOM::Node<std::string> > _cachedStates;