offbrand
A collection of generic, reference counted datastructures in C for C
 All Classes Files Functions Variables Typedefs Macros Groups
obvector.h
Go to the documentation of this file.
1 
7 #ifndef OBVECTOR_H
8 #define OBVECTOR_H
9 
10 #include "offbrand.h"
11 
13 typedef struct obvector_struct obvector;
14 
15 
16 /* PUBLIC METHODS */
17 
26 obvector * obvector_new(uint32_t initial_capacity);
27 
38 obvector * obvector_copy(const obvector *to_copy);
39 
48 uint32_t obvector_length(const obvector *v);
49 
68 void obvector_store_at_index(obvector *v, obj *to_add, int64_t index);
69 
88 obj * obvector_obj_at_index(const obvector *v, int64_t index);
89 
99 void obvector_concat(obvector *destination, obvector *to_append);
100 
115 uint8_t obvector_find_obj(const obvector *v, const obj *to_find);
116 
131 void obvector_sort(obvector *v, int8_t order);
132 
146 void obvector_sort_with_funct(obvector *v, int8_t order, ob_compare_fptr funct);
147 
152 void obvector_clear(obvector *v);
153 
154 #endif
155