1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3 <title> TemplateOscl_Queue< T, Alloc > class Reference</title> 4 <link href="doxygen.css" rel="stylesheet" type="text/css"> 5 </head><body> 6 <!-- Generated by Doxygen 1.2.18 --> 7 <center> 8 <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9 <hr><h1>Oscl_Queue< T, Alloc > Class Template Reference<br> 10 <small> 11 [<a class="el" href="group__osclbase.html">OSCL Base</a>]</small> 12 </h1><code>#include <<a class="el" href="oscl__queue_8h-source.html">oscl_queue.h</a>></code> 13 <p> 14 <p>Inheritance diagram for Oscl_Queue< T, Alloc >: 15 <p><center><img src="classOscl__Queue.png" usemap="#Oscl_Queue< T, Alloc >_map" border="0" alt=""></center> 16 <map name="Oscl_Queue< T, Alloc >_map"> 17 <area href="classOscl__Queue__Base.html" alt="Oscl_Queue_Base" shape="rect" coords="0,0,160,24"> 18 <area href="classOscl__Opaque__Type__Alloc.html" alt="Oscl_Opaque_Type_Alloc" shape="rect" coords="170,0,330,24"> 19 </map> 20 <table border=0 cellpadding=0 cellspacing=0> 21 <tr><td></td></tr> 22 <tr><td colspan=2><br><h2>Public Types</h2></td></tr> 23 <tr><td nowrap align=right valign=top>typedef T </td><td valign=bottom><a class="el" href="classOscl__Queue.html#s0">value_type</a></td></tr> 24 <tr><td nowrap align=right valign=top>typedef T * </td><td valign=bottom><a class="el" href="classOscl__Queue.html#s1">pointer</a></td></tr> 25 <tr><td nowrap align=right valign=top>typedef T & </td><td valign=bottom><a class="el" href="classOscl__Queue.html#s2">reference</a></td></tr> 26 <tr><td nowrap align=right valign=top>typedef const T & </td><td valign=bottom><a class="el" href="classOscl__Queue.html#s3">const_reference</a></td></tr> 27 <tr><td nowrap align=right valign=top>typedef uint32 </td><td valign=bottom><a class="el" href="classOscl__Queue.html#s4">size_type</a></td></tr> 28 <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> 29 <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a0">Oscl_Queue</a> ()</td></tr> 30 <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a1">Oscl_Queue</a> (uint32 n)</td></tr> 31 <tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a2">~Oscl_Queue</a> ()</td></tr> 32 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a3">push</a> (const T &x)</td></tr> 33 <tr><td nowrap align=right valign=top><a class="el" href="classOscl__Queue.html#s2">reference</a> </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a4">front</a> ()</td></tr> 34 <tr><td nowrap align=right valign=top><a class="el" href="classOscl__Queue.html#s3">const_reference</a> </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a5">front</a> () const</td></tr> 35 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a6">pop</a> ()</td></tr> 36 <tr><td nowrap align=right valign=top><a class="el" href="classOscl__Queue.html#s2">reference</a> </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a7">back</a> ()</td></tr> 37 <tr><td nowrap align=right valign=top><a class="el" href="classOscl__Queue.html#s3">const_reference</a> </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a8">back</a> () const</td></tr> 38 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOscl__Queue.html#a9">clear</a> ()</td></tr> 39 </table> 40 <hr><a name="_details"></a><h2>Detailed Description</h2> 41 <h3>template<class T, class Alloc><br> 42 class Oscl_Queue< T, Alloc ></h3> 43 44 Oscl_Queue Class. A subset of STL::Queue methods. Oscl_Queue supports constant time insertion (at the end) and removal of elements at the front of the queue. It does not support insertion or removal of elements at the other ends or middle of the queue, nor random access to elements. * No iteration capability is [currently] supplied. * No assignment or copy capability is [currently] supplied. The number of elements in a queue can vary dynamically, and memory management is performed automatically. 45 <p> 46 <hr><h2>Member Typedef Documentation</h2> 47 <a name="s3" doxytag="Oscl_Queue::const_reference"></a><p> 48 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 49 <tr> 50 <td class="md"> 51 <table cellpadding="0" cellspacing="0" border="0"> 52 <tr> 53 <td class="md" colspan="4"> 54 template<class T, class Alloc> </td> 55 </tr> 56 <tr> 57 <td class="md" nowrap valign="top"> typedef const T& Oscl_Queue< T, Alloc >::const_reference 58 </table> 59 </td> 60 </tr> 61 </table> 62 <table cellspacing=5 cellpadding=0 border=0> 63 <tr> 64 <td> 65 66 </td> 67 <td> 68 69 <p> 70 </td> 71 </tr> 72 </table> 73 <a name="s1" doxytag="Oscl_Queue::pointer"></a><p> 74 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 75 <tr> 76 <td class="md"> 77 <table cellpadding="0" cellspacing="0" border="0"> 78 <tr> 79 <td class="md" colspan="4"> 80 template<class T, class Alloc> </td> 81 </tr> 82 <tr> 83 <td class="md" nowrap valign="top"> typedef T* Oscl_Queue< T, Alloc >::pointer 84 </table> 85 </td> 86 </tr> 87 </table> 88 <table cellspacing=5 cellpadding=0 border=0> 89 <tr> 90 <td> 91 92 </td> 93 <td> 94 95 <p> 96 </td> 97 </tr> 98 </table> 99 <a name="s2" doxytag="Oscl_Queue::reference"></a><p> 100 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 101 <tr> 102 <td class="md"> 103 <table cellpadding="0" cellspacing="0" border="0"> 104 <tr> 105 <td class="md" colspan="4"> 106 template<class T, class Alloc> </td> 107 </tr> 108 <tr> 109 <td class="md" nowrap valign="top"> typedef T& Oscl_Queue< T, Alloc >::reference 110 </table> 111 </td> 112 </tr> 113 </table> 114 <table cellspacing=5 cellpadding=0 border=0> 115 <tr> 116 <td> 117 118 </td> 119 <td> 120 121 <p> 122 </td> 123 </tr> 124 </table> 125 <a name="s4" doxytag="Oscl_Queue::size_type"></a><p> 126 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 127 <tr> 128 <td class="md"> 129 <table cellpadding="0" cellspacing="0" border="0"> 130 <tr> 131 <td class="md" colspan="4"> 132 template<class T, class Alloc> </td> 133 </tr> 134 <tr> 135 <td class="md" nowrap valign="top"> typedef uint32 Oscl_Queue< T, Alloc >::size_type 136 </table> 137 </td> 138 </tr> 139 </table> 140 <table cellspacing=5 cellpadding=0 border=0> 141 <tr> 142 <td> 143 144 </td> 145 <td> 146 147 <p> 148 </td> 149 </tr> 150 </table> 151 <a name="s0" doxytag="Oscl_Queue::value_type"></a><p> 152 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 153 <tr> 154 <td class="md"> 155 <table cellpadding="0" cellspacing="0" border="0"> 156 <tr> 157 <td class="md" colspan="4"> 158 template<class T, class Alloc> </td> 159 </tr> 160 <tr> 161 <td class="md" nowrap valign="top"> typedef T Oscl_Queue< T, Alloc >::value_type 162 </table> 163 </td> 164 </tr> 165 </table> 166 <table cellspacing=5 cellpadding=0 border=0> 167 <tr> 168 <td> 169 170 </td> 171 <td> 172 173 <p> 174 </td> 175 </tr> 176 </table> 177 <hr><h2>Constructor & Destructor Documentation</h2> 178 <a name="a0" doxytag="Oscl_Queue::Oscl_Queue"></a><p> 179 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 180 <tr> 181 <td class="md"> 182 <table cellpadding="0" cellspacing="0" border="0"> 183 <tr> 184 <td class="md" colspan="4"> 185 template<class T, class Alloc> </td> 186 </tr> 187 <tr> 188 <td class="md" nowrap valign="top"> Oscl_Queue< T, Alloc >::Oscl_Queue </td> 189 <td class="md" valign="top">( </td> 190 <td class="mdname1" valign="top" nowrap> </td> 191 <td class="md" valign="top">) </td> 192 <td class="md" nowrap><code> [inline]</code></td> 193 </tr> 194 195 </table> 196 </td> 197 </tr> 198 </table> 199 <table cellspacing=5 cellpadding=0 border=0> 200 <tr> 201 <td> 202 203 </td> 204 <td> 205 206 <p> 207 Creates an empty queue. </td> 208 </tr> 209 </table> 210 <a name="a1" doxytag="Oscl_Queue::Oscl_Queue"></a><p> 211 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 212 <tr> 213 <td class="md"> 214 <table cellpadding="0" cellspacing="0" border="0"> 215 <tr> 216 <td class="md" colspan="4"> 217 template<class T, class Alloc> </td> 218 </tr> 219 <tr> 220 <td class="md" nowrap valign="top"> Oscl_Queue< T, Alloc >::Oscl_Queue </td> 221 <td class="md" valign="top">( </td> 222 <td class="md" nowrap valign="top">uint32 </td> 223 <td class="mdname1" valign="top" nowrap> <em>n</em> </td> 224 <td class="md" valign="top">) </td> 225 <td class="md" nowrap><code> [inline]</code></td> 226 </tr> 227 228 </table> 229 </td> 230 </tr> 231 </table> 232 <table cellspacing=5 cellpadding=0 border=0> 233 <tr> 234 <td> 235 236 </td> 237 <td> 238 239 <p> 240 Creates an empty queue with capacity n. <dl compact><dt><b>Parameters: </b></dt><dd> 241 <table border=0 cellspacing=2 cellpadding=0> 242 <tr><td valign=top><em>n</em> </td><td> 243 creates a queue with n elements. The main reason for specifying n is efficiency. If you know the capacity to which your queue must grow, then it is more efficient to allocate the queue all at once rather than rely on the automatic reallocation scheme. </td></tr> 244 </table> 245 </dl> </td> 246 </tr> 247 </table> 248 <a name="a2" doxytag="Oscl_Queue::~Oscl_Queue"></a><p> 249 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 250 <tr> 251 <td class="md"> 252 <table cellpadding="0" cellspacing="0" border="0"> 253 <tr> 254 <td class="md" colspan="4"> 255 template<class T, class Alloc> </td> 256 </tr> 257 <tr> 258 <td class="md" nowrap valign="top"> virtual Oscl_Queue< T, Alloc >::~Oscl_Queue </td> 259 <td class="md" valign="top">( </td> 260 <td class="mdname1" valign="top" nowrap> </td> 261 <td class="md" valign="top">) </td> 262 <td class="md" nowrap><code> [inline, virtual]</code></td> 263 </tr> 264 265 </table> 266 </td> 267 </tr> 268 </table> 269 <table cellspacing=5 cellpadding=0 border=0> 270 <tr> 271 <td> 272 273 </td> 274 <td> 275 276 <p> 277 The destructor. </td> 278 </tr> 279 </table> 280 <hr><h2>Member Function Documentation</h2> 281 <a name="a8" doxytag="Oscl_Queue::back"></a><p> 282 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 283 <tr> 284 <td class="md"> 285 <table cellpadding="0" cellspacing="0" border="0"> 286 <tr> 287 <td class="md" colspan="4"> 288 template<class T, class Alloc> </td> 289 </tr> 290 <tr> 291 <td class="md" nowrap valign="top"> <a class="el" href="classOscl__Queue.html#s3">const_reference</a> Oscl_Queue< T, Alloc >::back </td> 292 <td class="md" valign="top">( </td> 293 <td class="mdname1" valign="top" nowrap> </td> 294 <td class="md" valign="top">) </td> 295 <td class="md" nowrap> const<code> [inline]</code></td> 296 </tr> 297 298 </table> 299 </td> 300 </tr> 301 </table> 302 <table cellspacing=5 cellpadding=0 border=0> 303 <tr> 304 <td> 305 306 </td> 307 <td> 308 309 <p> 310 Returns the last element (const) </td> 311 </tr> 312 </table> 313 <a name="a7" doxytag="Oscl_Queue::back"></a><p> 314 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 315 <tr> 316 <td class="md"> 317 <table cellpadding="0" cellspacing="0" border="0"> 318 <tr> 319 <td class="md" colspan="4"> 320 template<class T, class Alloc> </td> 321 </tr> 322 <tr> 323 <td class="md" nowrap valign="top"> <a class="el" href="classOscl__Queue.html#s2">reference</a> Oscl_Queue< T, Alloc >::back </td> 324 <td class="md" valign="top">( </td> 325 <td class="mdname1" valign="top" nowrap> </td> 326 <td class="md" valign="top">) </td> 327 <td class="md" nowrap><code> [inline]</code></td> 328 </tr> 329 330 </table> 331 </td> 332 </tr> 333 </table> 334 <table cellspacing=5 cellpadding=0 border=0> 335 <tr> 336 <td> 337 338 </td> 339 <td> 340 341 <p> 342 Returns the last element: "back" (generally not too useful, but some debugging aids might want to find out what was just added) </td> 343 </tr> 344 </table> 345 <a name="a9" doxytag="Oscl_Queue::clear"></a><p> 346 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 347 <tr> 348 <td class="md"> 349 <table cellpadding="0" cellspacing="0" border="0"> 350 <tr> 351 <td class="md" colspan="4"> 352 template<class T, class Alloc> </td> 353 </tr> 354 <tr> 355 <td class="md" nowrap valign="top"> void Oscl_Queue< T, Alloc >::clear </td> 356 <td class="md" valign="top">( </td> 357 <td class="mdname1" valign="top" nowrap> </td> 358 <td class="md" valign="top">) </td> 359 <td class="md" nowrap><code> [inline]</code></td> 360 </tr> 361 362 </table> 363 </td> 364 </tr> 365 </table> 366 <table cellspacing=5 cellpadding=0 border=0> 367 <tr> 368 <td> 369 370 </td> 371 <td> 372 373 <p> 374 Removes all elements. 375 <p> 376 Reimplemented from <a class="el" href="classOscl__Queue__Base.html#b6">Oscl_Queue_Base</a>. </td> 377 </tr> 378 </table> 379 <a name="a5" doxytag="Oscl_Queue::front"></a><p> 380 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 381 <tr> 382 <td class="md"> 383 <table cellpadding="0" cellspacing="0" border="0"> 384 <tr> 385 <td class="md" colspan="4"> 386 template<class T, class Alloc> </td> 387 </tr> 388 <tr> 389 <td class="md" nowrap valign="top"> <a class="el" href="classOscl__Queue.html#s3">const_reference</a> Oscl_Queue< T, Alloc >::front </td> 390 <td class="md" valign="top">( </td> 391 <td class="mdname1" valign="top" nowrap> </td> 392 <td class="md" valign="top">) </td> 393 <td class="md" nowrap> const<code> [inline]</code></td> 394 </tr> 395 396 </table> 397 </td> 398 </tr> 399 </table> 400 <table cellspacing=5 cellpadding=0 border=0> 401 <tr> 402 <td> 403 404 </td> 405 <td> 406 407 <p> 408 Returns the first element (const) </td> 409 </tr> 410 </table> 411 <a name="a4" doxytag="Oscl_Queue::front"></a><p> 412 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 413 <tr> 414 <td class="md"> 415 <table cellpadding="0" cellspacing="0" border="0"> 416 <tr> 417 <td class="md" colspan="4"> 418 template<class T, class Alloc> </td> 419 </tr> 420 <tr> 421 <td class="md" nowrap valign="top"> <a class="el" href="classOscl__Queue.html#s2">reference</a> Oscl_Queue< T, Alloc >::front </td> 422 <td class="md" valign="top">( </td> 423 <td class="mdname1" valign="top" nowrap> </td> 424 <td class="md" valign="top">) </td> 425 <td class="md" nowrap><code> [inline]</code></td> 426 </tr> 427 428 </table> 429 </td> 430 </tr> 431 </table> 432 <table cellspacing=5 cellpadding=0 border=0> 433 <tr> 434 <td> 435 436 </td> 437 <td> 438 439 <p> 440 Returns the first element. 441 <p> 442 Reimplemented from <a class="el" href="classOscl__Queue__Base.html">Oscl_Queue_Base</a>. </td> 443 </tr> 444 </table> 445 <a name="a6" doxytag="Oscl_Queue::pop"></a><p> 446 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 447 <tr> 448 <td class="md"> 449 <table cellpadding="0" cellspacing="0" border="0"> 450 <tr> 451 <td class="md" colspan="4"> 452 template<class T, class Alloc> </td> 453 </tr> 454 <tr> 455 <td class="md" nowrap valign="top"> void Oscl_Queue< T, Alloc >::pop </td> 456 <td class="md" valign="top">( </td> 457 <td class="mdname1" valign="top" nowrap> </td> 458 <td class="md" valign="top">) </td> 459 <td class="md" nowrap><code> [inline]</code></td> 460 </tr> 461 462 </table> 463 </td> 464 </tr> 465 </table> 466 <table cellspacing=5 cellpadding=0 border=0> 467 <tr> 468 <td> 469 470 </td> 471 <td> 472 473 <p> 474 Removes the first element 475 <p> 476 Reimplemented from <a class="el" href="classOscl__Queue__Base.html#b5">Oscl_Queue_Base</a>. </td> 477 </tr> 478 </table> 479 <a name="a3" doxytag="Oscl_Queue::push"></a><p> 480 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 481 <tr> 482 <td class="md"> 483 <table cellpadding="0" cellspacing="0" border="0"> 484 <tr> 485 <td class="md" colspan="4"> 486 template<class T, class Alloc> </td> 487 </tr> 488 <tr> 489 <td class="md" nowrap valign="top"> void Oscl_Queue< T, Alloc >::push </td> 490 <td class="md" valign="top">( </td> 491 <td class="md" nowrap valign="top">const T & </td> 492 <td class="mdname1" valign="top" nowrap> <em>x</em> </td> 493 <td class="md" valign="top">) </td> 494 <td class="md" nowrap><code> [inline]</code></td> 495 </tr> 496 497 </table> 498 </td> 499 </tr> 500 </table> 501 <table cellspacing=5 cellpadding=0 border=0> 502 <tr> 503 <td> 504 505 </td> 506 <td> 507 508 <p> 509 Inserts a new element at the end. Queue will be grown if necessary. If allocation fails, an OSCL_LEAVE will occur <dl compact><dt><b>Parameters: </b></dt><dd> 510 <table border=0 cellspacing=2 cellpadding=0> 511 <tr><td valign=top><em>x</em> </td><td> 512 new element </td></tr> 513 </table> 514 </dl> </td> 515 </tr> 516 </table> 517 <hr>The documentation for this class was generated from the following file:<ul> 518 <li><a class="el" href="oscl__queue_8h-source.html">oscl_queue.h</a></ul> 519 <hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 520 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 521 </small></address> 522 </body> 523 </html> 524