PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/class_scope_weird.i

#
Swig | 50 lines | 44 code | 6 blank | 0 comment | 0 complexity | 7d532d6253ce207c05d133b20856fc38 MD5 | raw file
 1%module class_scope_weird
 2
 3// Use this version with extra qualifiers to test SWIG as some compilers accept this
 4class Foo {
 5public:
 6  Foo::Foo(void) {}
 7  Foo::Foo(int) {}
 8  int Foo::bar(int x) {
 9    return x;
10  }
11};
12
13// Remove extra qualifiers for the compiler as some compilers won't compile the extra qaulification (eg gcc-4.1 onwards) 
14%{
15class Foo {
16public:
17  Foo(void) {}
18  Foo(int) {}
19  int bar(int x) {
20    return x;
21  }
22};
23%}
24
25%inline %{
26class Quat;
27class matrix4;
28class tacka3;
29%}
30
31// Use this version with extra qualifiers to test SWIG as some compilers accept this
32class Quat {
33public:
34  Quat::Quat(void){}  
35  Quat::Quat(float in_w, float x, float y, float z){}
36  Quat::Quat(const tacka3& axis, float angle){}
37  Quat::Quat(const matrix4& m){}
38};
39
40// Remove extra qualifiers for the compiler as some compilers won't compile the extra qaulification (eg gcc-4.1 onwards) 
41%{
42class Quat {
43public:
44  Quat(void){}  
45  Quat(float in_w, float x, float y, float z){}
46  Quat(const tacka3& axis, float angle){}
47  Quat(const matrix4& m){}
48};
49%}
50