root / trunk / docs / libwireless / group__queue.html @ 242
History | View | Annotate | Download (11.9 KB)
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|---|
2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
3 |
<title>libwireless: Queue</title> |
4 |
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
5 |
<link href="tabs.css" rel="stylesheet" type="text/css"> |
6 |
</head><body> |
7 |
<!-- Generated by Doxygen 1.5.3 -->
|
8 |
<div class="tabs"> |
9 |
<ul>
|
10 |
<li><a href="index.html"><span>Main Page</span></a></li> |
11 |
<li><a href="modules.html"><span>Modules</span></a></li> |
12 |
<li><a href="annotated.html"><span>Data Structures</span></a></li> |
13 |
<li><a href="files.html"><span>Files</span></a></li> |
14 |
</ul>
|
15 |
</div>
|
16 |
<h1>Queue</h1>A queue implementation. |
17 |
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0"> |
18 |
<tr><td></td></tr> |
19 |
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> |
20 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structQueue.html">Queue</a></td></tr> |
21 |
|
22 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structQueue.html">Queue</a></td></tr> |
23 |
|
24 |
<tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
25 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structQueue.html">Queue</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gd79af6a8d562cb911d93f35b8825e148">queue_create</a> (void)</td></tr> |
26 |
|
27 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new queue. <a href="#gd79af6a8d562cb911d93f35b8825e148"></a><br></td></tr> |
28 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gd21ee75924298937673e2b8d66665466">queue_destroy</a> (<a class="el" href="structQueue.html">Queue</a> *q)</td></tr> |
29 |
|
30 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a queue. <a href="#gd21ee75924298937673e2b8d66665466"></a><br></td></tr> |
31 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gcdb01f4d0c861c4981829920d3973b77">queue_add</a> (<a class="el" href="structQueue.html">Queue</a> *q, void *item)</td></tr> |
32 |
|
33 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add an element to a queue. <a href="#gcdb01f4d0c861c4981829920d3973b77"></a><br></td></tr> |
34 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gef91e5f119b77101f6c2e23eb1803059">queue_remove</a> (<a class="el" href="structQueue.html">Queue</a> *q)</td></tr> |
35 |
|
36 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove an element from a queue. <a href="#gef91e5f119b77101f6c2e23eb1803059"></a><br></td></tr> |
37 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gbfe7f6f65eaffa1ee166811f259807e4">queue_remove_all</a> (<a class="el" href="structQueue.html">Queue</a> *q, void *item)</td></tr> |
38 |
|
39 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove all instances of a given element from a queue. <a href="#gbfe7f6f65eaffa1ee166811f259807e4"></a><br></td></tr> |
40 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#g97ae0b085c41d49c8a24e1e506967f9b">queue_size</a> (<a class="el" href="structQueue.html">Queue</a> *q)</td></tr> |
41 |
|
42 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the size of a queue. <a href="#g97ae0b085c41d49c8a24e1e506967f9b"></a><br></td></tr> |
43 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga67a7f9940e9bbf21320a6f41e60998e">queue_is_empty</a> (<a class="el" href="structQueue.html">Queue</a> *q)</td></tr> |
44 |
|
45 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Check if the queue is empty. <a href="#ga67a7f9940e9bbf21320a6f41e60998e"></a><br></td></tr> |
46 |
</table>
|
47 |
<hr><a name="_details"></a><h2>Detailed Description</h2> |
48 |
A queue implementation. |
49 |
<p>
|
50 |
A queue implementation. <hr><h2>Function Documentation</h2> |
51 |
<a class="anchor" name="gcdb01f4d0c861c4981829920d3973b77"></a><!-- doxytag: member="queue.h::queue_add" ref="gcdb01f4d0c861c4981829920d3973b77" args="(Queue *q, void *item)" --> |
52 |
<div class="memitem"> |
53 |
<div class="memproto"> |
54 |
<table class="memname"> |
55 |
<tr>
|
56 |
<td class="memname">void queue_add </td> |
57 |
<td>(</td> |
58 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td> |
59 |
<td class="paramname"> <em>q</em>, </td> |
60 |
</tr>
|
61 |
<tr>
|
62 |
<td class="paramkey"></td> |
63 |
<td></td> |
64 |
<td class="paramtype">void * </td> |
65 |
<td class="paramname"> <em>item</em></td><td> </td> |
66 |
</tr>
|
67 |
<tr>
|
68 |
<td></td> |
69 |
<td>)</td> |
70 |
<td></td><td></td><td width="100%"></td> |
71 |
</tr>
|
72 |
</table>
|
73 |
</div>
|
74 |
<div class="memdoc"> |
75 |
|
76 |
<p>
|
77 |
Add an element to a queue. |
78 |
<p>
|
79 |
Add an element to a queue.<p>
|
80 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
81 |
<table border="0" cellspacing="2" cellpadding="0"> |
82 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to add an element to </td></tr> |
83 |
<tr><td valign="top"></td><td valign="top"><em>item</em> </td><td>the item to add to the queue </td></tr> |
84 |
</table>
|
85 |
</dl>
|
86 |
|
87 |
</div>
|
88 |
</div><p> |
89 |
<a class="anchor" name="gd79af6a8d562cb911d93f35b8825e148"></a><!-- doxytag: member="queue.h::queue_create" ref="gd79af6a8d562cb911d93f35b8825e148" args="(void)" --> |
90 |
<div class="memitem"> |
91 |
<div class="memproto"> |
92 |
<table class="memname"> |
93 |
<tr>
|
94 |
<td class="memname"><a class="el" href="structQueue.html">Queue</a>* queue_create </td> |
95 |
<td>(</td> |
96 |
<td class="paramtype">void </td> |
97 |
<td class="paramname"> </td> |
98 |
<td> ) </td> |
99 |
<td width="100%"></td> |
100 |
</tr>
|
101 |
</table>
|
102 |
</div>
|
103 |
<div class="memdoc"> |
104 |
|
105 |
<p>
|
106 |
Create a new queue. |
107 |
<p>
|
108 |
Create a queue.<p>
|
109 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the newly created queue. </dd></dl> |
110 |
|
111 |
</div>
|
112 |
</div><p> |
113 |
<a class="anchor" name="gd21ee75924298937673e2b8d66665466"></a><!-- doxytag: member="queue.h::queue_destroy" ref="gd21ee75924298937673e2b8d66665466" args="(Queue *q)" --> |
114 |
<div class="memitem"> |
115 |
<div class="memproto"> |
116 |
<table class="memname"> |
117 |
<tr>
|
118 |
<td class="memname">void queue_destroy </td> |
119 |
<td>(</td> |
120 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td> |
121 |
<td class="paramname"> <em>q</em> </td> |
122 |
<td> ) </td> |
123 |
<td width="100%"></td> |
124 |
</tr>
|
125 |
</table>
|
126 |
</div>
|
127 |
<div class="memdoc"> |
128 |
|
129 |
<p>
|
130 |
Destroy a queue. |
131 |
<p>
|
132 |
Destroys a queue, freeing memory.<p>
|
133 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
134 |
<table border="0" cellspacing="2" cellpadding="0"> |
135 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to destroy </td></tr> |
136 |
</table>
|
137 |
</dl>
|
138 |
|
139 |
</div>
|
140 |
</div><p> |
141 |
<a class="anchor" name="ga67a7f9940e9bbf21320a6f41e60998e"></a><!-- doxytag: member="queue.h::queue_is_empty" ref="ga67a7f9940e9bbf21320a6f41e60998e" args="(Queue *q)" --> |
142 |
<div class="memitem"> |
143 |
<div class="memproto"> |
144 |
<table class="memname"> |
145 |
<tr>
|
146 |
<td class="memname">int queue_is_empty </td> |
147 |
<td>(</td> |
148 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td> |
149 |
<td class="paramname"> <em>q</em> </td> |
150 |
<td> ) </td> |
151 |
<td width="100%"></td> |
152 |
</tr>
|
153 |
</table>
|
154 |
</div>
|
155 |
<div class="memdoc"> |
156 |
|
157 |
<p>
|
158 |
Check if the queue is empty. |
159 |
<p>
|
160 |
Check if the queue is empty.<p>
|
161 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
162 |
<table border="0" cellspacing="2" cellpadding="0"> |
163 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to check </td></tr> |
164 |
</table>
|
165 |
</dl>
|
166 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>nonzero if the queue is empty, 0 otherwise </dd></dl> |
167 |
|
168 |
</div>
|
169 |
</div><p> |
170 |
<a class="anchor" name="gef91e5f119b77101f6c2e23eb1803059"></a><!-- doxytag: member="queue.h::queue_remove" ref="gef91e5f119b77101f6c2e23eb1803059" args="(Queue *q)" --> |
171 |
<div class="memitem"> |
172 |
<div class="memproto"> |
173 |
<table class="memname"> |
174 |
<tr>
|
175 |
<td class="memname">void* queue_remove </td> |
176 |
<td>(</td> |
177 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td> |
178 |
<td class="paramname"> <em>q</em> </td> |
179 |
<td> ) </td> |
180 |
<td width="100%"></td> |
181 |
</tr>
|
182 |
</table>
|
183 |
</div>
|
184 |
<div class="memdoc"> |
185 |
|
186 |
<p>
|
187 |
Remove an element from a queue. |
188 |
<p>
|
189 |
Remove an element from the front of a queue.<p>
|
190 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
191 |
<table border="0" cellspacing="2" cellpadding="0"> |
192 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to remove the element from</td></tr> |
193 |
</table>
|
194 |
</dl>
|
195 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the element which was removed </dd></dl> |
196 |
|
197 |
</div>
|
198 |
</div><p> |
199 |
<a class="anchor" name="gbfe7f6f65eaffa1ee166811f259807e4"></a><!-- doxytag: member="queue.h::queue_remove_all" ref="gbfe7f6f65eaffa1ee166811f259807e4" args="(Queue *q, void *item)" --> |
200 |
<div class="memitem"> |
201 |
<div class="memproto"> |
202 |
<table class="memname"> |
203 |
<tr>
|
204 |
<td class="memname">void queue_remove_all </td> |
205 |
<td>(</td> |
206 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td> |
207 |
<td class="paramname"> <em>q</em>, </td> |
208 |
</tr>
|
209 |
<tr>
|
210 |
<td class="paramkey"></td> |
211 |
<td></td> |
212 |
<td class="paramtype">void * </td> |
213 |
<td class="paramname"> <em>item</em></td><td> </td> |
214 |
</tr>
|
215 |
<tr>
|
216 |
<td></td> |
217 |
<td>)</td> |
218 |
<td></td><td></td><td width="100%"></td> |
219 |
</tr>
|
220 |
</table>
|
221 |
</div>
|
222 |
<div class="memdoc"> |
223 |
|
224 |
<p>
|
225 |
Remove all instances of a given element from a queue. |
226 |
<p>
|
227 |
Remove all instances of a given element from a queue.<p>
|
228 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
229 |
<table border="0" cellspacing="2" cellpadding="0"> |
230 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to remove the elements from </td></tr> |
231 |
<tr><td valign="top"></td><td valign="top"><em>item</em> </td><td>the element to remove all instances of </td></tr> |
232 |
</table>
|
233 |
</dl>
|
234 |
|
235 |
</div>
|
236 |
</div><p> |
237 |
<a class="anchor" name="g97ae0b085c41d49c8a24e1e506967f9b"></a><!-- doxytag: member="queue.h::queue_size" ref="g97ae0b085c41d49c8a24e1e506967f9b" args="(Queue *q)" --> |
238 |
<div class="memitem"> |
239 |
<div class="memproto"> |
240 |
<table class="memname"> |
241 |
<tr>
|
242 |
<td class="memname">int queue_size </td> |
243 |
<td>(</td> |
244 |
<td class="paramtype"><a class="el" href="structQueue.html">Queue</a> * </td> |
245 |
<td class="paramname"> <em>q</em> </td> |
246 |
<td> ) </td> |
247 |
<td width="100%"></td> |
248 |
</tr>
|
249 |
</table>
|
250 |
</div>
|
251 |
<div class="memdoc"> |
252 |
|
253 |
<p>
|
254 |
Get the size of a queue. |
255 |
<p>
|
256 |
Get the number of elements in the queue.<p>
|
257 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
258 |
<table border="0" cellspacing="2" cellpadding="0"> |
259 |
<tr><td valign="top"></td><td valign="top"><em>q</em> </td><td>the queue to get the size of </td></tr> |
260 |
</table>
|
261 |
</dl>
|
262 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the size of the queue </dd></dl> |
263 |
|
264 |
</div>
|
265 |
</div><p> |
266 |
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Nov 8 23:27:23 2007 for libwireless by |
267 |
<a href="http://www.doxygen.org/index.html"> |
268 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
269 |
</body>
|
270 |
</html>
|