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

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

#
Swig | 40 lines | 32 code | 8 blank | 0 comment | 0 complexity | 45f0d34eb41c3235cb3cea647408c807 MD5 | raw file
 1%module(directors="1") director_unroll
 2%{
 3#include <string>
 4
 5class Foo {
 6public:
 7	virtual ~Foo() {}
 8	virtual std::string ping() { return "Foo::ping()"; }
 9	virtual std::string pong() { return "Foo::pong();" + ping(); }
10};
11
12class Bar {
13private:
14	Foo *foo;
15public:
16	void set(Foo *x) { foo = x; }
17	Foo *get() { return foo; }
18};
19
20%}
21
22%include "std_string.i"
23
24%feature("director") Foo;
25
26class Foo {
27public:
28	virtual ~Foo() {}
29	virtual std::string ping() { return "Foo::ping()"; }
30	virtual std::string pong() { return "Foo::pong();" + ping(); }
31};
32
33class Bar {
34private:
35	Foo *foo;
36public:
37	void set(Foo *x) { foo = x; }
38	Foo *get() { return foo; }
39};
40