1 // Test for %typemap(ignore)
2 
3 %module ignore_parameter
4 
5 %typemap(in,numinputs=0) char* a "static const char* hi = \"hello\"; $1 = const_cast<char *>(hi);";
6 %typemap(in,numinputs=0) int bb "$1 = 101;";
7 %typemap(in,numinputs=0) double ccc "$1 = 8.8;";
8 
9 %typemap(freearg) char* a ""; // ensure freearg is not generated (needed for Java at least)
10 
11 %ignore unignorable;
12 
13 %inline %{
14 // global function tests
jaguar(char * a,int b,double c)15 char* jaguar(char* a, int b, double c) { return a; }
lotus(char * aa,int bb,double cc)16 int lotus(char* aa, int bb, double cc) { return bb; }
tvr(char * aaa,int bbb,double ccc)17 double tvr(char* aaa, int bbb, double ccc) { return ccc; }
ferrari(int bb)18 int ferrari(int bb) { return bb; }
fiat(int unignorable)19 int fiat(int unignorable) { return unignorable; }
20 
21 // member function tests
22 struct SportsCars {
daimlerSportsCars23   char* daimler(char* a, int b, double c) { return a; }
astonmartinSportsCars24   int astonmartin(char* aa, int bb, double cc) { return bb; }
bugattiSportsCars25   double bugatti(char* aaa, int bbb, double ccc) { return ccc; }
lamborghiniSportsCars26   int lamborghini(int bb) { return bb; }
maserattiSportsCars27   int maseratti(int unignorable) { return unignorable; }
28 };
29 
30 // constructor tests
31 struct MiniCooper {
MiniCooperMiniCooper32     MiniCooper(char* a, int b, double c) {}
33 };
34 struct MorrisMinor {
MorrisMinorMorrisMinor35     MorrisMinor(char* aa, int bb, double cc) {}
36 };
37 struct FordAnglia {
FordAngliaFordAnglia38     FordAnglia(char* aaa, int bbb, double ccc) {}
39 };
40 struct AustinAllegro {
AustinAllegroAustinAllegro41     AustinAllegro(int bb) {}
42 };
43 %}
44 
45 
46 
47