cvx
Loading...
Searching...
No Matches
queue.h
Go to the documentation of this file.
1
#include "cvx/fallback.h"
2
3
// clang-format off
4
#ifndef V
5
#error "cvx/interface/queue.h requires V to be defined (the element type, e.g. #define V int)"
6
#endif
7
#ifndef INTERFACE
8
#error "cvx/interface/queue.h requires INTERFACE to be defined (the struct name, e.g. #define INTERFACE my_queue)"
9
#endif
10
// clang-format on
11
12
#include "
cvx/core.h
"
13
14
struct
VTABLE(INTERFACE)
15
{
16
// constructors and destructors
17
void (*drop)(
cvx_container
*);
18
// operations
19
void (*enqueue)(
cvx_container
*, V);
20
V (*dequeue)(
cvx_container
*);
21
// state
22
size_t (*count)(
cvx_container
*);
23
};
24
25
struct
INTERFACE
26
{
27
cvx_container
*instance;
28
struct
VTABLE(INTERFACE) * vtable;
29
};
30
31
#include "cvx/undef.h"
core.h
INTERFACE
Definition
deque.h:30
cvx_container
Definition
binary_heap.h:135
cvx
interface
queue.h
Generated by
1.9.8