diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
commit | bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch) | |
tree | 1d1df72c0541a59a81439842f46d95396d3e7189 /contrib/tools/cython/Cython/Includes/libcpp/vector.pxd | |
parent | 8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff) | |
download | ydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz |
add ymake export to ydb
Diffstat (limited to 'contrib/tools/cython/Cython/Includes/libcpp/vector.pxd')
-rw-r--r-- | contrib/tools/cython/Cython/Includes/libcpp/vector.pxd | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/contrib/tools/cython/Cython/Includes/libcpp/vector.pxd b/contrib/tools/cython/Cython/Includes/libcpp/vector.pxd new file mode 100644 index 0000000000..9b007dd0c7 --- /dev/null +++ b/contrib/tools/cython/Cython/Includes/libcpp/vector.pxd @@ -0,0 +1,88 @@ +cdef extern from "<vector>" namespace "std" nogil: + cdef cppclass vector[T,ALLOCATOR=*]: + ctypedef T value_type + ctypedef ALLOCATOR allocator_type + + # these should really be allocator_type.size_type and + # allocator_type.difference_type to be true to the C++ definition + # but cython doesn't support deferred access on template arguments + ctypedef size_t size_type + ctypedef ptrdiff_t difference_type + + cppclass iterator: + T& operator*() + iterator operator++() + iterator operator--() + iterator operator+(size_type) + iterator operator-(size_type) + difference_type operator-(iterator) + bint operator==(iterator) + bint operator!=(iterator) + bint operator<(iterator) + bint operator>(iterator) + bint operator<=(iterator) + bint operator>=(iterator) + cppclass reverse_iterator: + T& operator*() + reverse_iterator operator++() + reverse_iterator operator--() + reverse_iterator operator+(size_type) + reverse_iterator operator-(size_type) + difference_type operator-(reverse_iterator) + bint operator==(reverse_iterator) + bint operator!=(reverse_iterator) + bint operator<(reverse_iterator) + bint operator>(reverse_iterator) + bint operator<=(reverse_iterator) + bint operator>=(reverse_iterator) + cppclass const_iterator(iterator): + pass + cppclass const_reverse_iterator(reverse_iterator): + pass + vector() except + + vector(vector&) except + + vector(size_type) except + + vector(size_type, T&) except + + #vector[input_iterator](input_iterator, input_iterator) + T& operator[](size_type) + #vector& operator=(vector&) + bint operator==(vector&, vector&) + bint operator!=(vector&, vector&) + bint operator<(vector&, vector&) + bint operator>(vector&, vector&) + bint operator<=(vector&, vector&) + bint operator>=(vector&, vector&) + void assign(size_type, const T&) + void assign[input_iterator](input_iterator, input_iterator) except + + T& at(size_type) except + + T& back() + iterator begin() + const_iterator const_begin "begin"() + size_type capacity() + void clear() + bint empty() + iterator end() + const_iterator const_end "end"() + iterator erase(iterator) + iterator erase(iterator, iterator) + T& front() + iterator insert(iterator, const T&) except + + iterator insert(iterator, size_type, const T&) except + + iterator insert[Iter](iterator, Iter, Iter) except + + size_type max_size() + void pop_back() + void push_back(T&) except + + reverse_iterator rbegin() + const_reverse_iterator const_rbegin "crbegin"() + reverse_iterator rend() + const_reverse_iterator const_rend "crend"() + void reserve(size_type) + void resize(size_type) except + + void resize(size_type, T&) except + + size_type size() + void swap(vector&) + + # C++11 methods + T* data() + const T* const_data "data"() + void shrink_to_fit() |