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

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

#
Swig | 33 lines | 26 code | 7 blank | 0 comment | 0 complexity | 4e878fa9d3520ef60ecb06f78df584a0 MD5 | raw file
 1%module smart_pointer_protected
 2
 3%inline %{
 4
 5  namespace hi
 6  {    
 7    struct A 
 8    {
 9      virtual ~A() { }
10      virtual int value(A*) = 0;
11      int index;
12    };    
13    
14    struct B : A 
15    {
16    protected:
17      int value(A*)
18      {
19	return 1;
20      }
21    };
22
23    struct C
24    {
25      hi::B* operator->() const { return new hi::B(); }
26    private:
27      int index;
28    };
29  }
30  
31
32%}
33