deque.pxd 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. cdef extern from "<deque>" namespace "std" nogil:
  2. cdef cppclass deque[T,ALLOCATOR=*]:
  3. ctypedef T value_type
  4. ctypedef ALLOCATOR allocator_type
  5. # these should really be allocator_type.size_type and
  6. # allocator_type.difference_type to be true to the C++ definition
  7. # but cython doesn't support deferred access on template arguments
  8. ctypedef size_t size_type
  9. ctypedef ptrdiff_t difference_type
  10. cppclass iterator:
  11. T& operator*()
  12. iterator operator++()
  13. iterator operator--()
  14. iterator operator+(size_type)
  15. iterator operator-(size_type)
  16. difference_type operator-(iterator)
  17. bint operator==(iterator)
  18. bint operator!=(iterator)
  19. bint operator<(iterator)
  20. bint operator>(iterator)
  21. bint operator<=(iterator)
  22. bint operator>=(iterator)
  23. cppclass reverse_iterator:
  24. T& operator*()
  25. reverse_iterator operator++()
  26. reverse_iterator operator--()
  27. reverse_iterator operator+(size_type)
  28. reverse_iterator operator-(size_type)
  29. difference_type operator-(reverse_iterator)
  30. bint operator==(reverse_iterator)
  31. bint operator!=(reverse_iterator)
  32. bint operator<(reverse_iterator)
  33. bint operator>(reverse_iterator)
  34. bint operator<=(reverse_iterator)
  35. bint operator>=(reverse_iterator)
  36. cppclass const_iterator(iterator):
  37. pass
  38. cppclass const_reverse_iterator(reverse_iterator):
  39. pass
  40. deque() except +
  41. deque(deque&) except +
  42. deque(size_t) except +
  43. deque(size_t, T&) except +
  44. #deque[input_iterator](input_iterator, input_iterator)
  45. T& operator[](size_t)
  46. #deque& operator=(deque&)
  47. bint operator==(deque&, deque&)
  48. bint operator!=(deque&, deque&)
  49. bint operator<(deque&, deque&)
  50. bint operator>(deque&, deque&)
  51. bint operator<=(deque&, deque&)
  52. bint operator>=(deque&, deque&)
  53. void assign(size_t, T&)
  54. void assign(input_iterator, input_iterator)
  55. T& at(size_t)
  56. T& back()
  57. iterator begin()
  58. const_iterator const_begin "begin"()
  59. void clear()
  60. bint empty()
  61. iterator end()
  62. const_iterator const_end "end"()
  63. iterator erase(iterator)
  64. iterator erase(iterator, iterator)
  65. T& front()
  66. iterator insert(iterator, T&)
  67. void insert(iterator, size_t, T&)
  68. void insert(iterator, input_iterator, input_iterator)
  69. size_t max_size()
  70. void pop_back()
  71. void pop_front()
  72. void push_back(T&)
  73. void push_front(T&)
  74. reverse_iterator rbegin()
  75. #const_reverse_iterator rbegin()
  76. reverse_iterator rend()
  77. #const_reverse_iterator rend()
  78. void resize(size_t)
  79. void resize(size_t, T&)
  80. size_t size()
  81. void swap(deque&)
  82. # C++11 methods
  83. void shrink_to_fit()