stl.pxd 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. cdef extern from "<vector>" namespace std:
  2. cdef cppclass vector[TYPE]:
  3. #constructors
  4. __init__()
  5. __init__(vector&)
  6. __init__(int)
  7. __init__(int, TYPE&)
  8. __init__(iterator, iterator)
  9. #operators
  10. TYPE& __getitem__(int)
  11. TYPE& __setitem__(int, TYPE&)
  12. vector __new__(vector&)
  13. bool __eq__(vector&, vector&)
  14. bool __ne__(vector&, vector&)
  15. bool __lt__(vector&, vector&)
  16. bool __gt__(vector&, vector&)
  17. bool __le__(vector&, vector&)
  18. bool __ge__(vector&, vector&)
  19. #others
  20. void assign(int, TYPE)
  21. #void assign(iterator, iterator)
  22. TYPE& at(int)
  23. TYPE& back()
  24. iterator begin()
  25. int capacity()
  26. void clear()
  27. bool empty()
  28. iterator end()
  29. iterator erase(iterator)
  30. iterator erase(iterator, iterator)
  31. TYPE& front()
  32. iterator insert(iterator, TYPE&)
  33. void insert(iterator, int, TYPE&)
  34. void insert(iterator, iterator)
  35. int max_size()
  36. void pop_back()
  37. void push_back(TYPE&)
  38. iterator rbegin()
  39. iterator rend()
  40. void reserve(int)
  41. void resize(int)
  42. void resize(int, TYPE&) #void resize(size_type num, const TYPE& = TYPE())
  43. int size()
  44. void swap(container&)
  45. cdef extern from "<deque>" namespace std:
  46. cdef cppclass deque[TYPE]:
  47. #constructors
  48. __init__()
  49. __init__(deque&)
  50. __init__(int)
  51. __init__(int, TYPE&)
  52. __init__(iterator, iterator)
  53. #operators
  54. TYPE& operator[]( size_type index );
  55. const TYPE& operator[]( size_type index ) const;
  56. deque __new__(deque&);
  57. bool __eq__(deque&, deque&);
  58. bool __ne__(deque&, deque&);
  59. bool __lt__(deque&, deque&);
  60. bool __gt__(deque&, deque&);
  61. bool __le__(deque&, deque&);
  62. bool __ge__(deque&, deque&);
  63. #others
  64. void assign(int, TYPE&)
  65. void assign(iterator, iterator)
  66. TYPE& at(int)
  67. TYPE& back()
  68. iterator begin()
  69. void clear()
  70. bool empty()
  71. iterator end()
  72. iterator erase(iterator)
  73. iterator erase(iterator, iterator)
  74. TYPE& front()
  75. iterator insert(iterator, TYPE&)
  76. void insert(iterator, int, TYPE&)
  77. void insert(iterator, iterator, iterator)
  78. int max_size()
  79. void pop_back()
  80. void pop_front()
  81. void push_back(TYPE&)
  82. void push_front(TYPE&)
  83. iterator rbegin()
  84. iterator rend()
  85. void resize(int)
  86. void resize(int, TYPE&)
  87. int size()
  88. void swap(container&)