/branches/gsoc2009-ashishs99/Examples/test-suite/enum_scope_template.i

# · Swig · 20 lines · 14 code · 6 blank · 0 comment · 0 complexity · 772f8ccc83f2b253b73d2f43574bf5ea MD5 · raw file

  1. %module enum_scope_template
  2. #ifdef SWIGPHP
  3. // php internal naming conflict
  4. %rename (chops) chop;
  5. #endif
  6. %inline %{
  7. template<class T> class Tree {
  8. public:
  9. enum types {Oak, Fir, Cedar};
  10. void chop(enum types type) {}
  11. };
  12. enum Tree<int>::types chop(enum Tree<int>::types type) { return type; }
  13. %}
  14. %template(TreeInt) Tree<int>;