25 bool array(
const char* name);
42 int allocate(
const char* name,
int start_count);
82 const T&
get(
int id,
int index);
105 int erase(
int id,
int index);
128 int insert(
int id,
const T& element,
int index);
137 int search(
int id,
const T& element);
164 void for(
int id,
void*
function);
173 bool set(
int id,
int index,
const T& new_element);
187 bool save(
int id,
const char* filename,
const char* option =
"xml");
195 const char*
tostring(
int id,
const char* option =
"xml");
int allocate(int start_count)
Constructs an array and allocates an initial chunk of memory.
bool close(int id)
free memory of array
void clear(int id)
Clears the array and deletes all allocated memory.
int push_back(int id, const T &element)
const T & get(int id, int index)
Direct const access operator.
int array()
allocate new memory of array
void reallocate(int id, int new_size)
Reallocates the array, make it bigger or smaller.
int erase(int id, int index)
int push_front(int id, const T &element)
int allocatedsize(int id)
Get amount of memory allocated.
int size(int id)
Get number of occupied elements of the array.
bool save(int id, const char *filename, const char *option="xml")
save all elements to file as xml or json
const char * tostring(int id, const char *option="xml")
save all elements and value to string buffer as xml or json
void log(int id)
print all elements in log window
int search(int id, const T &element)
int search_array(int id, const T &element)
void set_used(int id, int usedNow)
Sets the size of the array and allocates new elements if necessary.
bool set(int id, int index, const T &new_element)
update element in specific slot.
int insert(int id, const T &element, int index)