summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-05-22 19:17:48 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-05-22 19:17:48 (GMT)
commit9a70ea561fecf533451f08ee3a490e2a5ba21372 (patch)
tree6ca253c6aa8640d50ca93d104a19421ec8ec2e3f /contrib
parentecdefbdbb55c800f9ceed67f77592b5d64927225 (diff)
downloaduscxml-9a70ea561fecf533451f08ee3a490e2a5ba21372.zip
uscxml-9a70ea561fecf533451f08ee3a490e2a5ba21372.tar.gz
uscxml-9a70ea561fecf533451f08ee3a490e2a5ba21372.tar.bz2
Fixed issue 135 custom executable content
Diffstat (limited to 'contrib')
-rw-r--r--contrib/src/uscxml/CustomExecutableContent.cpp20
-rw-r--r--contrib/src/uscxml/CustomExecutableContent.h48
2 files changed, 68 insertions, 0 deletions
diff --git a/contrib/src/uscxml/CustomExecutableContent.cpp b/contrib/src/uscxml/CustomExecutableContent.cpp
new file mode 100644
index 0000000..d97bdfe
--- /dev/null
+++ b/contrib/src/uscxml/CustomExecutableContent.cpp
@@ -0,0 +1,20 @@
+/**
+ * @file
+ * @author 2017 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 "CustomExecutableContent.h" \ No newline at end of file
diff --git a/contrib/src/uscxml/CustomExecutableContent.h b/contrib/src/uscxml/CustomExecutableContent.h
new file mode 100644
index 0000000..b153605
--- /dev/null
+++ b/contrib/src/uscxml/CustomExecutableContent.h
@@ -0,0 +1,48 @@
+/**
+ * @file
+ * @author 2017 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 CUSTOMEXECUTABLECONTENT_H_346FEA6
+#define CUSTOMEXECUTABLECONTENT_H_346FEA6
+
+#include <iostream>
+
+#include "uscxml/plugins/ExecutableContentImpl.h"
+
+class CustomExecutableContent : public uscxml::ExecutableContentImpl {
+public:
+ ~CustomExecutableContent() {};
+ virtual std::shared_ptr<ExecutableContentImpl> create(uscxml::InterpreterImpl* interpreter) {
+ return std::shared_ptr<ExecutableContentImpl>(new CustomExecutableContent());
+ }
+
+ virtual std::string getLocalName() { return "custom"; }
+
+ virtual void enterElement(XERCESC_NS::DOMElement* node) {
+ std::cout << "Entering custom element" << std::endl;
+ }
+ virtual void exitElement(XERCESC_NS::DOMElement* node) {
+ std::cout << "Exiting custom element" << std::endl;
+ }
+
+protected:
+ uscxml::InterpreterImpl* _interpreter;
+};
+
+
+#endif /* end of include guard: CUSTOMEXECUTABLECONTENT_H_346FEA6 */