offbrand
A collection of generic, reference counted datastructures in C for C
 All Classes Files Functions Variables Typedefs Macros Groups
obdeque.h
Go to the documentation of this file.
1 
8 #ifndef OBDEQUE_H
9 #define OBDEQUE_H
10 
11 #include "offbrand.h"
12 
14 typedef struct obdeque_struct obdeque;
15 
18 
19 
20 /* PUBLIC METHODS */
21 
26 obdeque * obdeque_new(void);
27 
36 obdeque * obdeque_copy(const obdeque *to_copy);
37 
46 uint8_t obdeque_is_empty(const obdeque *deque);
47 
55 uint64_t obdeque_length(const obdeque *deque);
56 
71 
86 
100 
113 
126 
133 void obdeque_add_at_head(obdeque *deque, obj *to_add);
134 
141 void obdeque_add_at_tail(obdeque *deque, obj *to_add);
142 
152  obj *to_add);
153 
163 obdeque * obdeque_join(const obdeque *d1, const obdeque *d2);
164 
175 uint8_t obdeque_find_obj(const obdeque *deque, const obj *to_find);
176 
189 void obdeque_sort(obdeque *deque, int8_t order);
190 
201 void obdeque_sort_with_funct(obdeque *deque, int8_t order,
202  ob_compare_fptr funct);
203 
213 
223 
235 
236 
243 
250 
263 
269 
270 #endif