PageRenderTime 30ms CodeModel.GetById 19ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1.3.35/Examples/test-suite/template_extend1.i

#
Swig | 26 lines | 20 code | 6 blank | 0 comment | 0 complexity | e812e6f526bcfabba7aed2d224b23c00 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1// One of Luigi's evil tests
 2
 3%module template_extend1
 4
 5%warnfilter(SWIGWARN_RUBY_WRONG_NAME) Baz<long>;	// Ruby, wrong class name
 6%warnfilter(SWIGWARN_RUBY_WRONG_NAME) Baz<double>;	// Ruby, wrong class name
 7
 8%{
 9namespace Quux {
10  template <class T> class Baz {};
11}
12%}
13
14namespace Quux {  
15template <class T> class Baz {}; 
16 
17%template (lBaz) Baz<long>; 
18%extend Baz<long> { 
19     char *foo(void) { return (char *) "lBaz::foo"; }
20} 
21 
22%template (dBaz) Baz<double>; 
23%extend Baz<double> { 
24     char *foo(void) { return (char *) "dBaz::foo"; }
25} 
26}