开始设计
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#ifndef INCLUDED_C_ARRAYLIST_H
|
||||
#define INCLUDED_C_ARRAYLIST_H
|
||||
|
||||
#ifndef INCLUDED_C_BASE_H
|
||||
#include <c_Base.h>
|
||||
#endif /*INCLUDED_C_BASE_H*/
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------------------------ */
|
||||
/* */
|
||||
|
||||
|
||||
typedef struct {
|
||||
void* array;
|
||||
int obj_size;
|
||||
c_size_t capacity;
|
||||
c_size_t size;
|
||||
}c_ArrayList_t;
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------------------------ */
|
||||
/* */
|
||||
|
||||
c_err_t c_ArrayList_Init(c_ArrayList_t* self, c_size_t obj_size, c_size_t capacity);
|
||||
|
||||
void c_ArrayList_Destroy(c_ArrayList_t* self);
|
||||
|
||||
c_err_t c_ArrayList_Add(c_ArrayList_t* self, void* obj);
|
||||
|
||||
void* c_ArrayList_Get(c_ArrayList_t* self, c_size_t index);
|
||||
|
||||
c_err_t c_ArrayList_Remove(c_ArrayList_t* self, c_size_t index);
|
||||
|
||||
#endif /*INCLUDED_C_ARRAYLIST_H*/
|
||||
Reference in New Issue
Block a user