/tags/rel-1-3-25/SWIG/Examples/test-suite/using_namespace.i
Swig | 57 lines | 44 code | 13 blank | 0 comment | 0 complexity | ee64d33a274963cb4e009101b3999db3 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
1%module(ruby_minherit="1") using_namespace 2 3%warnfilter(801) hi::hi0; /* Ruby, wrong class name */ 4%warnfilter(801) hi::hi1; /* Ruby, wrong class name */ 5 6%warnfilter(813,833) Hi<hello::Hello, hi::hi0>; // C#, Java multiple inheritance 7 8%inline %{ 9 namespace hello 10 { 11 struct Hello 12 { 13 }; 14 15 template <class _T1, class _T2> 16 struct Hi : _T1, _T2 17 { 18 int value1() const 19 { 20 return 1; 21 } 22 23 int value2() const 24 { 25 return 2; 26 } 27 }; 28 } 29 30 namespace hi 31 { 32 33 struct hi0 34 { 35 }; 36 37 } 38%} 39 40namespace hello 41{ 42 %template(Hi_hi0) Hi<hello::Hello, hi::hi0>; 43} 44 45 46%inline %{ 47 namespace hi 48 { 49 struct hi1 : private hello::Hi< hello::Hello, hi0 > 50 { 51 using hello::Hi< hello::Hello, hi::hi0 >::value1; 52 using hello::Hi< hello::Hello, hi0 >::value2; 53 }; 54 55 } 56 57%}