summaryrefslogtreecommitdiff
path: root/Examples/test-suite/rename1.i
blob: 92e6b349461516e973457e896c62fac3ca3c67ff (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
// Test %rename directive in global namespace by fully qualifying types
%module rename1

// Note: Space:: qualifier
%rename(opIntPtrA) Space::XYZ::operator NotXYZ<int>*() const;
%rename(opIntPtrB) Space::XYZ::operator XYZ<int>*() const;

%rename(opAnother1) Space::XYZ::operator Another() const;
%rename(opAnother2) Space::XYZ<int>::operator Another() const;
%rename(opAnother3) Space::XYZ<Space::Klass>::operator Another() const;
%rename(opAnother4) Space::XYZ<Space::Enu>::operator Another() const;

%rename(tMethod1) Space::XYZ::templateT(T i);
%rename(tMethod2) Space::XYZ<int>::templateT(int i);
%rename(tMethod3) Space::XYZ<Space::Klass>::templateT(Space::Klass i);
%rename(tMethod4) Space::XYZ<Space::Enu>::templateT(Space::Enu i);

%rename(tMethodNotXYZ1) Space::XYZ::templateNotXYZ(NotXYZ<T>);
%rename(tMethodNotXYZ2) Space::XYZ<int>::templateNotXYZ(NotXYZ<int>);
%rename(tMethodNotXYZ3) Space::XYZ<Space::Klass>::templateNotXYZ(NotXYZ<Space::Klass>);
%rename(tMethodNotXYZ4) Space::XYZ<Space::Enu>::templateNotXYZ(NotXYZ<Space::Enu>);

%rename(tMethodXYZ1) Space::XYZ::templateXYZ(XYZ<T>);
%rename(tMethodXYZ2) Space::XYZ<int>::templateXYZ(XYZ<int>);
%rename(tMethodXYZ3) Space::XYZ<Space::Klass>::templateXYZ(XYZ<Space::Klass>);
%rename(tMethodXYZ4) Space::XYZ<Space::Enu>::templateXYZ(XYZ<Space::Enu>);

%rename(opT1) Space::XYZ::operator T();
%rename(opT2) Space::XYZ<int>::operator int();
%rename(opT3) Space::XYZ<Space::Klass>::operator Space::Klass();
%rename(opT4) Space::XYZ<Space::Enu>::operator Space::Enu();

%rename(opNotXYZ1) Space::XYZ::operator NotXYZ<T>() const;
%rename(opNotXYZ2) Space::XYZ<int>::operator NotXYZ<int>() const;
%rename(opNotXYZ3) Space::XYZ<Space::Klass>::operator NotXYZ<Space::Klass>() const;
%rename(opNotXYZ4) Space::XYZ<Space::Enu>::operator NotXYZ<Space::Enu>() const;


%rename(methodABC) Space::ABC::method(ABC a) const;
%rename(opABC) Space::ABC::operator ABC*() const;
%rename(methodKlass) Space::ABC::method(Klass k) const;
%rename(opKlass) Space::ABC::operator Klass() const;

%{
#include "rename.h"
%}
%include "rename.h"

%template(XYZInt) Space::XYZ<int>;
%template(XYZDouble) Space::XYZ<double>;
%template(XYZKlass) Space::XYZ<Space::Klass>;
%template(XYZEnu) Space::XYZ<Space::Enu>;

%template(NotXYZInt) Space::NotXYZ<int>;
%template(NotXYZDouble) Space::NotXYZ<double>;
%template(NotXYZKlass) Space::NotXYZ<Space::Klass>;
%template(NotXYZEnu) Space::NotXYZ<Space::Enu>;