PageRenderTime 49ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/ttn-post-libtool-1-4-3-upgrade/SWIG/Examples/test-suite/cpp_enum_scope.i

#
Swig | 17 lines | 12 code | 5 blank | 0 comment | 0 complexity | 768dfe7e01dc297e8360e1ff25a55d21 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module cpp_enum_scope
  2. // This tests to make sure default arguments are handled correctly
  3. // when scoped.
  4. %inline %{
  5. enum flavor { BITTER, SWEET };
  6. class Foo {
  7. public:
  8. enum speed { FAST, SLOW };
  9. // Note: default values should be Foo::FAST and SWEET
  10. void blah(speed s = FAST, flavor f = SWEET) {};
  11. };
  12. %}