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

# · Swig · 21 lines · 12 code · 9 blank · 0 comment · 0 complexity · 0121db4377cfbd29452d2fa5f3a1ab52 MD5 · raw file

  1. %module template_ns3
  2. %warnfilter(SWIGWARN_RUBY_WRONG_NAME) foo::bar<int>; /* Ruby, wrong class name */
  3. %inline %{
  4. namespace foo {
  5. typedef int Integer;
  6. template<class T> class bar {
  7. public:
  8. Integer test(Integer x) { return x; }
  9. };
  10. }
  11. %}
  12. %template(bari) foo::bar<int>;