summaryrefslogtreecommitdiffstats
path: root/src/bindings
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-12-02 14:18:33 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-12-02 14:18:33 (GMT)
commit03ef761afd6a4c597c0e3fa1714cc947581e2a48 (patch)
treed2671b2c22c45931c24e2c8d450d2d2e70a840fb /src/bindings
parent044fefae99320aa575523eab90032f9e9d8b498c (diff)
downloaduscxml-03ef761afd6a4c597c0e3fa1714cc947581e2a48.zip
uscxml-03ef761afd6a4c597c0e3fa1714cc947581e2a48.tar.gz
uscxml-03ef761afd6a4c597c0e3fa1714cc947581e2a48.tar.bz2
Fixed Lua wchar problem for old swig intallations
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/CMakeLists.txt10
-rw-r--r--src/bindings/swig/csharp/CMakeLists.txt3
-rw-r--r--src/bindings/swig/csharp/uscxml.i54
-rw-r--r--src/bindings/swig/lua/uscxml.i6
4 files changed, 44 insertions, 29 deletions
diff --git a/src/bindings/CMakeLists.txt b/src/bindings/CMakeLists.txt
index e75d8f2..123ec9c 100644
--- a/src/bindings/CMakeLists.txt
+++ b/src/bindings/CMakeLists.txt
@@ -18,7 +18,7 @@ if (WIN32)
endif()
LIST(APPEND CMAKE_PROGRAM_PATH $ENV{SWIG_DIR})
-find_package(SWIG)
+# find_package(SWIG)
if (SWIG_FOUND)
if(SWIG_VERSION VERSION_GREATER 2.0.4)
@@ -30,9 +30,9 @@ if (SWIG_FOUND)
if (BUILD_BINDING_LUA)
add_subdirectory(swig/lua)
endif()
- # if (BUILD_BINDING_CSHARP)
- # add_subdirectory(swig/csharp)
- # endif()
+ if (BUILD_BINDING_CSHARP)
+ add_subdirectory(swig/csharp)
+ endif()
# if (BUILD_BINDING_PHP)
# add_subdirectory(swig/php)
# endif()
@@ -44,6 +44,6 @@ if (SWIG_FOUND)
message(STATUS "SWIG version 2.0.5 is required, found ${SWIG_VERSION} - skipping wrapper generation")
endif()
else()
- message(STATUS "SWIG not found - skipping wrapper generation")
+ message(STATUS "No swig binary found, skipping wrapper generation")
endif()
set(USCXML_LANGUAGE_BINDINGS ${USCXML_LANGUAGE_BINDINGS} PARENT_SCOPE)
diff --git a/src/bindings/swig/csharp/CMakeLists.txt b/src/bindings/swig/csharp/CMakeLists.txt
index 384507b..966f740 100644
--- a/src/bindings/swig/csharp/CMakeLists.txt
+++ b/src/bindings/swig/csharp/CMakeLists.txt
@@ -10,7 +10,6 @@ FIND_PROGRAM(DMCS_EXECUTABLE dmcs PATHS $ENV{DMCS_HOME} ENV PATH ) # Mono compil
FIND_PROGRAM(CSC_EXECUTABLE csc PATHS $ENV{CSC_HOME} ENV PATH ) # CSharp compiler
if (DMCS_EXECUTABLE OR CSC_EXECUTABLE)
-
# unset all library suffixes as swig will hardcode a library without
SET(LIB_POSTFIX ${CMAKE_LIBRARY_POSTFIX})
@@ -85,4 +84,6 @@ if (DMCS_EXECUTABLE OR CSC_EXECUTABLE)
set_target_properties(csharp PROPERTIES FOLDER "Bindings")
set(USCXML_LANGUAGE_BINDINGS ${USCXML_LANGUAGE_BINDINGS} PARENT_SCOPE)
+else()
+ message(STATUS "Could not find dmcs or csc binary, not building csharp bindings")
endif() \ No newline at end of file
diff --git a/src/bindings/swig/csharp/uscxml.i b/src/bindings/swig/csharp/uscxml.i
index fbc5f20..e9f94f2 100644
--- a/src/bindings/swig/csharp/uscxml.i
+++ b/src/bindings/swig/csharp/uscxml.i
@@ -16,8 +16,6 @@
typedef uscxml::Blob Blob;
typedef uscxml::Data Data;
typedef uscxml::Event Event;
-typedef uscxml::InvokeRequest InvokeRequest;
-typedef uscxml::SendRequest SendRequest;
typedef uscxml::Invoker Invoker;
typedef uscxml::IOProcessor IOProcessor;
typedef uscxml::DataModel DataModel;
@@ -61,25 +59,33 @@ typedef uscxml::InterpreterIssue InterpreterIssue;
%{
-#include "../../../uscxml/Message.h"
-#include "../../../uscxml/Factory.h"
+#include "uscxml/config.h"
#include "../../../uscxml/Interpreter.h"
-#include "../../../uscxml/concurrency/BlockingQueue.h"
-#include "../../../uscxml/server/HTTPServer.h"
-//#include "../../../uscxml/debug/DebuggerServlet.h"
+#include "../../../uscxml/debug/InterpreterIssue.h"
+#include "../../../uscxml/interpreter/InterpreterState.h"
+#include "../../../uscxml/interpreter/InterpreterMonitor.h"
+
+#include "../../../uscxml/messages/Data.h"
+#include "../../../uscxml/messages/Event.h"
+#include "../../../uscxml/util/DOM.h"
+
+#include "../../../uscxml/plugins/Factory.h"
+#include "../../../uscxml/plugins/DataModelImpl.h"
#include "../wrapped/WrappedInvoker.h"
#include "../wrapped/WrappedDataModel.h"
+#include "../wrapped/WrappedActionLanguage.h"
#include "../wrapped/WrappedExecutableContent.h"
#include "../wrapped/WrappedIOProcessor.h"
#include "../wrapped/WrappedInterpreterMonitor.h"
using namespace uscxml;
-using namespace Arabica::DOM;
+using namespace XERCESC_NS;
// the wrapped* C++ classes get rid of DOM nodes and provide more easily wrapped base classes
#include "../wrapped/WrappedInvoker.cpp"
#include "../wrapped/WrappedDataModel.cpp"
+#include "../wrapped/WrappedActionLanguage.cpp"
#include "../wrapped/WrappedExecutableContent.cpp"
#include "../wrapped/WrappedIOProcessor.cpp"
#include "../wrapped/WrappedInterpreterMonitor.cpp"
@@ -160,8 +166,6 @@ WRAP_THROW_EXCEPTION(uscxml::Interpreter::interpret);
WRAP_TO_STRING(uscxml::Event);
WRAP_TO_STRING(uscxml::Data);
-WRAP_TO_STRING(uscxml::SendRequest);
-WRAP_TO_STRING(uscxml::InvokeRequest);
WRAP_TO_STRING(uscxml::InterpreterIssue);
%include "../uscxml_ignores.i"
@@ -390,33 +394,38 @@ using System.Runtime.InteropServices;
//***********************************************
%include "../../../uscxml/Common.h"
-%include "../../../uscxml/Factory.h"
-%include "../../../uscxml/Message.h"
-%include "../../../uscxml/Interpreter.h"
-%include "../../../uscxml/concurrency/BlockingQueue.h"
-%include "../../../uscxml/server/HTTPServer.h"
-//%include "../../../uscxml/debug/DebuggerServlet.h"
-%include "../../../uscxml/debug/InterpreterIssue.h"
-
%include "../../../uscxml/messages/Blob.h"
%include "../../../uscxml/messages/Data.h"
%include "../../../uscxml/messages/Event.h"
-%include "../../../uscxml/messages/InvokeRequest.h"
-%include "../../../uscxml/messages/SendRequest.h"
-%include "../../../uscxml/plugins/DataModel.h"
+%include "../../../uscxml/plugins/Factory.h"
+%include "../../../uscxml/interpreter/InterpreterState.h"
+%include "../../../uscxml/interpreter/InterpreterMonitor.h"
+
+//%include "../../../uscxml/interpreter/MicroStep.h"
+//%include "../../../uscxml/interpreter/ContentExecutor.h"
+
+%include "../../../uscxml/Interpreter.h"
+%include "../../../uscxml/debug/InterpreterIssue.h"
+
%include "../../../uscxml/plugins/EventHandler.h"
+
+%include "../../../uscxml/plugins/DataModel.h"
+%include "../../../uscxml/plugins/DataModelImpl.h"
%include "../../../uscxml/plugins/ExecutableContent.h"
+%include "../../../uscxml/plugins/ExecutableContentImpl.h"
%include "../../../uscxml/plugins/Invoker.h"
+%include "../../../uscxml/plugins/InvokerImpl.h"
%include "../../../uscxml/plugins/IOProcessor.h"
+%include "../../../uscxml/plugins/IOProcessorImpl.h"
%include "../wrapped/WrappedInvoker.h"
%include "../wrapped/WrappedDataModel.h"
+%include "../wrapped/WrappedActionLanguage.h"
%include "../wrapped/WrappedExecutableContent.h"
%include "../wrapped/WrappedIOProcessor.h"
%include "../wrapped/WrappedInterpreterMonitor.h"
-
%template(IssueList) std::list<uscxml::InterpreterIssue>;
%template(DataList) std::list<uscxml::Data>;
%template(DataMap) std::map<std::string, uscxml::Data>;
@@ -426,4 +435,3 @@ using System.Runtime.InteropServices;
%template(ParamMap) std::map<std::string, std::list<uscxml::Data> >;
%template(IOProcMap) std::map<std::string, IOProcessor>;
%template(InvokerMap) std::map<std::string, Invoker>;
-%template(ParentQueue) uscxml::concurrency::BlockingQueue<uscxml::SendRequest>;
diff --git a/src/bindings/swig/lua/uscxml.i b/src/bindings/swig/lua/uscxml.i
index 9774cba..9c2f115 100644
--- a/src/bindings/swig/lua/uscxml.i
+++ b/src/bindings/swig/lua/uscxml.i
@@ -3,6 +3,12 @@
// provide a macro for the header files
#define SWIGIMPORTED 1
+// fixing a bug for old swig versions with lua wchar:
+// https://github.com/swig/swig/commit/c7ef5935496a04f3a83c70af6f841abf3ad7606e
+%{
+#define wchar wchar_t
+%}
+
%include <stl.i>
%include <std_map.i>
%include <std_string.i>