PageRenderTime 39ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Swig | 37 lines | 26 code | 11 blank | 0 comment | 0 complexity | 5ce620c7a135057901e49f791a373327 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module(directors="1") director_constructor
  2. %feature("director") Foo;
  3. %inline %{
  4. class Foo
  5. {
  6. public:
  7. int a;
  8. Foo(int i)
  9. {
  10. a=i;
  11. }
  12. virtual ~Foo() { }
  13. int do_test() {
  14. return test();
  15. }
  16. virtual int getit()
  17. {
  18. return a;
  19. }
  20. virtual void doubleit()
  21. {
  22. a = a * 2;
  23. }
  24. virtual int test() = 0;
  25. };
  26. %}