import source from 1.3.40
[external/swig.git] / Examples / test-suite / director_profile.i
1 %module(directors="1") director_profile
2
3 %include std_string.i
4
5 %feature("director") B;
6
7
8 %inline %{
9
10   class A  {
11   public:
12     A() {}
13   };
14
15   class B
16   { 
17     A aa;
18   public: 
19     B() {}
20
21     virtual A fn(const A* a) {
22       return *a;
23     }
24
25     virtual int vfi(int a) {
26       return a + 1;
27     }
28
29     int fi(int a) {
30       return vfi(a);
31     }
32
33     int fj(const A* a) {
34       return 10;
35     }
36
37     B* fk(int i) {
38       return this;
39     }
40
41     const char* fl(int i) {
42       return "hello";
43     }
44
45     virtual ~B()
46     {
47     }
48
49     static B* get_self(B *b) 
50     {
51       return b;
52     }
53
54     virtual std::string vfs(const std::string& a) {
55       return a;
56     }
57     
58     std::string fs(const std::string& a) {
59       return vfs(a);
60     }
61     
62   };
63
64 %}