PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
Swig | 41 lines | 29 code | 12 blank | 0 comment | 0 complexity | b4e5af4ab2ab9a385137b10100facc53 MD5 | raw file
 1%module template_base_template
 2
 3%warnfilter(SWIGWARN_RUBY_WRONG_NAME) traits<double, double>; /* Ruby, wrong class name */
 4
 5%warnfilter(SWIGWARN_PARSE_EXPLICIT_TEMPLATE);
 6
 7%inline %{
 8  template <class ArgType, class ResType>
 9  struct traits
10  {
11    typedef ArgType arg_type;
12    typedef ResType res_type;
13  };
14 
15  template <class ArgType, class ResType>
16  struct Funktion
17  {
18  };
19
20  // Egad!
21  template <class AF, class AG>
22  struct Klass
23    : Funktion<typename traits<AF, AG>::arg_type,
24                                typename traits<AF, AG>::res_type>
25  {
26  };
27%}
28
29%{
30 template struct Funktion <double, double>;
31 template struct Klass <double, double>;
32%}
33 
34%template(traits_dd) traits <double, double>;
35%template(Funktion_dd) Funktion <double, double>;
36%template(Klass_dd) Klass <double, double>;
37
38
39
40
41