update swig on windows

This commit is contained in:
Bassem Girgis
2019-08-04 21:38:19 -05:00
parent 8414b7136b
commit 76ad52be58
5943 changed files with 91790 additions and 71892 deletions

View File

@@ -0,0 +1,40 @@
%module(threads=1) python_threads
%include <std_vector.i>
%inline %{
struct Action {
int val;
Action(int val = 0) : val(val) {}
};
%}
%template(VectorActionPtr) std::vector<Action *>;
%inline %{
#include <vector>
#include <iostream>
template <typename T> struct myStlVector : public std::vector<T> {
};
typedef myStlVector <Action *> ActionList;
%}
%template(ActionList) myStlVector<Action *>;
%inline %{
class ActionGroup
{
public:
ActionList &GetActionList () const {
static ActionList list;
list.push_back(new Action(1));
list.push_back(new Action(2));
list.push_back(new Action(3));
list.push_back(new Action(4));
return list;
}
};
%}