summaryrefslogtreecommitdiff
path: root/Examples/test-suite/director_multiple_inheritance.i
blob: ff50cfeba3fe8f829b2c3511db50a85bb67789c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//%module(ruby_minherit="1") multiple_inheritance
%module(directors="1") director_multiple_inheritance

%feature("director") A;
%feature("director") B;
%feature("director") C;
%feature("director") D;

%inline %{

class A {
public:
    virtual ~A() { }
    virtual int testA();
};

class B: virtual public A {
public:
    virtual ~B() { }
    virtual int testB();
};

class C: virtual public A {
public:
    virtual ~C() { }
    virtual int testC();
};

class D: virtual public A {
public:
    virtual ~D() { }
    virtual int testD();
};

class E {
public:
    virtual ~E() { }
    virtual int testE(B*);
};

class F {
public:
    virtual ~F() { }
    virtual int testF(C*);
};

class T {
public:
    virtual ~T() { }
    virtual int testT(D*);
};

%}

%{

int A::testA() { return 1; }

int B::testB() { return 2; }

int C::testC() { return 3; }

int D::testD() { return 4; }

int E::testE(B*) { return 5; }

int F::testF(C*) { return 6; }

int T::testT(D*) { return 20; }

%}