telodendria/src/include/Array.h

36 lines
564 B
C
Raw Normal View History

2022-07-23 00:19:12 +00:00
#ifndef TELODENDRIA_ARRAY_H
#define TELODENDRIA_ARRAY_H
#include <stddef.h>
typedef struct Array Array;
extern Array *
ArrayCreate(void);
2022-07-23 00:19:12 +00:00
extern size_t
ArraySize(Array * array);
2022-07-23 00:19:12 +00:00
extern void *
ArrayGet(Array * array, size_t index);
2022-07-23 00:19:12 +00:00
extern int
ArrayInsert(Array *, void *value, size_t index);
2022-07-23 00:19:12 +00:00
extern int
ArrayAdd(Array * array, void *value);
2022-07-23 00:19:12 +00:00
extern void *
ArrayDelete(Array * array, size_t index);
2022-07-23 00:19:12 +00:00
2022-07-27 19:31:34 +00:00
extern void
ArraySort(Array *, int (*compare) (void *, void *));
2022-07-23 00:19:12 +00:00
extern void
ArrayFree(Array * array);
2022-07-23 00:19:12 +00:00
extern int
ArrayTrim(Array * array);
2022-07-23 00:19:12 +00:00
#endif