4
// STL containers test suite.
6
// std::complex, std::string, std::vector, std::set, std::deque,
7
// std::pair, std::map, std::multiset, std::multimap and IN/OUT functions
8
// for them, with C++ types.
19
%include std_multiset.i
22
%include std_multimap.i
23
%include std_complex.i
25
%template() std::vector<double>;
26
%template() std::pair<std::string, int>;
27
%template() std::pair<int,double>;
29
%template() std::vector< std::vector<double > > ;
30
%template(ccube) std::vector< std::vector< std::vector<double > > >;
35
std::vector<std::vector<std::vector<double > > >
38
ccube cident(const ccube& c)
49
%template(map_si) std::map<std::string, int>;
50
%template(pair_iC) std::pair<int, C*>;
51
%template(map_iC) std::map<int, C*>;
52
%template(mmap_si) std::multimap<std::string, int>;
53
%template(set_i) std::set<int>;
54
%template(multiset_i) std::multiset<int>;
55
%template(list_i) std::list<int>;
56
%template(deque_i) std::deque<int>;
58
%template(vector_b) std::vector<bool>;
59
%template(vector_i) std::vector<int>;
60
%template(vector_c) std::vector<std::complex<double> >;
61
%template(vector_ui) std::vector<unsigned int>;
63
%template(bmatrix) std::vector<std::vector<bool> >;
64
%template(imatrix) std::vector<std::vector<int> >;
65
%template(cmatrix) std::vector<std::vector<std::complex<double> > >;
67
%apply std::vector<int> *INOUT {std::vector<int> *INOUT2};
71
typedef std::vector<std::vector<int> > imatrix;
72
imatrix midenti(const imatrix& v)
77
typedef std::vector<std::vector<bool> > bmatrix;
78
bmatrix midentb(const bmatrix& v)
83
std::map<int,C*> mapidentc(const std::map<int,C*>& v)
88
std::map<int,int> mapidenti(const std::map<int,int>& v)
93
std::map<std::string,int> mapident(const std::map<std::string,int>& v)
98
std::multimap<std::string,int> mapident(const std::multimap<std::string,int>& v)
103
std::vector<int> vident(const std::vector<int>& v)
108
std::set<int> sident(const std::set<int>& v)
113
std::vector<unsigned int> videntu(const std::vector<unsigned int>& v)
119
int get_elem(const std::vector<int>& v, int index)
124
std::pair<int,double> pident(const std::pair<int,double>& p)
130
v_inout(std::vector<int> *INOUT) {
135
v_inout2(std::vector<int> *INOUT, std::vector<int> *INOUT2) {
136
std::swap(*INOUT, *INOUT2);
144
template <class C> struct Param
150
template <class C> struct Param
155
%template(Param_c) Param<std::complex<double> >;
158
int hello(Param<std::complex<double> > c)
168
A(int aa = 0) : a(aa)
175
%template() std::pair<A,int>;
176
%template(pair_iA) std::pair<int,A>;
177
%template(vector_piA) std::vector<std::pair<int,A> >;
181
std::pair<A,int> ident(std::pair<int,A> a, const std::pair<int,int>& b)
183
return std::pair<A,int>();
187
std::vector<std::pair<int,A> > pia_vident(std::vector<std::pair<int,A> > a )
201
%std_nodefconst_type(Foo);
203
%template(vector_Foo) std::vector<Foo>;
204
%template(deque_Foo) std::deque<Foo>;
205
%template(list_Foo) std::list<Foo>;