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

# · Swig · 16 lines · 15 code · 1 blank · 0 comment · 0 complexity · a7c7176d3cecf632dee839d00dcb3aee MD5 · raw file

  1. %module inherit_same_name
  2. %inline %{
  3. struct Base {
  4. Base() : MethodOrVariable(0) {}
  5. virtual ~Base() {}
  6. protected:
  7. int MethodOrVariable;
  8. };
  9. struct Derived : Base {
  10. virtual void MethodOrVariable() { Base::MethodOrVariable = 10; }
  11. };
  12. struct Bottom : Derived {
  13. void MethodOrVariable() {}
  14. };
  15. %}