summaryrefslogtreecommitdiffstats
path: root/src/bindings/swig/java/uscxml.i
blob: af979d0a952709c8389e6bd6bacf5cc388bfa022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
%module(directors="1", allprotected="1") uscxmlNativeJava

// import swig typemaps
//%include <arrays_java.i>
//%include <inttypes.i>

%include <stl.i>
%include <std_map.i>
%include <inttypes.i>
%include "stl_set.i"
%include "stl_list.i"

%include <boost_shared_ptr.i>


typedef uscxml::Data Data;
typedef uscxml::Event Event;
typedef uscxml::InvokeRequest InvokeRequest;
typedef uscxml::SendRequest SendRequest;

// disable warning related to unknown base class
#pragma SWIG nowarn=401
//%ignore boost::enable_shared_from_this;

%javaconst(1);

# %shared_ptr(uscxml::dom::Element);
# %shared_ptr(uscxml::dom::Executable);

%rename(equals) operator==; 
%rename(isValid) operator bool;
%ignore operator!=;
%ignore operator<;
%ignore operator=;
%ignore operator[];
%ignore operator std::list<Data>;
%ignore operator std::string;
%ignore operator std::map<std::string,Data>;


//**************************************************
// This ends up in the generated wrapper code
//**************************************************

%{

#include "../../../uscxml/Message.h"
#include "../../../uscxml/Factory.h"
#include "../../../uscxml/Interpreter.h"
#include "JavaInvoker.h"

using namespace uscxml;

#include "JavaInvoker.cpp"

%}

%rename(toString) operator<<;

%ignore uscxml::NumAttr;
%ignore uscxml::SCXMLParser;
%ignore uscxml::InterpreterImpl;

%ignore uscxml::Interpreter::getDelayQueue();

%ignore uscxml::JavaInvoker::create(InterpreterImpl*);

%template(DataMap) std::map<std::string, uscxml::Data>;
%template(DataList) std::list<uscxml::Data>;
%template(StringSet) std::set<std::string>;


%feature("director") uscxml::JavaInvoker;

//***********************************************
// Parse the header file to generate wrappers
//***********************************************

#define SWIGIMPORTED 1
%include "../../../uscxml/Factory.h"
%include "../../../uscxml/Message.h"
%include "../../../uscxml/Interpreter.h"
%include "JavaInvoker.h"