/tags/ttn-pre-libtool-1-4-3-upgrade/SWIG/Examples/test-suite/enum_scope.i

# · Swig · 16 lines · 13 code · 3 blank · 0 comment · 0 complexity · 09162322a0431793868d10a36220683b MD5 · raw file

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