summaryrefslogtreecommitdiffstats
path: root/src/bindings
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-07-30 20:41:50 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-07-30 20:41:50 (GMT)
commitb7a2d38bdcee3bf85a32dea7ac74b144d5ef40fa (patch)
treebade629bcca6b6a1417cb45be4349a3c27ea0feb /src/bindings
parentafbd0c4463c6f28ec1cd6ea45a68fdbcfcfeae6c (diff)
downloaduscxml-b7a2d38bdcee3bf85a32dea7ac74b144d5ef40fa.zip
uscxml-b7a2d38bdcee3bf85a32dea7ac74b144d5ef40fa.tar.gz
uscxml-b7a2d38bdcee3bf85a32dea7ac74b144d5ef40fa.tar.bz2
See detailled log
- Forcing Data.Type for Data(String) constructor now, default used to be INTERPRETED. - setDataModel and addIOProcessor on interpreter now - fixed a bug with Data(bool) constructor - various smaller fixes
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/swig/java/uscxml.i20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/bindings/swig/java/uscxml.i b/src/bindings/swig/java/uscxml.i
index 688ca6e..036b244 100644
--- a/src/bindings/swig/java/uscxml.i
+++ b/src/bindings/swig/java/uscxml.i
@@ -42,7 +42,7 @@ typedef uscxml::ExecutableContentImpl ExecutableContentImpl;
%javaconst(1);
-%rename(equals) operator==;
+%rename(equals) operator==; // signature is wrong, still useful
%rename(isValid) operator bool;
//**************************************************
@@ -98,6 +98,15 @@ WRAP_THROW_EXCEPTION(uscxml::Interpreter::step);
WRAP_THROW_EXCEPTION(uscxml::Interpreter::interpret);
+%define WRAP_HASHCODE( CLASSNAME )
+%extend CLASSNAME {
+ virtual int hashCode() {
+/* std::cout << "Calc hashcode as " << (int)(size_t)self->getImpl().get() << std::endl << std::flush;*/
+ return (int)(size_t)self->getImpl().get();
+ }
+};
+%enddef
+
%define WRAP_TO_STRING( CLASSNAME )
%extend CLASSNAME {
virtual std::string toString() {
@@ -113,6 +122,8 @@ WRAP_TO_STRING(uscxml::Data);
WRAP_TO_STRING(uscxml::SendRequest);
WRAP_TO_STRING(uscxml::InvokeRequest);
+WRAP_HASHCODE(uscxml::Interpreter);
+
%include "../uscxml_ignores.i"
#if 0
@@ -240,6 +251,13 @@ import java.net.URL;
return invokers;
}
+ @Override
+ public boolean equals(Object other) {
+ if (other instanceof Interpreter) {
+ return equals((Interpreter)other);
+ }
+ return hashCode() == other.hashCode();
+ }
%}
%rename(getCompoundNative) uscxml::Data::getCompound();