import source from 1.3.40
[external/swig.git] / Examples / test-suite / template_specialization_enum.i
1 %module template_specialization_enum
2
3 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) Hello;    /* Ruby, wrong class name */
4 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) Hi;       /* Ruby, wrong class name */
5
6
7 %inline %{
8
9   enum Hello 
10   {
11     hi, hello
12   };
13   
14
15   template <Hello, class A>
16     struct C
17     {
18     };
19   
20
21   template <Hello, class BB>
22     struct Base
23     {
24     };  
25   
26   
27   template <class A>
28     struct C<hello , A>  : Base<hello, A>
29     {
30       int fhello()
31       {
32         return hello;
33       }
34       
35     protected:
36       C()
37       {
38       }
39     };
40   
41
42   template <class A>
43     struct C<hi , A> : Base<hi, A>
44     {
45       int fhi()
46       {
47         return hi;
48       }
49
50     protected:
51       C()
52       {
53       }
54     };
55   
56       
57 %}
58
59 %template(Base_dd) Base<hi, int>;
60 %template(Base_ii) Base<hello, int>;
61
62 %template(C_i) C<hi, int>;
63 %template(C_d) C<hello, int>;