Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 4726

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3valuelist.qdoc -->
  <title>Qt 4.8: Q3ValueList Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3ValueList</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3ValueList Class Reference</h1>
<!-- $$$Q3ValueList-brief -->
<p>The Q3ValueList class is a value-based template class that provides lists. <a href="#details">More...</a></p>
<!-- @@@Q3ValueList -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3ValueList&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="qlinkedlist.html">QLinkedList&lt;T&gt;</a>.</p>
<p><b>Inherited by: </b><a href="q3canvasitemlist.html">Q3CanvasItemList</a> and <a href="q3valuestack.html">Q3ValueStack</a>.</p>
<ul>
<li><a href="q3valuelist-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#ConstIterator-typedef">ConstIterator</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#Iterator-typedef">Iterator</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#const_iterator-typedef">const_iterator</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#const_pointer-typedef">const_pointer</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#const_reference-typedef">const_reference</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#iterator-typedefx">iterator</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#pointer-typedef">pointer</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#reference-typedef">reference</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#size_type-typedef">size_type</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#value_type-typedef">value_type</a></b></td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#Q3ValueList">Q3ValueList</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#Q3ValueList-2">Q3ValueList</a></b> ( const Q3ValueList&lt;T&gt; &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#Q3ValueList-3">Q3ValueList</a></b> ( const QLinkedList&lt;T&gt; &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#Q3ValueList-4">Q3ValueList</a></b> ( const QList&lt;T&gt; &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#Q3ValueList-5">Q3ValueList</a></b> ( const std::list&lt;T&gt; &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#dtor.Q3ValueList">~Q3ValueList</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt;::Iterator </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#append">append</a></b> ( const T &amp; <i>x</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt;::ConstIterator </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#at">at</a></b> ( Q3ValueList&lt;T&gt;::size_type <i>i</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt;::Iterator </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#at-2">at</a></b> ( Q3ValueList&lt;T&gt;::size_type <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt;::size_type </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#contains">contains</a></b> ( const T &amp; <i>x</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt;::ConstIterator </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#fromLast">fromLast</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt;::Iterator </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#fromLast-2">fromLast</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt;::Iterator </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#insert">insert</a></b> ( Q3ValueList&lt;T&gt;::Iterator <i>it</i>, const T &amp; <i>x</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#insert-2">insert</a></b> ( Q3ValueList&lt;T&gt;::Iterator <i>pos</i>, Q3ValueList&lt;T&gt;::size_type <i>n</i>, const T &amp; <i>x</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt;::Iterator </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#prepend">prepend</a></b> ( const T &amp; <i>x</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt;::Iterator </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#remove">remove</a></b> ( Q3ValueList&lt;T&gt;::Iterator <i>it</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#remove-2">remove</a></b> ( const T &amp; <i>x</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-QList-ltT-gt">operator QList&lt;T&gt;</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-not-eq">operator!=</a></b> ( const Q3ValueList&lt;T&gt; &amp; <i>l</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-2b">operator+</a></b> ( const Q3ValueList&lt;T&gt; &amp; <i>l</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt; &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-2b-eq">operator+=</a></b> ( const Q3ValueList&lt;T&gt; &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt; &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-2b-eq-2">operator+=</a></b> ( const T &amp; <i>x</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt; &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-lt-lt">operator&lt;&lt;</a></b> ( const T &amp; <i>x</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt; &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-eq">operator=</a></b> ( const Q3ValueList&lt;T&gt; &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt; &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-eq-2">operator=</a></b> ( const QList&lt;T&gt; &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;T&gt; &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-eq-3">operator=</a></b> ( const std::list&lt;T&gt; &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-eq-eq">operator==</a></b> ( const Q3ValueList&lt;T&gt; &amp; <i>l</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-eq-eq-2">operator==</a></b> ( const std::list&lt;T&gt; &amp; <i>l</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const T &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-5b-5d">operator[]</a></b> ( Q3ValueList&lt;T&gt;::size_type <i>i</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> T &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-5b-5d-2">operator[]</a></b> ( Q3ValueList&lt;T&gt;::size_type <i>i</i> )</td></tr>
</table>
<ul>
<li class="fn">48 public functions inherited from <a href="qlinkedlist.html#public-functions">QLinkedList</a></li>
</ul>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-lt-lt-208">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>s</i>, const Q3ValueList&lt;T&gt; &amp; <i>l</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3valuelist.html#operator-gt-gt-28">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>s</i>, Q3ValueList&lt;T&gt; &amp; <i>l</i> )</td></tr>
</table>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 static public member inherited from <a href="qlinkedlist.html#static-public-members">QLinkedList</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3ValueList-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3ValueList class is a value-based template class that provides lists.</p>
<p>Q3ValueList is a Qt implementation of an STL-like list container. It can be used in your application if the standard <tt>list</tt> is not available for your target platforms.</p>
<p>Q3ValueList&lt;T&gt; defines a template instance to create a list of values that all have the class T. Note that Q3ValueList does not store pointers to the members of the list; it holds a copy of every member. This is why these kinds of classes are called &quot;value based&quot;; <a href="q3ptrlist.html">Q3PtrList</a> and <a href="q3dict.html">Q3Dict</a> are &quot;pointer based&quot;.</p>
<p>Q3ValueList contains and manages a collection of objects of type T and provides iterators that allow the contained objects to be addressed. Q3ValueList owns the contained items. For more relaxed ownership semantics, see <a href="q3ptrcollection.html">Q3PtrCollection</a> and friends which are pointer-based containers.</p>
<p>Some classes cannot be used within a Q3ValueList, for example, all classes derived from <a href="qobject.html">QObject</a> and thus all classes that implement widgets. Only values can be used in a Q3ValueList. To qualify as a value the class must provide:</p>
<ul>
<li>a copy constructor;</li>
<li>an assignment operator;</li>
<li>a default constructor, i.e&#x2e; a constructor that does not take any arguments.</li>
</ul>
<p>Note that C++ defaults to field-by-field assignment operators and copy constructors if no explicit version is supplied. In many cases this is sufficient.</p>
<p>In addition, some compilers (e.g&#x2e; Sun CC) might require that the class provides an equality operator (operator==()).</p>
<p>Q3ValueList's function naming is consistent with the other Qt classes (e.g&#x2e; <a href="qlinkedlist.html#count">count</a>(), <a href="qlinkedlist.html#isEmpty">isEmpty</a>()). Q3ValueList also provides extra functions for compatibility with STL algorithms, such as <a href="qlinkedlist.html#size">size</a>() and <a href="qlinkedlist.html#empty">empty</a>(). Programmers already familiar with the STL <tt>list</tt> may prefer to use the STL-compatible functions.</p>
<p>Example:</p>
<pre class="cpp"> <span class="keyword">class</span> Employee
 {
 <span class="keyword">public</span>:
     Employee(): sn(<span class="number">0</span>) {}
     Employee( <span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">&amp;</span> forename<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">&amp;</span> surname<span class="operator">,</span> <span class="type">int</span> salary )
         : fn(forename)<span class="operator">,</span> sn(surname)<span class="operator">,</span> sal(salary)
     {}

     <span class="type"><a href="qstring.html">QString</a></span> forename() <span class="keyword">const</span> { <span class="keyword">return</span> fn; }
     <span class="type"><a href="qstring.html">QString</a></span> surname() <span class="keyword">const</span> { <span class="keyword">return</span> sn; }
     <span class="type">int</span> salary() <span class="keyword">const</span> { <span class="keyword">return</span> sal; }
     <span class="type">void</span> setSalary( <span class="type">int</span> salary ) { sal <span class="operator">=</span> salary; }

 <span class="keyword">private</span>:
     <span class="type"><a href="qstring.html">QString</a></span> fn;
     <span class="type"><a href="qstring.html">QString</a></span> sn;
     <span class="type">int</span> sal;
 };

 <span class="keyword">typedef</span> <span class="type">Q3ValueList</span><span class="operator">&lt;</span>Employee<span class="operator">&gt;</span> EmployeeList;
 EmployeeList list;

 list<span class="operator">.</span><a href="q3valuelist.html#append">append</a>( Employee(<span class="string">&quot;John&quot;</span><span class="operator">,</span> <span class="string">&quot;Doe&quot;</span><span class="operator">,</span> <span class="number">50000</span>) );
 list<span class="operator">.</span><a href="q3valuelist.html#append">append</a>( Employee(<span class="string">&quot;Jane&quot;</span><span class="operator">,</span> <span class="string">&quot;Williams&quot;</span><span class="operator">,</span> <span class="number">80000</span>) );
 list<span class="operator">.</span><a href="q3valuelist.html#append">append</a>( Employee(<span class="string">&quot;Tom&quot;</span><span class="operator">,</span> <span class="string">&quot;Jones&quot;</span><span class="operator">,</span> <span class="number">60000</span>) );

 Employee mary( <span class="string">&quot;Mary&quot;</span><span class="operator">,</span> <span class="string">&quot;Hawthorne&quot;</span><span class="operator">,</span> <span class="number">90000</span> );
 list<span class="operator">.</span><a href="q3valuelist.html#append">append</a>( mary );
 mary<span class="operator">.</span>setSalary( <span class="number">100000</span> );

 EmployeeList<span class="operator">::</span>iterator it;
 <span class="keyword">for</span> ( it <span class="operator">=</span> list<span class="operator">.</span>begin(); it <span class="operator">!</span><span class="operator">=</span> list<span class="operator">.</span>end(); <span class="operator">+</span><span class="operator">+</span>it )
     cout <span class="operator">&lt;</span><span class="operator">&lt;</span> (<span class="operator">*</span>it)<span class="operator">.</span>surname()<span class="operator">.</span>latin1() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;, &quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span>
             (<span class="operator">*</span>it)<span class="operator">.</span>forename()<span class="operator">.</span>latin1() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot; earns &quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span>
             (<span class="operator">*</span>it)<span class="operator">.</span>salary() <span class="operator">&lt;</span><span class="operator">&lt;</span> endl;

 <span class="comment">// Output:</span>
 <span class="comment">// Doe, John earns 50000</span>
 <span class="comment">// Williams, Jane earns 80000</span>
 <span class="comment">// Hawthorne, Mary earns 90000</span>
 <span class="comment">// Jones, Tom earns 60000</span></pre>
<p>Notice that the latest changes to Mary's salary did not affect the value in the list because the list created a copy of Mary's entry.</p>
<p>There are several ways to find items in the list. The <a href="qlinkedlist.html#begin">begin</a>() and <a href="qlinkedlist.html#end">end</a>() functions return iterators to the beginning and end of the list. The advantage of getting an iterator is that you can move forward or backward from this position by incrementing/decrementing the iterator. The iterator returned by <a href="qlinkedlist.html#end">end</a>() points to the item which is one <i>past</i> the last item in the container. The past-the-end iterator is still associated with the list it belongs to, however it is <i>not</i> dereferenceable; operator*() will not return a well-defined value. If the list is <a href="qlinkedlist.html#empty">empty</a>(), the iterator returned by <a href="qlinkedlist.html#begin">begin</a>() will equal the iterator returned by <a href="qlinkedlist.html#end">end</a>().</p>
<p>It is safe to have multiple iterators a the list at the same time. If some member of the list is removed, only iterators pointing to the removed member become invalid. Inserting into the list does not invalidate any iterator. For convenience, the function <a href="qlinkedlist.html#last">last</a>() returns a reference to the last item in the list, and <a href="qlinkedlist.html#first">first</a>() returns a reference to the first item. If the list is <a href="qlinkedlist.html#empty">empty</a>(), both <a href="qlinkedlist.html#last">last</a>() and <a href="qlinkedlist.html#first">first</a>() have undefined behavior (your application will crash or do unpredictable things). Use <a href="qlinkedlist.html#last">last</a>() and <a href="qlinkedlist.html#first">first</a>() with caution, for example:</p>
<pre class="cpp"> <span class="type">Q3ValueList</span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span> list;
 list<span class="operator">.</span><a href="q3valuelist.html#append">append</a>( <span class="number">1</span> );
 list<span class="operator">.</span><a href="q3valuelist.html#append">append</a>( <span class="number">2</span> );
 list<span class="operator">.</span><a href="q3valuelist.html#append">append</a>( <span class="number">3</span> );
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 <span class="keyword">if</span> ( <span class="operator">!</span>list<span class="operator">.</span>empty() ) {
     <span class="comment">// OK, modify the first item</span>
     <span class="type">int</span><span class="operator">&amp;</span> i <span class="operator">=</span> list<span class="operator">.</span>first();
     i <span class="operator">=</span> <span class="number">18</span>;
 }
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 <span class="type">Q3ValueList</span><span class="operator">&lt;</span><span class="type">double</span><span class="operator">&gt;</span> dlist;
 <span class="type">double</span> d <span class="operator">=</span> dlist<span class="operator">.</span><a href="qlinkedlist.html#last">last</a>(); <span class="comment">// undefined</span></pre>
<p>Because Q3ValueList is value-based there is no need to be careful about deleting items in the list. The list holds its own copies and will free them if the corresponding member or the list itself is deleted. You can force the list to free all of its items with <a href="qlinkedlist.html#clear">clear</a>().</p>
<p>Q3ValueList is shared implicitly, which means it can be copied in constant time, i.e&#x2e; O(1). If multiple Q3ValueList instances share the same data and one needs to modify its contents, this modifying instance makes a copy and modifies its private copy; therefore it does not affect the other instances; this takes O(n) time. This is often called &quot;copy on write&quot;. If a Q3ValueList is being used in a multi-threaded program, you must protect all access to the list. See <a href="qmutex.html">QMutex</a>.</p>
<p>There are several ways to insert items into the list. The <a href="q3valuelist.html#prepend">prepend</a>() and <a href="q3valuelist.html#append">append</a>() functions insert items at the beginning and the end of the list respectively. The <a href="q3valuelist.html#insert">insert</a>() function comes in several flavors and can be used to add one or more items at specific positions within the list.</p>
<p>Items can also be removed from the list in several ways. There are several variants of the <a href="q3valuelist.html#remove">remove</a>() function, which removes a specific item from the list. The <a href="q3valuelist.html#remove">remove</a>() function will find and remove items according to a specific item value.</p>
</div>
<p><b>See also </b><a href="q3valuelistiterator.html">Q3ValueListIterator</a>.</p>
<!-- @@@Q3ValueList -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ConstIterator -->
<h3 class="fn"><a name="ConstIterator-typedef"></a>typedef Q3ValueList::<span class="name">ConstIterator</span></h3>
<p>This iterator is an instantiation of <a href="q3valuelistconstiterator.html" class="compat">Q3ValueListConstIterator</a> for the same type as this <a href="q3valuelist.html" class="compat">Q3ValueList</a>. In other words, if you instantiate <a href="q3valuelist.html" class="compat">Q3ValueList</a>&lt;int&gt;, ConstIterator is a <a href="q3valuelistconstiterator.html" class="compat">Q3ValueListConstIterator</a>&lt;int&gt;. Several member function use it, such as <a href="qlinkedlist.html#begin">Q3ValueList::begin</a>(), which returns an iterator pointing to the first item in the list.</p>
<p>Functionally, this is almost the same as Iterator. The only difference is you cannot use ConstIterator for non-const operations, and that the compiler can often generate better code if you use ConstIterator.</p>
<p><b>See also </b><a href="q3valuelistiterator.html" class="compat">Q3ValueListIterator</a> and <a href="q3valuelist.html#Iterator-typedef">Iterator</a>.</p>
<!-- @@@ConstIterator -->
<!-- $$$Iterator -->
<h3 class="fn"><a name="Iterator-typedef"></a>typedef Q3ValueList::<span class="name">Iterator</span></h3>
<p>This iterator is an instantiation of <a href="q3valuelistiterator.html" class="compat">Q3ValueListIterator</a> for the same type as this <a href="q3valuelist.html" class="compat">Q3ValueList</a>. In other words, if you instantiate <a href="q3valuelist.html" class="compat">Q3ValueList</a>&lt;int&gt;, Iterator is a <a href="q3valuelistiterator.html" class="compat">Q3ValueListIterator</a>&lt;int&gt;. Several member function use it, such as <a href="qlinkedlist.html#begin">Q3ValueList::begin</a>(), which returns an iterator pointing to the first item in the list.</p>
<p>Functionally, this is almost the same as <a href="q3valuelist.html#ConstIterator-typedef">ConstIterator</a>. The only difference is that you cannot use <a href="q3valuelist.html#ConstIterator-typedef">ConstIterator</a> for non-const operations, and that the compiler can often generate better code if you use <a href="q3valuelist.html#ConstIterator-typedef">ConstIterator</a>.</p>
<p><b>See also </b><a href="q3valuelistiterator.html" class="compat">Q3ValueListIterator</a> and <a href="q3valuelist.html#ConstIterator-typedef">ConstIterator</a>.</p>
<!-- @@@Iterator -->
<!-- $$$const_iterator -->
<h3 class="fn"><a name="const_iterator-typedef"></a>typedef Q3ValueList::<span class="name">const_iterator</span></h3>
<p>The list's const iterator type, <a href="q3valuelistconstiterator.html" class="compat">Q3ValueListConstIterator</a>.</p>
<!-- @@@const_iterator -->
<!-- $$$const_pointer -->
<h3 class="fn"><a name="const_pointer-typedef"></a>typedef Q3ValueList::<span class="name">const_pointer</span></h3>
<p>The const pointer to T type.</p>
<!-- @@@const_pointer -->
<!-- $$$const_reference -->
<h3 class="fn"><a name="const_reference-typedef"></a>typedef Q3ValueList::<span class="name">const_reference</span></h3>
<p>The const reference to T type.</p>
<!-- @@@const_reference -->
<!-- $$$iterator -->
<h3 class="fn"><a name="iterator-typedefx"></a>typedef Q3ValueList::<span class="name">iterator</span></h3>
<p>The list's iterator type, <a href="q3valuelistiterator.html" class="compat">Q3ValueListIterator</a>.</p>
<!-- @@@iterator -->
<!-- $$$pointer -->
<h3 class="fn"><a name="pointer-typedef"></a>typedef Q3ValueList::<span class="name">pointer</span></h3>
<p>The pointer to T type.</p>
<!-- @@@pointer -->
<!-- $$$reference -->
<h3 class="fn"><a name="reference-typedef"></a>typedef Q3ValueList::<span class="name">reference</span></h3>
<p>The reference to T type.</p>
<!-- @@@reference -->
<!-- $$$size_type -->
<h3 class="fn"><a name="size_type-typedef"></a>typedef Q3ValueList::<span class="name">size_type</span></h3>
<p>An unsigned integral type, used to represent various sizes.</p>
<!-- @@@size_type -->
<!-- $$$value_type -->
<h3 class="fn"><a name="value_type-typedef"></a>typedef Q3ValueList::<span class="name">value_type</span></h3>
<p>The type of the object stored in the list, T.</p>
<!-- @@@value_type -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3ValueList[overload1]$$$Q3ValueList -->
<h3 class="fn"><a name="Q3ValueList"></a>Q3ValueList::<span class="name">Q3ValueList</span> ()</h3>
<p>Constructs an empty list.</p>
<!-- @@@Q3ValueList -->
<!-- $$$Q3ValueList$$$Q3ValueListconstQ3ValueList<T>& -->
<h3 class="fn"><a name="Q3ValueList-2"></a>Q3ValueList::<span class="name">Q3ValueList</span> ( const <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>Constructs a copy of <i>l</i>.</p>
<!-- @@@Q3ValueList -->
<!-- $$$Q3ValueList$$$Q3ValueListconstQLinkedList<T>& -->
<h3 class="fn"><a name="Q3ValueList-3"></a>Q3ValueList::<span class="name">Q3ValueList</span> ( const <span class="type"><a href="qlinkedlist.html">QLinkedList</a></span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>Constructs a copy of <i>l</i>.</p>
<!-- @@@Q3ValueList -->
<!-- $$$Q3ValueList$$$Q3ValueListconstQList<T>& -->
<h3 class="fn"><a name="Q3ValueList-4"></a>Q3ValueList::<span class="name">Q3ValueList</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>Constructs a copy of <i>l</i>.</p>
<!-- @@@Q3ValueList -->
<!-- $$$Q3ValueList$$$Q3ValueListconststd::list<T>& -->
<h3 class="fn"><a name="Q3ValueList-5"></a>Q3ValueList::<span class="name">Q3ValueList</span> ( const <span class="type">std::list</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>Contructs a copy of <i>l</i>.</p>
<p>This constructor is provided for compatibility with STL containers.</p>
<!-- @@@Q3ValueList -->
<!-- $$$~Q3ValueList[overload1]$$$~Q3ValueList -->
<h3 class="fn"><a name="dtor.Q3ValueList"></a>Q3ValueList::<span class="name">~Q3ValueList</span> ()</h3>
<p>Destroys the list. References to the values in the list and all iterators of this list become invalidated. Note that it is impossible for an iterator to check whether or not it is valid: <a href="q3valuelist.html" class="compat">Q3ValueList</a> is highly tuned for performance, not for error checking.</p>
<!-- @@@~Q3ValueList -->
<!-- $$$append[overload1]$$$appendconstT& -->
<h3 class="fn"><a name="append"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::Iterator</span> Q3ValueList::<span class="name">append</span> ( const <span class="type">T</span> &amp; <i>x</i> )</h3>
<p>Inserts <i>x</i> at the end of the list.</p>
<p><b>See also </b><a href="q3valuelist.html#insert">insert</a>() and <a href="q3valuelist.html#prepend">prepend</a>().</p>
<!-- @@@append -->
<!-- $$$at[overload1]$$$atQ3ValueList<T>::size_type -->
<h3 class="fn"><a name="at"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::ConstIterator</span> Q3ValueList::<span class="name">at</span> ( <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::size_type</span> <i>i</i> ) const</h3>
<p>Returns an iterator pointing to the item at position <i>i</i> in the list, or an undefined value if the index is out of range.</p>
<p><b>Warning:</b> This function uses a linear search and can be extremely slow for large lists. <a href="q3valuelist.html" class="compat">Q3ValueList</a> is not optimized for random item access. If you need random access use a different container, such as <a href="q3valuevector.html" class="compat">Q3ValueVector</a>.</p>
<!-- @@@at -->
<!-- $$$at$$$atQ3ValueList<T>::size_type -->
<h3 class="fn"><a name="at-2"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::Iterator</span> Q3ValueList::<span class="name">at</span> ( <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::size_type</span> <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Returns an iterator pointing to the item at position <i>i</i> in the list, or an undefined value if the index is out of range.</p>
<!-- @@@at -->
<!-- $$$contains[overload1]$$$containsconstT& -->
<h3 class="fn"><a name="contains"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::size_type</span> Q3ValueList::<span class="name">contains</span> ( const <span class="type">T</span> &amp; <i>x</i> ) const</h3>
<p>Returns the number of occurrences of the value <i>x</i> in the list.</p>
<!-- @@@contains -->
<!-- $$$fromLast[overload1]$$$fromLast -->
<h3 class="fn"><a name="fromLast"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::ConstIterator</span> Q3ValueList::<span class="name">fromLast</span> () const</h3>
<p>Returns an iterator to the last item in the list, or <a href="qlinkedlist.html#end">end</a>() if there is no last item.</p>
<p>Use the <a href="qlinkedlist.html#end">end</a>() function instead. For example:</p>
<pre class="cpp"> <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span> l;
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span><span class="operator">::</span>iterator it <span class="operator">=</span> l<span class="operator">.</span><a href="qlinkedlist.html#end">end</a>();
 <span class="operator">-</span><span class="operator">-</span>it;
 <span class="keyword">if</span> ( it <span class="operator">!</span><span class="operator">=</span> end() )
     <span class="comment">// ...</span></pre>
<!-- @@@fromLast -->
<!-- $$$fromLast$$$fromLast -->
<h3 class="fn"><a name="fromLast-2"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::Iterator</span> Q3ValueList::<span class="name">fromLast</span> ()</h3>
<p>This is an overloaded function.</p>
<p>Returns an iterator to the last item in the list, or <a href="qlinkedlist.html#end">end</a>() if there is no last item.</p>
<p>Use the <a href="qlinkedlist.html#end">end</a>() function instead. For example:</p>
<pre class="cpp"> <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span> l;
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span><span class="operator">::</span>iterator it <span class="operator">=</span> l<span class="operator">.</span><a href="qlinkedlist.html#end">end</a>();
 <span class="operator">-</span><span class="operator">-</span>it;
 <span class="keyword">if</span> ( it <span class="operator">!</span><span class="operator">=</span> end() )
     <span class="comment">// ...</span></pre>
<!-- @@@fromLast -->
<!-- $$$insert[overload1]$$$insertQ3ValueList<T>::IteratorconstT& -->
<h3 class="fn"><a name="insert"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::Iterator</span> Q3ValueList::<span class="name">insert</span> ( <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::Iterator</span> <i>it</i>, const <span class="type">T</span> &amp; <i>x</i> )</h3>
<p>Inserts the value <i>x</i> in front of the item pointed to by the iterator, <i>it</i>.</p>
<p>Returns an iterator pointing at the inserted item.</p>
<p><b>See also </b><a href="q3valuelist.html#append">append</a>() and <a href="q3valuelist.html#prepend">prepend</a>().</p>
<!-- @@@insert -->
<!-- $$$insert$$$insertQ3ValueList<T>::IteratorQ3ValueList<T>::size_typeconstT& -->
<h3 class="fn"><a name="insert-2"></a><span class="type">void</span> Q3ValueList::<span class="name">insert</span> ( <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::Iterator</span> <i>pos</i>, <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::size_type</span> <i>n</i>, const <span class="type">T</span> &amp; <i>x</i> )</h3>
<p>This is an overloaded function.</p>
<p>Inserts <i>n</i> copies of <i>x</i> before position <i>pos</i>.</p>
<!-- @@@insert -->
<!-- $$$prepend[overload1]$$$prependconstT& -->
<h3 class="fn"><a name="prepend"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::Iterator</span> Q3ValueList::<span class="name">prepend</span> ( const <span class="type">T</span> &amp; <i>x</i> )</h3>
<p>Inserts <i>x</i> at the beginning of the list.</p>
<p><b>See also </b><a href="q3valuelist.html#insert">insert</a>() and <a href="q3valuelist.html#append">append</a>().</p>
<!-- @@@prepend -->
<!-- $$$remove[overload1]$$$removeQ3ValueList<T>::Iterator -->
<h3 class="fn"><a name="remove"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::Iterator</span> Q3ValueList::<span class="name">remove</span> ( <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::Iterator</span> <i>it</i> )</h3>
<p>Removes the item pointed to by <i>it</i> from the list. No iterators other than <i>it</i> or other iterators pointing at the same item as <i>it</i> are invalidated. Returns an iterator to the next item after <i>it</i>, or <a href="qlinkedlist.html#end">end</a>() if there is no such item.</p>
<p><b>See also </b><a href="qlinkedlist.html#clear">clear</a>().</p>
<!-- @@@remove -->
<!-- $$$remove$$$removeconstT& -->
<h3 class="fn"><a name="remove-2"></a><span class="type">int</span> Q3ValueList::<span class="name">remove</span> ( const <span class="type">T</span> &amp; <i>x</i> )</h3>
<p>This is an overloaded function.</p>
<p>Removes all items that have value <i>x</i> and returns the number of removed items.</p>
<!-- @@@remove -->
<!-- $$$operator QList<T>[overload1]$$$operator QList<T> -->
<h3 class="fn"><a name="operator-QList-ltT-gt"></a>Q3ValueList::<span class="name">operator QList&lt;T&gt;</span> () const</h3>
<p>Automatically converts a <a href="q3valuelist.html" class="compat">Q3ValueList</a>&lt;T&gt; into a <a href="qlist.html">QList</a>&lt;T&gt;.</p>
<!-- @@@operator QList<T> -->
<!-- $$$operator!=[overload1]$$$operator!=constQ3ValueList<T>& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> Q3ValueList::<span class="name">operator!=</span> ( const <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> ) const</h3>
<p>Compares both lists.</p>
<p>Returns TRUE if this list and <i>l</i> are unequal; otherwise returns FALSE.</p>
<!-- @@@operator!= -->
<!-- $$$operator+[overload1]$$$operator+constQ3ValueList<T>& -->
<h3 class="fn"><a name="operator-2b"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; Q3ValueList::<span class="name">operator+</span> ( const <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> ) const</h3>
<p>Creates a new list and fills it with the items of this list. Then the items of <i>l</i> are appended. Returns the new list.</p>
<!-- @@@operator+ -->
<!-- $$$operator+=[overload1]$$$operator+=constQ3ValueList<T>& -->
<h3 class="fn"><a name="operator-2b-eq"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; Q3ValueList::<span class="name">operator+=</span> ( const <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>Appends the items of <i>l</i> to this list. Returns a reference to this list.</p>
<!-- @@@operator+= -->
<!-- $$$operator+=$$$operator+=constT& -->
<h3 class="fn"><a name="operator-2b-eq-2"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; Q3ValueList::<span class="name">operator+=</span> ( const <span class="type">T</span> &amp; <i>x</i> )</h3>
<p>This is an overloaded function.</p>
<p>Appends the value <i>x</i> to the list. Returns a reference to the list.</p>
<!-- @@@operator+= -->
<!-- $$$operator<<[overload1]$$$operator<<constT& -->
<h3 class="fn"><a name="operator-lt-lt"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; Q3ValueList::<span class="name">operator&lt;&lt;</span> ( const <span class="type">T</span> &amp; <i>x</i> )</h3>
<p>Adds the value <i>x</i> to the end of the list.</p>
<p>Returns a reference to the list.</p>
<!-- @@@operator<< -->
<!-- $$$operator=[overload1]$$$operator=constQ3ValueList<T>& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; Q3ValueList::<span class="name">operator=</span> ( const <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>Assigns <i>l</i> to this list and returns a reference to this list.</p>
<p>All iterators of the current list become invalidated by this operation. The cost of such an assignment is O(1) since <a href="q3valuelist.html" class="compat">Q3ValueList</a> is implicitly shared.</p>
<!-- @@@operator= -->
<!-- $$$operator=$$$operator=constQList<T>& -->
<h3 class="fn"><a name="operator-eq-2"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; Q3ValueList::<span class="name">operator=</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>Assigns <i>l</i> to this list and returns a reference to this list.</p>
<p>All iterators of the current list become invalidated by this operation.</p>
<!-- @@@operator= -->
<!-- $$$operator=$$$operator=conststd::list<T>& -->
<h3 class="fn"><a name="operator-eq-3"></a><span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; Q3ValueList::<span class="name">operator=</span> ( const <span class="type">std::list</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>This is an overloaded function.</p>
<p>Assigns the contents of <i>l</i> to the list.</p>
<p>All iterators of the current list become invalidated by this operation.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQ3ValueList<T>& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> Q3ValueList::<span class="name">operator==</span> ( const <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> ) const</h3>
<p>Compares both lists.</p>
<p>Returns TRUE if this list and <i>l</i> are equal; otherwise returns FALSE.</p>
<!-- @@@operator== -->
<!-- $$$operator==$$$operator==conststd::list<T>& -->
<h3 class="fn"><a name="operator-eq-eq-2"></a><span class="type">bool</span> Q3ValueList::<span class="name">operator==</span> ( const <span class="type">std::list</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns TRUE if this list and <i>l</i> are equal; otherwise returns FALSE.</p>
<p>This operator is provided for compatibility with STL containers.</p>
<!-- @@@operator== -->
<!-- $$$operator[][overload1]$$$operator[]Q3ValueList<T>::size_type -->
<h3 class="fn"><a name="operator-5b-5d"></a>const <span class="type">T</span> &amp; Q3ValueList::<span class="name">operator[]</span> ( <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::size_type</span> <i>i</i> ) const</h3>
<p>Returns a const reference to the item with index <i>i</i> in the list. It is up to you to check whether this item really exists. You can do that easily with the <a href="qlinkedlist.html#count">count</a>() function. However this operator does not check whether <i>i</i> is in range and will deliver undefined results if it does not exist.</p>
<p><b>Warning:</b> This function uses a linear search and can be extremely slow for large lists. <a href="q3valuelist.html" class="compat">Q3ValueList</a> is not optimized for random item access. If you need random access use a different container, such as <a href="q3valuevector.html" class="compat">Q3ValueVector</a>.</p>
<!-- @@@operator[] -->
<!-- $$$operator[]$$$operator[]Q3ValueList<T>::size_type -->
<h3 class="fn"><a name="operator-5b-5d-2"></a><span class="type">T</span> &amp; Q3ValueList::<span class="name">operator[]</span> ( <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt;<span class="type">::size_type</span> <i>i</i> )</h3>
<p>This is an overloaded function.</p>
<p>Returns a non-const reference to the item with index <i>i</i>.</p>
<!-- @@@operator[] -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<$$$operator<<QDataStream&constQ3ValueList<T>& -->
<h3 class="fn"><a name="operator-lt-lt-208"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&lt;&lt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>s</i>, const <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes a list, <i>l</i>, to the stream <i>s</i>. The type T stored in the list must implement the streaming operator.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>$$$operator>>QDataStream&Q3ValueList<T>& -->
<h3 class="fn"><a name="operator-gt-gt-28"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&gt;&gt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>s</i>, <span class="type">Q3ValueList</span>&lt;<span class="type">T</span>&gt; &amp; <i>l</i> )</h3>
<p>Reads a list, <i>l</i>, from the stream <i>s</i>. The type T stored in the list must implement the streaming operator.</p>
<!-- @@@operator>> -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>