ATLAS Offline Software
queue.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (c) 2005-2008, Simon Howard
4 
5 Permission to use, copy, modify, and/or distribute this software
6 for any purpose with or without fee is hereby granted, provided
7 that the above copyright notice and this permission notice appear
8 in all copies.
9 
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
14 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
16 NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 
19  */
20 
41 #ifndef ALGORITHM_QUEUE_H
42 #define ALGORITHM_QUEUE_H
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
52 typedef struct _Queue Queue;
53 
58 typedef void *QueueValue;
59 
64 #define QUEUE_NULL ((void *) 0)
65 
74 
82 
94 
104 
115 
127 
137 
148 
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 #endif /* #ifndef ALGORITHM_QUEUE_H */
164 
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
queue_peek_tail
QueueValue queue_peek_tail(Queue *queue)
Read a value from the tail of a queue, without removing it from the queue.
QueueValue
void * QueueValue
A value stored in a Queue.
Definition: queue.h:58
queue_free
void queue_free(Queue *queue)
Destroy a queue.
queue_new
Queue * queue_new(void)
Create a new double-ended queue.
queue_push_head
int queue_push_head(Queue *queue, QueueValue data)
Add a value to the head of a queue.
beamspotman.queue
string queue
Definition: beamspotman.py:347
Queue
struct _Queue Queue
A double-ended queue.
Definition: queue.h:52
queue_peek_head
QueueValue queue_peek_head(Queue *queue)
Read value from the head of a queue, without removing it from the queue.
queue_push_tail
int queue_push_tail(Queue *queue, QueueValue data)
Add a value to the tail of a queue.
queue_pop_head
QueueValue queue_pop_head(Queue *queue)
Remove a value from the head of a queue.
queue_pop_tail
QueueValue queue_pop_tail(Queue *queue)
Remove a value from the tail of a queue.
queue_is_empty
int queue_is_empty(Queue *queue)
Query if any values are currently in a queue.