/tags/rel-1.3.35/Examples/test-suite/smart_pointer_const.i
# · Swig · 19 lines · 15 code · 4 blank · 0 comment · 0 complexity · e7e2e22d3af02d30da04e031ad19b606 MD5 · raw file
- %module smart_pointer_const
- %inline %{
- struct Foo {
- int x;
- int getx() const { return x; }
- };
- class Bar {
- Foo *f;
- public:
- Bar(Foo *f) : f(f) { }
- Foo *operator->() {
- return f;
- }
- };
- %}