2023-05-23 19:06:25 +02:00
|
|
|
{% macro render_pool_array_pxd(t) %}
|
|
|
|
@cython.final
|
|
|
|
cdef class {{ t.py_pool }}:
|
|
|
|
cdef {{ t.gd_pool }} _gd_data
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
cdef inline {{ t.py_pool }} new()
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
cdef inline {{ t.py_pool }} new_with_array(Array other)
|
|
|
|
|
|
|
|
# Operators
|
|
|
|
|
|
|
|
cdef inline bint operator_equal(self, {{ t.py_pool }} other)
|
2023-06-02 11:42:53 +02:00
|
|
|
cdef inline {{ t.py_value }} operator_getitem(self, pandemonium_int index)
|
|
|
|
cdef inline {{ t.py_pool }} operator_getslice(self, pandemonium_int start, pandemonium_int end, pandemonium_int step)
|
2023-05-23 19:06:25 +02:00
|
|
|
|
|
|
|
# Methods
|
|
|
|
|
|
|
|
cpdef inline {{ t.py_pool }} copy(self)
|
|
|
|
cpdef inline void append(self, {{ t.py_value }} data)
|
|
|
|
cdef inline void append_array(self, {{ t.py_pool }} array)
|
|
|
|
cpdef inline void invert(self)
|
|
|
|
cpdef inline void push_back(self, {{ t.py_value }} data)
|
2023-06-02 11:42:53 +02:00
|
|
|
cpdef inline void resize(self, pandemonium_int size)
|
|
|
|
cdef inline pandemonium_int size(self)
|
2023-05-23 19:06:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
@cython.final
|
|
|
|
cdef class {{ t.py_pool }}WriteAccess:
|
|
|
|
cdef {{ t.gd_value }} *_gd_ptr
|
|
|
|
|
|
|
|
{% endmacro %}
|