1 %module csharp_attributes
3 // Test the inattributes and outattributes typemaps
4 %typemap(cstype, outattributes="[IntOut]", inattributes="[IntIn]") int "int"
5 %typemap(imtype, outattributes="[IntegerOut]", inattributes="[IntegerIn]") int "int"
10 Stations(int myInt) { }
11 int Reading(int myInt) { return myInt; }
12 static int Swindon(int myInt) { return myInt; }
15 int GlobalFunction(int myInt) { return myInt; }
19 // Test the attributes feature
20 %csattributes MoreStations::MoreStations() "[InterCity1]"
21 %csattributes MoreStations::Chippenham() "[InterCity2]"
22 %csattributes MoreStations::Bath() "[InterCity3]"
23 %csattributes Bristol "[InterCity4]"
24 %csattributes WestonSuperMare "[InterCity5]"
25 %csattributes Wales "[InterCity6]"
26 %csattributes Paddington() "[InterCity7]"
27 %csattributes DidcotParkway "[InterCity8]"
29 %typemap(csattributes) MoreStations "[Eurostar1]"
30 %typemap(csattributes) MoreStations::Wales "[Eurostar2]"
31 %typemap(csattributes) Cymru "[Eurostar3]"
35 MoreStations() : Bristol(0) {}
39 static double WestonSuperMare;
40 enum Wales { Cardiff = 1, Swansea };
44 enum Cymru { Llanelli };
46 double MoreStations::WestonSuperMare = 0.0;