PageRenderTime 89ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Swig | 41 lines | 34 code | 7 blank | 0 comment | 0 complexity | cefcf3e5446990acee250e49c0682d07 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module namespace_virtual_method
  2. %warnfilter(515);
  3. %inline %{
  4. namespace A {
  5. namespace B {
  6. class Foo;
  7. }
  8. namespace C {
  9. class Foo {
  10. public:
  11. Foo() { };
  12. virtual ~Foo() { };
  13. virtual int bar(const A::B::Foo &x) = 0;
  14. };
  15. }
  16. }
  17. namespace A {
  18. namespace C {
  19. class Spam : public Foo {
  20. public:
  21. Spam() { }
  22. virtual ~Spam() { }
  23. virtual int bar(const B::Foo &x) { return 1; }
  24. };
  25. }
  26. }
  27. %}
  28. %{
  29. namespace A {
  30. namespace B {
  31. class Foo { };
  32. }
  33. }
  34. %}