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

# · Swig · 27 lines · 17 code · 10 blank · 0 comment · 0 complexity · f565a3b606fbe0ff67f1168f1827bc3d MD5 · raw file

  1. %module using2
  2. %warnfilter(SWIGWARN_PARSE_USING_UNDEF);
  3. using ::baz;
  4. %warnfilter(SWIGWARN_RUBY_WRONG_NAME) X::_FooImpl; /* Ruby, wrong class name */
  5. %inline %{
  6. namespace X {
  7. typedef int Integer;
  8. class _FooImpl {
  9. public:
  10. typedef Integer value_type;
  11. };
  12. typedef _FooImpl Foo;
  13. }
  14. namespace Y = X;
  15. using Y::Foo;
  16. int spam(Foo::value_type x) { return x; }
  17. %}