dgCommon.i 1.29 KB
Newer Older
lambrechts's avatar
lambrechts committed
1
2
3
4
5
6
7
%module dgCommon

%include std_string.i
%include std_vector.i
%include std_map.i
%include std_pair.i

Jonathan Lambrechts's avatar
Jonathan Lambrechts committed
8
9
10
11
%{
  #undef HAVE_DLOPEN
  #include "dgConfig.h"
  #include "fullMatrix.h"
12
  #include "dgFullMatrix.h"
Jonathan Lambrechts's avatar
Jonathan Lambrechts committed
13
14
%}

15
%rename("_print") "print";
16
17
%rename("_in") "in";
%rename("_from") "from";
lambrechts's avatar
lambrechts committed
18
%rename("_operator_assign") *::operator=;
19
%include "dgConfig.h"
lambrechts's avatar
lambrechts committed
20

Jonathan Lambrechts's avatar
Jonathan Lambrechts committed
21
22
23
%ignore fullMatrix<double>::operator()(int, int);
%ignore fullVector<double>::operator()(int);
%include "fullMatrix.h"
24
%include "dgFullMatrix.h"
Jonathan Lambrechts's avatar
Jonathan Lambrechts committed
25
26
%template(fullMatrixDouble) fullMatrix<double>;
%template(fullVectorDouble) fullVector<double>;
27
28
%include "dgFullMatrix.h"
%template(dgFullMatrixDouble) dgFullMatrix<double>;
Jonathan Lambrechts's avatar
Jonathan Lambrechts committed
29
30
31
%import "dgtypemaps.i"


lambrechts's avatar
lambrechts committed
32
33
34
35
36
namespace std {
  %template(IntVector) vector<int>;
  %template(DoubleVector) vector<double, std::allocator<double> >;
  %template(StringVector) vector<std::string, std::allocator<std::string> >;
  %template(MapStringVectorDouble) map<std::string, std::vector<double> >;
37
  %template(MapStringInt) map<std::string, int >;
Jonathan Lambrechts's avatar
Jonathan Lambrechts committed
38
  %template(MapIntString) map<int, std::string >;
lambrechts's avatar
lambrechts committed
39
40
41
42
43
  %template(MapStringDouble) map<std::string, double>;
  %template(MapIntInt) std::map< int,int,std::less< int >,std::allocator< std::pair< int const,int > > >;
  %template(PairIntInt) pair<int, int>;
  %template(VectorPairIntInt) vector<pair<int, int> >;
}