00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef EPR_PTRARRAY_H_INCL
00019 #define EPR_PTRARRAY_H_INCL
00020
00021 #ifdef __cplusplus
00022 extern "C"
00023 {
00024 #endif
00025
00026 #include <stdlib.h>
00027
00032 struct EPR_PtrArray
00033 {
00035 unsigned int capacity;
00037 unsigned int length;
00039 void** elems;
00040 };
00041
00042 typedef struct EPR_PtrArray EPR_SPtrArray;
00043
00051 EPR_SPtrArray* epr_create_ptr_array(unsigned int capacity);
00052
00053
00063 void epr_free_ptr_array(EPR_SPtrArray* ptr_array);
00064
00065
00075 void epr_free_char_ptr_array(EPR_SPtrArray* char_ptr_array);
00076
00086 int epr_add_ptr_array_elem(EPR_SPtrArray* ptr_array, void* elem);
00087
00088
00098 int epr_grow_ptr_array(EPR_SPtrArray* ptr_array, unsigned int capacity);
00099
00100
00106 unsigned int epr_get_ptr_array_length(const EPR_SPtrArray* ptr_array);
00107
00108
00114 unsigned int epr_get_ptr_array_capacity(const EPR_SPtrArray* ptr_array);
00115
00116
00123 void* epr_get_ptr_array_elem_at(const EPR_SPtrArray* ptr_array, unsigned int index);
00124
00125
00126 #ifdef __cplusplus
00127 }
00128 #endif
00129 #endif