Html程序  |  524行  |  17.77 KB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title> TemplateOscl_Queue&lt; T, Alloc &gt; class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>Oscl_Queue&lt; T, Alloc &gt; Class Template Reference<br>
<small>
[<a class="el" href="group__osclbase.html">OSCL Base</a>]</small>
</h1><code>#include &lt;<a class="el" href="oscl__queue_8h-source.html">oscl_queue.h</a>&gt;</code>
<p>
<p>Inheritance diagram for Oscl_Queue&lt; T, Alloc &gt;:
<p><center><img src="classOscl__Queue.png" usemap="#Oscl_Queue< T, Alloc >_map" border="0" alt=""></center>
<map name="Oscl_Queue< T, Alloc >_map">
<area href="classOscl__Queue__Base.html" alt="Oscl_Queue_Base" shape="rect" coords="0,0,160,24">
<area href="classOscl__Opaque__Type__Alloc.html" alt="Oscl_Opaque_Type_Alloc" shape="rect" coords="170,0,330,24">
</map>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
<tr><td nowrap align=right valign=top>typedef T&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#s0">value_type</a></td></tr>
<tr><td nowrap align=right valign=top>typedef T *&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#s1">pointer</a></td></tr>
<tr><td nowrap align=right valign=top>typedef T &amp;&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#s2">reference</a></td></tr>
<tr><td nowrap align=right valign=top>typedef const T &amp;&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#s3">const_reference</a></td></tr>
<tr><td nowrap align=right valign=top>typedef uint32&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#s4">size_type</a></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a0">Oscl_Queue</a> ()</td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a1">Oscl_Queue</a> (uint32 n)</td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a2">~Oscl_Queue</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a3">push</a> (const T &amp;x)</td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classOscl__Queue.html#s2">reference</a>&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a4">front</a> ()</td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classOscl__Queue.html#s3">const_reference</a>&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a5">front</a> () const</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a6">pop</a> ()</td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classOscl__Queue.html#s2">reference</a>&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a7">back</a> ()</td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classOscl__Queue.html#s3">const_reference</a>&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a8">back</a> () const</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOscl__Queue.html#a9">clear</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class T, class Alloc&gt;<br>
 class Oscl_Queue&lt; T, Alloc &gt;</h3>

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. 
<p>
<hr><h2>Member Typedef Documentation</h2>
<a name="s3" doxytag="Oscl_Queue::const_reference"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> typedef const T&amp; Oscl_Queue&lt; T, Alloc &gt;::const_reference
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="s1" doxytag="Oscl_Queue::pointer"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> typedef T* Oscl_Queue&lt; T, Alloc &gt;::pointer
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="s2" doxytag="Oscl_Queue::reference"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> typedef T&amp; Oscl_Queue&lt; T, Alloc &gt;::reference
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="s4" doxytag="Oscl_Queue::size_type"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> typedef uint32 Oscl_Queue&lt; T, Alloc &gt;::size_type
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="s0" doxytag="Oscl_Queue::value_type"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> typedef T Oscl_Queue&lt; T, Alloc &gt;::value_type
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="Oscl_Queue::Oscl_Queue"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> Oscl_Queue&lt; T, Alloc &gt;::Oscl_Queue </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates an empty queue.     </td>
  </tr>
</table>
<a name="a1" doxytag="Oscl_Queue::Oscl_Queue"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> Oscl_Queue&lt; T, Alloc &gt;::Oscl_Queue </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">uint32&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>n</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates an empty queue with capacity n. <dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>n</em>&nbsp;</td><td>
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>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a2" doxytag="Oscl_Queue::~Oscl_Queue"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> virtual Oscl_Queue&lt; T, Alloc &gt;::~Oscl_Queue </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The destructor.     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a8" doxytag="Oscl_Queue::back"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classOscl__Queue.html#s3">const_reference</a> Oscl_Queue&lt; T, Alloc &gt;::back </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the last element (const)     </td>
  </tr>
</table>
<a name="a7" doxytag="Oscl_Queue::back"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classOscl__Queue.html#s2">reference</a> Oscl_Queue&lt; T, Alloc &gt;::back </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the last element: "back" (generally not too useful, but some debugging aids might want to find out what was just added)     </td>
  </tr>
</table>
<a name="a9" doxytag="Oscl_Queue::clear"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> void Oscl_Queue&lt; T, Alloc &gt;::clear </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Removes all elements. 
<p>
Reimplemented from <a class="el" href="classOscl__Queue__Base.html#b6">Oscl_Queue_Base</a>.    </td>
  </tr>
</table>
<a name="a5" doxytag="Oscl_Queue::front"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classOscl__Queue.html#s3">const_reference</a> Oscl_Queue&lt; T, Alloc &gt;::front </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the first element (const)     </td>
  </tr>
</table>
<a name="a4" doxytag="Oscl_Queue::front"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classOscl__Queue.html#s2">reference</a> Oscl_Queue&lt; T, Alloc &gt;::front </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the first element. 
<p>
Reimplemented from <a class="el" href="classOscl__Queue__Base.html">Oscl_Queue_Base</a>.    </td>
  </tr>
</table>
<a name="a6" doxytag="Oscl_Queue::pop"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> void Oscl_Queue&lt; T, Alloc &gt;::pop </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Removes the first element 
<p>
Reimplemented from <a class="el" href="classOscl__Queue__Base.html#b5">Oscl_Queue_Base</a>.    </td>
  </tr>
</table>
<a name="a3" doxytag="Oscl_Queue::push"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" colspan="4">
template&lt;class T, class Alloc&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> void Oscl_Queue&lt; T, Alloc &gt;::push </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const T &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>x</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
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>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>x</em>&nbsp;</td><td>
new element </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="oscl__queue_8h-source.html">oscl_queue.h</a></ul>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>