/trunk/Examples/ruby/overloading/example.i

# · Swig · 24 lines · 11 code · 6 blank · 7 comment · 0 complexity · 1dfe4fda6fade0c6b5db68a3ce6f3894 MD5 · raw file

  1. %module example
  2. %{
  3. #include "example.h"
  4. %}
  5. /**
  6. * These overloaded declarations conflict with other overloads (as far as
  7. * SWIG's Ruby module's implementation for overloaded methods is concerned).
  8. * One option is use the %rename directive to rename the conflicting methods;
  9. * here, we're just using %ignore to avoid wrapping some of the overloaded
  10. * functions altogether.
  11. */
  12. %ignore Bar::Bar(Bar *);
  13. %ignore Bar::Bar(long);
  14. %ignore Bar::foo(const Bar&);
  15. %ignore Bar::foo(long);
  16. %ignore ::foo(const Bar&);
  17. %ignore ::foo(int);
  18. %include example.h