PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
Swig | 36 lines | 29 code | 7 blank | 0 comment | 0 complexity | 8c55993155237cf174db67129e7640c9 MD5 | raw file
 1%module abstract_access
 2
 3%warnfilter(SWIGWARN_LANG_DIRECTOR_ABSTRACT) A;
 4
 5%inline %{
 6class A {
 7public:
 8  virtual ~A()
 9  {
10  }
11
12private:
13	virtual int x() = 0;
14protected:
15	virtual int y() = 0;
16public:
17	virtual int z() = 0;
18	int do_x() { return x(); }
19};
20
21class B : public A {
22private:
23	virtual int x() { return y(); }
24};
25
26class C : public B {
27protected:
28	virtual int y() { return z(); }
29};
30
31class D : public C {
32private:
33	virtual int z() { return 1; }
34};
35
36%}