summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Interpreter.h
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-02-25 12:28:05 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-02-25 12:28:05 (GMT)
commit49c3c43d18c9cce6de305aae77cc8bd839506129 (patch)
treecfc4ea84416c76e8bbe3e27d2918321115b61e24 /src/uscxml/Interpreter.h
parent47956a35d11495f2ebf6988c7f9d9dffe0bd3a4b (diff)
downloaduscxml-49c3c43d18c9cce6de305aae77cc8bd839506129.zip
uscxml-49c3c43d18c9cce6de305aae77cc8bd839506129.tar.gz
uscxml-49c3c43d18c9cce6de305aae77cc8bd839506129.tar.bz2
Introduced postpone element and reorganized http request representation as events
Diffstat (limited to 'src/uscxml/Interpreter.h')
-rw-r--r--src/uscxml/Interpreter.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h
index 48e08b4..318af95 100644
--- a/src/uscxml/Interpreter.h
+++ b/src/uscxml/Interpreter.h
@@ -129,13 +129,27 @@ public:
Arabica::XPath::StandardNamespaceContext<std::string>& getNSContext() {
return _nsContext;
}
+ std::string getXMLPrefixForNS(const std::string& ns) {
+ if (_nsToPrefix.find(ns) != _nsToPrefix.end())
+ return _nsToPrefix[ns] + ":";
+ return "";
+ }
- void receive(Event& event) {
- _externalQueue.push(event);
+ void receive(const Event& event, bool toFront = false) {
+ if (toFront) {
+ _externalQueue.push_front(event);
+ } else {
+ _externalQueue.push(event);
+ }
}
- void receiveInternal(Event& event) {
+ void receiveInternal(const Event& event) {
_internalQueue.push_back(event);
}
+
+ Event getCurrentEvent() {
+ return _currEvent;
+ }
+
Arabica::XPath::NodeSet<std::string> getConfiguration() {
return _configuration;
}
@@ -202,8 +216,9 @@ protected:
Arabica::XPath::XPath<std::string> _xpath;
Arabica::XPath::StandardNamespaceContext<std::string> _nsContext;
std::string _xmlNSPrefix; // the actual prefix for elements in the xml file
- std::string _xpathPrefix; // prefix mapped for xpath, "scxml" is _xmlNSPrefix is empty but _nsURL set
+ std::string _xpathPrefix; // prefix mapped for xpath, "scxml" is _xmlNSPrefix is empty but _nsURL set
std::string _nsURL; // ough to be "http://www.w3.org/2005/07/scxml"
+ std::map<std::string, std::string> _nsToPrefix;
bool _running;
bool _done;
@@ -219,6 +234,8 @@ protected:
uscxml::concurrency::BlockingQueue<Event>* _parentQueue;
DelayedEventQueue* _sendQueue;
+ Event _currEvent;
+
HTTPServletInvoker* _httpServlet;
std::set<InterpreterMonitor*> _monitors;