1 %module namespace_spaces 2 3 %{ 4 #if defined(__SUNPRO_CC) 5 #pragma error_messages (off, wbadasg) /* Assigning extern "C" ... */ 6 #endif 7 %} 8 9 %inline %{ 10 11 class Foo { 12 public: 13 Foo(); 14 ~Foo(); 15 typedef int Integer; 16 int blah(int x); 17 int spam(int x); 18 Integer bar(Integer x); 19 void (Foo:: *func_ptr) (int); 20 }; 21 Foo()22inline Foo :: Foo () {} 23 ~Foo()24inline Foo :: ~Foo () {} 25 26 inline int Foo blah(int x)27::blah(int x) { return 2*x; } 28 spam(int x)29inline int Foo :: spam(int x) { return -x; } 30 bar(Foo::Integer x)31inline Foo :: Integer Foo :: bar(Foo :: Integer x) { return x; } 32 33 %} 34