PageRenderTime 49ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Swig | 16 lines | 15 code | 1 blank | 0 comment | 0 complexity | a7c7176d3cecf632dee839d00dcb3aee MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  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. %}