7 template<typename type>
15 Array(uint32_t _size) :
16 array((type *) ourcalloc(1, sizeof(type) * _size)),
21 Array(type *_array, uint _size) :
22 array((type *) ourmalloc(sizeof(type) * _size)),
24 memcpy(array, _array, _size * sizeof(type));
27 Array(Array<type> *_array) :
28 array((type *) ourmalloc(sizeof(type) * _array->size)),
30 memcpy(array, _array->array, size * sizeof(type));
33 void init(uint _size) {
34 array = (type *) ourcalloc(1, sizeof(type) * _size);
38 void init(type *_array, uint _size) {
39 array = (type *) ourmalloc(sizeof(type) * _size);
41 memcpy(array, _array, _size * sizeof(type));
44 void init(Array<type> *_array) {
45 array = (type *) ourmalloc(sizeof(type) * _array->size);
47 memcpy(array, _array->array, size * sizeof(type));
55 type get(uint index) const {
59 void set(uint index, type item) {
67 type *internalArray() {