1#ifndef GIM_ARRAY_H_INCLUDED
2#define GIM_ARRAY_H_INCLUDED
37#define GIM_ARRAY_GROW_INCREMENT 2
38#define GIM_ARRAY_GROW_FACTOR 2
57 if (
m_data == NULL)
return;
104 while (
m_size > start_range)
292 if (call_constructor)
Very simple array container with fast access and simd memory.
void erase(GUINT index)
fast erase
const T * pointer() const
const T & operator[](size_t i) const
gim_array(GUINT reservesize)
T * get_pointer_at(GUINT i)
void push_back(const T &obj)
bool reserve(GUINT size)
public operations
const T * get_pointer_at(GUINT i) const
const T & at(GUINT i) const
void erase_sorted_mem(GUINT index)
void push_back_memcpy(const T &obj)
void erase_sorted(GUINT index)
void swap(GUINT i, GUINT j)
bool resizeData(GUINT newsize)
void pop_back_mem()
Simply decrease the m_size, doesn't call the deleted element destructor.
void insert(const T &obj, GUINT index)
void resize(GUINT size, bool call_constructor=true, const T &fillData=T())
void destroyData()
protected operations
void clear_range(GUINT start_range)
void push_back_mem()
Simply increase the m_size, doesn't call the new element constructor.
void insert_mem(GUINT index)
#define GIM_ARRAY_GROW_INCREMENT
#define GIM_ARRAY_GROW_FACTOR
void * gim_alloc(size_t size)
Standar Memory functions.
void * gim_realloc(void *ptr, size_t oldsize, size_t newsize)
void gim_simd_memcpy(void *dst, const void *src, size_t copysize)
void gim_swap_elements(T *_array, size_t _i, size_t _j)