PageRenderTime 6ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
Swig | 40 lines | 32 code | 8 blank | 0 comment | 0 complexity | 75648f56e215e12734af9fa6d8e13e46 MD5 | raw file
 1%module(ruby_minherit="1") evil_diamond_prop
 2
 3%warnfilter(SWIGWARN_RUBY_WRONG_NAME) foo;		// Ruby, wrong class name
 4%warnfilter(SWIGWARN_RUBY_WRONG_NAME) bar;		// Ruby, wrong class name
 5%warnfilter(SWIGWARN_RUBY_WRONG_NAME) baz;		// Ruby, wrong class name
 6%warnfilter(SWIGWARN_RUBY_WRONG_NAME,
 7	    SWIGWARN_JAVA_MULTIPLE_INHERITANCE,
 8	    SWIGWARN_CSHARP_MULTIPLE_INHERITANCE,
 9	    SWIGWARN_D_MULTIPLE_INHERITANCE,
10	    SWIGWARN_PHP_MULTIPLE_INHERITANCE) spam;	// Ruby, wrong class name - C# & Java, PHP multiple inheritance
11
12%inline %{
13
14class foo { 
15  public:
16    int _foo;
17    foo() : _foo(1) {}
18};
19
20class bar : public foo {
21  public:
22    int _bar;
23    bar() : _bar(2) {}
24};
25
26class baz : public foo {
27  public:
28    int _baz;
29    baz() : _baz(3) {}
30};
31
32class spam : public bar, public baz {
33  public:
34    int _spam;
35    spam() : _spam(4) {}
36};
37
38foo *test(foo *f) { return f; }
39%}
40