gdnative_python/generation/pool_arrays_templates/pool_x_array.tmpl.pxd

34 lines
1016 B
Cython
Raw Normal View History

{% 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)
# 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)
@cython.final
cdef class {{ t.py_pool }}WriteAccess:
cdef {{ t.gd_value }} *_gd_ptr
{% endmacro %}