set.pxd 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. from .utility cimport pair
  2. cdef extern from "<set>" namespace "std" nogil:
  3. cdef cppclass set[T]:
  4. ctypedef T value_type
  5. cppclass iterator:
  6. T& operator*()
  7. iterator operator++()
  8. iterator operator--()
  9. bint operator==(iterator)
  10. bint operator!=(iterator)
  11. cppclass reverse_iterator:
  12. T& operator*()
  13. iterator operator++()
  14. iterator operator--()
  15. bint operator==(reverse_iterator)
  16. bint operator!=(reverse_iterator)
  17. cppclass const_iterator(iterator):
  18. pass
  19. cppclass const_reverse_iterator(reverse_iterator):
  20. pass
  21. set() except +
  22. set(set&) except +
  23. #set(key_compare&)
  24. #set& operator=(set&)
  25. bint operator==(set&, set&)
  26. bint operator!=(set&, set&)
  27. bint operator<(set&, set&)
  28. bint operator>(set&, set&)
  29. bint operator<=(set&, set&)
  30. bint operator>=(set&, set&)
  31. iterator begin()
  32. const_iterator const_begin "begin"()
  33. void clear()
  34. size_t count(const T&)
  35. bint empty()
  36. iterator end()
  37. const_iterator const_end "end"()
  38. pair[iterator, iterator] equal_range(const T&)
  39. #pair[const_iterator, const_iterator] equal_range(T&)
  40. iterator erase(iterator)
  41. iterator erase(iterator, iterator)
  42. size_t erase(T&)
  43. iterator find(T&)
  44. const_iterator const_find "find"(T&)
  45. pair[iterator, bint] insert(const T&) except +
  46. iterator insert(iterator, const T&) except +
  47. void insert(iterator, iterator) except +
  48. #key_compare key_comp()
  49. iterator lower_bound(T&)
  50. const_iterator const_lower_bound "lower_bound"(T&)
  51. size_t max_size()
  52. reverse_iterator rbegin()
  53. const_reverse_iterator const_rbegin "rbegin"()
  54. reverse_iterator rend()
  55. const_reverse_iterator const_rend "rend"()
  56. size_t size()
  57. void swap(set&)
  58. iterator upper_bound(const T&)
  59. const_iterator const_upper_bound "upper_bound"(const T&)
  60. #value_compare value_comp()