⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list.html

📁 ST20 Embedded Toolset R2.0.5用于开发基于ST20芯片机顶盒软件的开发平台,2.0.5版本,国内找不到的.在国外论坛上花了N天才找到!
💻 HTML
📖 第 1 页 / 共 3 页
字号:
to an element of the controlled sequence.</P><H3><CODE><A NAME="list::const_reference">list::const_reference</A></CODE></H3><PRE>typedef typename Alloc::const_reference <B>const_reference</B>;</PRE><P>The type describes an object that can serve as a constant referenceto an element of the controlled sequence.</P><H3><CODE><A NAME="list::const_reverse_iterator">list::const_reverse_iterator</A></CODE></H3><PRE>typedef reverse_iterator&lt;const_iterator&gt;    <B>const_reverse_iterator</B>;</PRE><P>The type describes an object that can serve as a constant reversebidirectional iterator for the controlled sequence.</P><H3><CODE><A NAME="list::difference_type">list::difference_type</A></CODE></H3><PRE>typedef T3 <B>difference_type</B>;</PRE><P>The signed integer type describes an object that can represent thedifference between the addresses of any two elements in the controlledsequence. It is described here as asynonym for the implementation-defined type <CODE>T3</CODE>.</P><H3><CODE><A NAME="list::empty">list::empty</A></CODE></H3><PRE>bool <B>empty</B>() const;</PRE><P>The member function returns true for an empty controlled sequence.</P><H3><CODE><A NAME="list::end">list::end</A></CODE></H3><PRE>const_iterator <B>end</B>() const;iterator <B>end</B>();</PRE><P>The member function returns a bidirectional iterator that pointsjust beyond the end of the sequence.</P><H3><CODE><A NAME="list::erase">list::erase</A></CODE></H3><PRE>iterator <B>erase</B>(iterator where);iterator <B>erase</B>(iterator first, iterator last);</PRE><P>The first member function removes the element of the controlledsequence pointed to by <CODE>where</CODE>. The second member functionremoves the elements of the controlled sequencein the range <CODE>[first, last)</CODE>.Both return an iterator that designates the first element remainingbeyond any elements removed, or<CODE><A HREF="#list::end">end</A>()</CODE> if no such element exists.</P><P>Erasing <CODE>N</CODE> elements causes<CODE>N</CODE> destructor calls.<A HREF="#list reallocation">Reallocation</A> occurs,so iterators and references become<A HREF="#invalid list iterators">invalid</A> for the erasedelements.</P><P>The member functions never throw an exception.</P><H3><CODE><A NAME="list::front">list::front</A></CODE></H3><PRE>reference <B>front</B>();const_reference <B>front</B>() const;</PRE><P>The member function returns a reference to the first element of thecontrolled sequence, which must be non-empty.</P><H3><CODE><A NAME="list::get_allocator">list::get_allocator</A></CODE></H3><PRE>Alloc <B>get_allocator</B>() const;</PRE><P>The member function returns the stored<A HREF="memory.html#allocator object">allocator object</A>.</P><H3><CODE><A NAME="list::insert">list::insert</A></CODE></H3><PRE>iterator <B>insert</B>(iterator where, const Ty&amp; val);void <B>insert</B>(iterator where, size_type count, const Ty&amp; val);template&lt;class InIt&gt;    void <B>insert</B>(iterator where, InIt first, InIt last);</PRE><P>Each of the member functions inserts, before the element pointed toby <CODE>where</CODE> in the controlled sequence, a sequencespecified by the remaining operands.The first member function insertsa single element with value <CODE>val</CODE> and returns an iteratorthat designates the newly inserted element. The second member functioninserts a repetition of <CODE>count</CODE> elements of value <CODE>val</CODE>.</P><P>If <CODE>InIt</CODE> is an integer type, the last memberfunction behaves the same as <CODE>insert(where, (size_type)first, (Ty)last)</CODE>.Otherwise, the last member function inserts the sequence<CODE>[first, last)</CODE>, which must <I>not</I> overlapthe initial controlled sequence.</P><P>Inserting <CODE>N</CODE> elements causes <CODE>N</CODE>constructor calls.<A HREF="#list reallocation">Reallocation</A> occurs,but no iterators or references become<A HREF="#invalid list iterators">invalid</A>.</P><P>If an exception is thrown during theinsertion of one or more elements, the container is left unalteredand the exception is rethrown.</P><H3><CODE><A NAME="list::iterator">list::iterator</A></CODE></H3><PRE>typedef T0 <B>iterator</B>;</PRE><P>The type describes an object that can serve as a bidirectionaliterator for the controlled sequence.It is described here as asynonym for the implementation-defined type <CODE>T0</CODE>.</P><H3><CODE><A NAME="list::list">list::list</A></CODE></H3><PRE><B>list</B>();explicit <B>list</B>(const Alloc&amp; al);explicit <B>list</B>(size_type count);<B>list</B>(size_type count, const Ty&amp; val);<B>list</B>(size_type count, const Ty&amp; val,    const Alloc&amp; al);<B>list</B>(const list&amp; right);template&lt;class InIt&gt;    <B>list</B>(InIt first, InIt last);template&lt;class InIt&gt;    <B>list</B>(InIt first, InIt last, const Alloc&amp; al);</PRE><P>All constructors store an<A HREF="memory.html#allocator object">allocator object</A> andinitialize the controlled sequence. The allocator object is the argument<CODE>al</CODE>, if present. For the copy constructor, it is<CODE>right.<A HREF="#list::get_allocator">get_allocator</A>()</CODE>.Otherwise, it is <CODE>Alloc()</CODE>.</P><P>The first two constructors specify anempty initial controlled sequence. The third constructor specifiesa repetition of <CODE>count</CODE> elements of value <CODE>Ty()</CODE>.The fourth and fifth constructors specifya repetition of <CODE>count</CODE> elements of value <CODE>val</CODE>.The sixth constructor specifies a copy of the sequence controlled by<CODE>right</CODE>.If <CODE>InIt</CODE> is an integer type, the last two constructorsspecify a repetition of <CODE>(size_type)first</CODE> elements of value<CODE>(Ty)last</CODE>. Otherwise, thelast two constructors specify the sequence<CODE>[first, last)</CODE>.</P><H3><CODE><A NAME="list::max_size">list::max_size</A></CODE></H3><PRE>size_type <B>max_size</B>() const;</PRE><P>The member function returns the length of the longest sequence thatthe object can control.</P><H3><CODE><A NAME="list::merge">list::merge</A></CODE></H3><PRE>void <B>merge</B>(list&amp; right);template&lt;class Pr3&gt;    void <B>merge</B>(list&amp; right, Pre3 pred);</PRE><P>Both member functions remove all elements from the sequencecontrolled by <CODE>right</CODE> and insert them in the controlledsequence. Both sequences must be<A HREF="lib_stl.html#sequence ordering">ordered by</A> the same predicate,described below. The resulting sequence is also ordered by thatpredicate.</P><P>For the iterators <CODE>Pi</CODE> and <CODE>Pj</CODE>designating elements at positions <CODE>I</CODE>and <CODE>J</CODE>, the first member function imposes theorder <CODE>!(*Pj &lt; *Pi)</CODE> whenever <CODE>I &lt; J</CODE>.(The elements are sorted in <I>ascending</I> order.)The second member function imposes the order<CODE>!pred(*Pj, *Pi)</CODE> whenever <CODE>I &lt; J</CODE>.</P><P>No pairs of elements in the original controlled sequenceare reversed in the resulting controlled sequence. If a pairof elements in the resulting controlled sequence has<A HREF="lib_stl.html#equivalent ordering">equivalent ordering</A>(<CODE>!(*Pi &lt; *Pj) &amp;&amp; !(*Pj &lt; *Pi)</CODE>),an element from the original controlled sequence appears beforean element from the sequence controlled by <CODE>right</CODE>.</P><P>An exception occurs only if <CODE>pred</CODE> throws an exception.In that case, the controlled sequence is left in unspecified orderand the exception is rethrown.</P><H3><CODE><A NAME="list::pointer">list::pointer</A></CODE></H3><PRE>typedef typename Alloc::pointer <B>pointer</B>;</PRE><P>The type describes an object that can serve as a pointer to anelement of the controlled sequence.</P><H3><CODE><A NAME="list::pop_back">list::pop_back</A></CODE></H3><PRE>void <B>pop_back</B>();</PRE><P>The member function removes the last element of thecontrolled sequence, which must be non-empty.</P><P>The member function never throws an exception.</P><H3><CODE><A NAME="list::pop_front">list::pop_front</A></CODE></H3><PRE>void <B>pop_front</B>();</PRE><P>The member function removes the first element of thecontrolled sequence, which must be non-empty.</P><P>The member function never throws an exception.</P><H3><CODE><A NAME="list::push_back">list::push_back</A></CODE></H3><PRE>void <B>push_back</B>(const Ty&amp; val);</PRE><P>The member function inserts an element with value <CODE>val</CODE>at the end of the controlled sequence.</P><P>If an exception is thrown, the container is left unalteredand the exception is rethrown.</P><H3><CODE><A NAME="list::push_front">list::push_front</A></CODE></H3><PRE>void <B>push_front</B>(const Ty&amp; val);</PRE><P>The member function inserts an element with value <CODE>val</CODE>at the beginning of the controlled sequence.</P><P>If an exception is thrown, the container is left unalteredand the exception is rethrown.</P><H3><CODE><A NAME="list::rbegin">list::rbegin</A></CODE></H3><PRE>const_reverse_iterator <B>rbegin</B>() const;reverse_iterator <B>rbegin</B>();</PRE><P>The member function returns a reverse bidirectionaliterator that points justbeyond the end of the controlled sequence. Hence, it designates thebeginning of the reverse sequence.</P><H3><CODE><A NAME="list::reference">list::reference</A></CODE></H3><PRE>typedef typename Alloc::reference <B>reference</B>;</PRE><P>The type describes an object that can serve as a reference to anelement of the controlled sequence.</P><H3><CODE><A NAME="list::remove">list::remove</A></CODE></H3><PRE>void <B>remove</B>(const Ty&amp; val);</PRE><P>The member function removes from the controlled sequenceall elements, designated by the iterator <CODE>where</CODE>, for which<CODE>*where == val</CODE>.</P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -