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

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

#
Swig | 62 lines | 42 code | 20 blank | 0 comment | 0 complexity | e6d41b231c294e94052462891842934c MD5 | raw file
 1%module abstract_inherit
 2
 3%warnfilter(SWIGWARN_TYPE_ABSTRACT) Spam;
 4%warnfilter(SWIGWARN_TYPE_ABSTRACT) Bar;
 5
 6%inline %{
 7
 8class Foo {
 9public:
10  virtual ~Foo()
11  {
12  }
13  
14  virtual int blah() = 0;
15};
16
17class Bar : public Foo { };
18
19class Spam: public Foo {
20public:
21   Spam() { }
22};
23
24
25template <class Type>
26class NRFilter {
27public:
28  virtual ~NRFilter()
29  {
30  }
31  
32protected:
33  virtual void do_filter() = 0;
34};
35
36template <class Type>
37class NRRCFilter : public NRFilter<Type>
38{
39};
40 
41
42template <class Type>
43class NRRCFilterpro : protected NRFilter<Type>
44{
45};
46
47
48template <class Type>
49class NRRCFilterpri : private NRFilter<Type>
50{
51};
52
53%}
54
55%template(NRFilter_i) NRFilter<int>;
56
57%template(NRRCFilter_i) NRRCFilter<int>;
58
59%template(NRRCFilterpro_i) NRRCFilterpro<int>;
60
61%template(NRRCFilterpri_i) NRRCFilterpri<int>;
62