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

# · Swig · 34 lines · 14 code · 10 blank · 10 comment · 0 complexity · e7db0b956e40f2e58bae5e9fc86a4e86 MD5 · raw file

  1. /*
  2. * a test of set containers.
  3. * Languages should define swig::LANGUAGE_OBJ to be
  4. * an entity of their native pointer type which can be
  5. * included in a STL container.
  6. *
  7. * For example:
  8. * swig::LANGUAGE_OBJ is GC_VALUE in Ruby
  9. * swig::LANGUAGE_OBJ is SwigPtr_PyObject in python
  10. */
  11. %module li_std_set
  12. %include <std_string.i>
  13. %include <std_set.i>
  14. %include <std_multiset.i>
  15. %include <std_vector.i>
  16. %template(set_string) std::set<std::string>;
  17. %template(set_int) std::multiset<int>;
  18. %template(v_int) std::vector<int>;
  19. #if defined(SWIGRUBY)
  20. %template(LanguageSet) std::set<swig::LANGUAGE_OBJ>;
  21. #endif
  22. #if defined(SWIGPYTHON)
  23. %template(pyset) std::set<swig::SwigPtr_PyObject>;
  24. #endif