summaryrefslogtreecommitdiffstats
path: root/src/uscxml/interpreter
diff options
context:
space:
mode:
authorStefan Radomski <sradomski@mintwerk.de>2016-01-30 00:42:45 (GMT)
committerStefan Radomski <sradomski@mintwerk.de>2016-01-30 00:42:45 (GMT)
commit0b313e00915b31c8c03980b7225f82ac2e9513e6 (patch)
tree2b3bf60553db69bf7bb7cc9c37cdb96faf198f6e /src/uscxml/interpreter
parente67b8c3bce5ce1cf5b3b1b17faff3ec114b70f0a (diff)
downloaduscxml-0b313e00915b31c8c03980b7225f82ac2e9513e6.zip
uscxml-0b313e00915b31c8c03980b7225f82ac2e9513e6.tar.gz
uscxml-0b313e00915b31c8c03980b7225f82ac2e9513e6.tar.bz2
Prepared ANSI C transformation with invokers
Diffstat (limited to 'src/uscxml/interpreter')
-rw-r--r--src/uscxml/interpreter/InterpreterFast.cpp42
-rw-r--r--src/uscxml/interpreter/InterpreterFast.h47
2 files changed, 89 insertions, 0 deletions
diff --git a/src/uscxml/interpreter/InterpreterFast.cpp b/src/uscxml/interpreter/InterpreterFast.cpp
new file mode 100644
index 0000000..0958c61
--- /dev/null
+++ b/src/uscxml/interpreter/InterpreterFast.cpp
@@ -0,0 +1,42 @@
+/**
+ * @file
+ * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
+#include "InterpreterFast.h"
+
+#include "uscxml/Factory.h"
+#include "uscxml/concurrency/DelayedEventQueue.h"
+
+#include <glog/logging.h>
+#include "uscxml/UUID.h"
+#include "uscxml/DOMUtils.h"
+
+namespace uscxml {
+
+using namespace Arabica::XPath;
+using namespace Arabica::DOM;
+
+
+void InterpreterFast::handleDOMEvent(Arabica::DOM::Events::Event<std::string>& event) {
+ InterpreterImpl::handleDOMEvent(event);
+
+ if (event.getType().compare("DOMAttrModified") == 0) // we do not care about attributes
+ return;
+
+}
+} \ No newline at end of file
diff --git a/src/uscxml/interpreter/InterpreterFast.h b/src/uscxml/interpreter/InterpreterFast.h
new file mode 100644
index 0000000..589e899
--- /dev/null
+++ b/src/uscxml/interpreter/InterpreterFast.h
@@ -0,0 +1,47 @@
+/**
+ * @file
+ * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
+ * @copyright Simplified BSD
+ *
+ * @cond
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the FreeBSD license as published by the FreeBSD
+ * project.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the FreeBSD license along with this
+ * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
+ * @endcond
+ */
+
+#ifndef INTERPRETERFAST_H_224A5F07
+#define INTERPRETERFAST_H_224A5F07
+
+#include "uscxml/Interpreter.h"
+
+namespace uscxml {
+
+class InterpreterFast : public InterpreterImpl {
+protected:
+ virtual void setupSets();
+ virtual void handleDOMEvent(Arabica::DOM::Events::Event<std::string>& event);
+
+private:
+
+ /* TODO: use post-order and document-order per STL comparator (sorted std::set?) */
+
+ std::vector<Arabica::XPath::NodeSet<std::string> > _states;
+ std::vector<Arabica::XPath::NodeSet<std::string> > _transitions;
+
+ std::vector<std::vector<bool> > _conflictingTransitions;
+ std::vector<std::vector<bool> > _exitSets;
+ std::vector<std::vector<bool> > _targetSets;
+
+};
+
+}
+
+#endif /* end of include guard: INTERPRETERFAST_H_224A5F07 */