PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/inout.i

#
Swig | 48 lines | 38 code | 10 blank | 0 comment | 0 complexity | ea95e098c95eeaf01d260f3ded08d27b MD5 | raw file
 1%module inout
 2
 3%include "typemaps.i"
 4%include "std_pair.i"
 5
 6%{
 7  inline void AddOne3(double* a, double* b, double* c) {
 8    *a += 1;
 9    *b += 1;
10    *c += 1;
11  }
12
13  inline void AddOne1(double* a) {
14    *a += 1;
15  } 
16
17  inline void AddOne1p(std::pair<double, double>* p) {
18    p->first += 1;
19    p->second += 1;
20  } 
21
22  inline void AddOne2p(std::pair<double, double>* p,double* a) {
23    *a += 1;
24    p->first += 1;
25    p->second += 1;
26  } 
27
28  inline void AddOne3p(double* a, std::pair<double, double>* p,double* b) {
29    *a += 1;
30    *b += 1;
31    p->first += 1;
32    p->second += 1;
33  } 
34
35  inline void AddOne1r(double& a) {
36    a += 1;
37  } 
38
39%}
40
41%template() std::pair<double, double>;
42
43void AddOne1(double* INOUT);
44void AddOne3(double* INOUT, double* INOUT, double* INOUT);
45void AddOne1p(std::pair<double, double>* INOUT);
46void AddOne2p(std::pair<double, double>* INOUT, double* INOUT);
47void AddOne3p(double* INOUT, std::pair<double, double>* INOUT, double* INOUT);
48void AddOne1r(double& INOUT);