offbrand
A collection of generic, reference counted datastructures in C for C
Main Page
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Macros
Groups
include
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
17
typedef
struct
obdeque_iterator_struct
obdeque_iterator
;
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
70
obdeque_iterator
*
obdeque_head_iterator
(
const
obdeque
*
deque
);
71
85
obdeque_iterator
*
obdeque_tail_iterator
(
const
obdeque
*
deque
);
86
99
obdeque_iterator
*
obdeque_copy_iterator
(
const
obdeque_iterator
*it);
100
112
uint8_t
obdeque_iterate_next
(
const
obdeque
*
deque
,
obdeque_iterator
*it);
113
125
uint8_t
obdeque_iterate_prev
(
const
obdeque
*
deque
,
obdeque_iterator
*it);
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
151
void
obdeque_add_at_iterator
(
obdeque
*
deque
,
obdeque_iterator
*it,
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
212
obj
*
obdeque_obj_at_head
(
const
obdeque
*
deque
);
213
222
obj
*
obdeque_obj_at_tail
(
const
obdeque
*
deque
);
223
234
obj
*
obdeque_obj_at_iterator
(
const
obdeque
*
deque
,
const
obdeque_iterator
*it);
235
236
242
void
obdeque_remove_head
(
obdeque
*
deque
);
243
249
void
obdeque_remove_tail
(
obdeque
*
deque
);
250
262
void
obdeque_remove_at_iterator
(
obdeque
*
deque
,
obdeque_iterator
*it);
263
268
void
obdeque_clear
(
obdeque
*
deque
);
269
270
#endif
Generated on Sun Jun 30 2013 15:56:45 for offbrand by
1.8.4