28 lines
728 B
C
28 lines
728 B
C
#ifndef INCLUDED_C_PTRARRAYBAG_H
|
|||
|
|
#define INCLUDED_C_PTRARRAYBAG_H
|
||
|
|
|
||
|
|
#ifndef INCLUDED_C_TYPES_H
|
||
|
|
#include <c_Types.h>
|
||
|
|
#endif /*INCLUDED_C_TYPES_H*/
|
||
|
|
|
||
|
|
/* ------------------------------------------------------------------------------------------------------------------ */
|
||
|
|
/* */
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
void** array;
|
||
|
|
c_size_t capacity;
|
||
|
|
c_size_t size;
|
||
|
|
}c_PtrArrayBag_t;
|
||
|
|
|
||
|
|
c_err_t c_PtrArrayBag_Init(c_PtrArrayBag_t* self, c_size_t capacity);
|
||
|
|
|
||
|
|
void c_PtrArrayBag_Destroy(c_PtrArrayBag_t* self);
|
||
|
|
|
||
|
|
c_err_t c_PtrArrayBag_Add(c_PtrArrayBag_t* self, void* item);
|
||
|
|
|
||
|
|
void* c_PtrArrayBag_Get(c_PtrArrayBag_t* self, c_size_t index);
|
||
|
|
|
||
|
|
c_err_t c_PtrArrayBag_Remove(c_PtrArrayBag_t* self, c_size_t index);
|
||
|
|
|
||
|
|
#endif /*INCLUDED_C_PTRARRAYBAG_H*/
|