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

📄 hash_map.html

📁 ST20 Embedded Toolset R2.0.5用于开发基于ST20芯片机顶盒软件的开发平台,2.0.5版本,国内找不到的.在国外论坛上花了N天才找到!
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<P>The type describes the sort key object stored in eachelement of the controlled sequence.</P><H3><CODE><A NAME="hash_map::lower_bound">hash_map::lower_bound</A></CODE></H3><PRE>iterator <B>lower_bound</B>(const Key&amp; keyval);const_iterator <B>lower_bound</B>(const Key&amp; keyval) const;</PRE><P>The member function returns an iterator that designates theearliest element <CODE>X</CODE> in the controlled sequencefor which <CODE>X.<A HREF="utility.html#pair::first">first</A></CODE> has<A HREF="lib_stl.html#equivalent ordering">equivalent ordering</A>to <CODE>keyval</CODE>.If no such element exists, the function returns<CODE><A HREF="#hash_map::end">end</A>()</CODE>.<H3><CODE><A NAME="hash_map::mapped_type">hash_map::mapped_type</A></CODE></H3><PRE>typedef Ty <B>mapped_type</B>;</PRE><P>The type is a synonym for the template parameter <CODE>Ty</CODE>.</P><H3><CODE><A NAME="hash_map::max_size">hash_map::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="hash_map::operator[]">hash_map::operator[]</A></CODE></H3><PRE>Ty&amp; <B>operator[]</B>(const Key&amp; keyval);</PRE><P>The member function determines the iterator <CODE>where</CODE>as the return value of<CODE><A HREF="#hash_map::insert">insert</A>(<A HREF="#hash_map::value_type">value_type</A>(keyval, Ty())</CODE>.(It inserts an element with the specified key if no such elementexists.) It then returns a reference to<CODE>(*where).<A HREF="utility.html#pair::second">second</A></CODE>.</P><H3><CODE><A NAME="hash_map::pointer">hash_map::pointer</A></CODE></H3><PRE>typedef 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="hash_map::rbegin">hash_map::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="hash_map::reference">hash_map::reference</A></CODE></H3><PRE>typedef 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="hash_map::rend">hash_map::rend</A></CODE></H3><PRE>const_reverse_iterator <B>rend</B>() const;reverse_iterator <B>rend</B>();</PRE><P>The member function returns a reverse bidirectionaliterator that points at thefirst element of the sequence (or just beyond the end of an emptysequence). Hence, it designates the end of the reverse sequence.</P><H3><CODE><A NAME="hash_map::reverse_iterator">hash_map::reverse_iterator</A></CODE></H3><PRE>typedef reverse_iterator&lt;iterator&gt; <B>reverse_iterator</B>;</PRE><P>The type describes an object that can serve as a reversebidirectional iterator for the controlled sequence.</P><H3><CODE><A NAME="hash_map::size">hash_map::size</A></CODE></H3><PRE>size_type <B>size</B>() const;</PRE><P>The member function returns the length of the controlled sequence.</P><H3><CODE><A NAME="hash_map::size_type">hash_map::size_type</A></CODE></H3><PRE>typedef T2 <B>size_type</B>;</PRE><P>The unsigned integer type describes an object that can represent thelength of any controlled sequence. It is described here as asynonym for the implementation-defined type <CODE>T2</CODE>.</P><H3><CODE><A NAME="hash_map::swap">hash_map::swap</A></CODE></H3><PRE>void <B>swap</B>(hash_map&amp; right);</PRE><P>The member function swaps the controlled sequences between<CODE>*this</CODE> and <CODE>right</CODE>. If<CODE><A HREF="#hash_map::get_allocator">get_allocator</A>()== right.get_allocator()</CODE>, it does so in constant time,it throws an exception only as a result of copying the storedtraits object of type <CODE>Tr</CODE>, and it invalidates no references, pointers,or iterators that designate elements in the two controlled sequences.Otherwise, it performs a number of element assignments and constructor callsproportional to the number of elements in the two controlled sequences.</P><H3><CODE><A NAME="hash_map::upper_bound">hash_map::upper_bound</A></CODE></H3><PRE>iterator <B>upper_bound</B>(const Key&amp; keyval);const_iterator <B>upper_bound</B>(const Key&amp; keyval) const;</PRE><P>The member function returns an iteratorjust beyond the iterator that designates thelatest element <CODE>X</CODE> in the controlled sequencefor which <CODE>X.<A HREF="utility.html#pair::first">first</A></CODE> has<A HREF="lib_stl.html#equivalent ordering">equivalent ordering</A>to <CODE>keyval</CODE>.If no such element exists, the function returns<CODE><A HREF="#hash_map::end">end</A>()</CODE>.<H3><CODE><A NAME="hash_map::value_comp">hash_map::value_comp</A></CODE></H3><PRE>value_compare <B>value_comp</B>() const;</PRE><P>The member function returns a function object thatdetermines the order of elements in the controlled sequence.</P><H3><CODE><A NAME="hash_map::value_compare">hash_map::value_compare</A></CODE></H3><PRE>class <B>value_compare</B>    : public <A HREF="functio2.html#binary_function">binary_function</A>&lt;value_type, value_type,        bool&gt; {public:    bool operator()(const value_type&amp; left,        const value_type&amp; right) const        {return (comp(left.first, right.first)); }protected:    value_compare(key_compare pr)        : comp(pr) {}    key_compare comp;    };</PRE><P>The type describes a function object that can compare thesort keys in two elements to determine their relative orderin the controlled sequence. The function object stores an object<B><CODE><A NAME="hash_map::value_compare::comp">comp</A></CODE></B>of type <CODE><A HREF="#hash_map::key_type">key_type</A></CODE>.The member function <B><CODE>operator()</CODE></B> uses thisobject to compare the sort-key components of two element.</P><H3><CODE><A NAME="hash_map::value_type">hash_map::value_type</A></CODE></H3><PRE>typedef <A HREF="utility.html#pair">pair</A>&lt;const Key, Ty&gt; <B>value_type</B>;</PRE><P>The type describes an element of the controlled sequence.</P><H2><A NAME="hash_multimap"><CODE>hash_multimap</CODE></A></H2><HR><P><B><CODE><A HREF="#hash_multimap::allocator_type">allocator_type</A>&#183; <A HREF="#hash_multimap::begin">begin</A>&#183; <A HREF="#hash_multimap::clear">clear</A>&#183; <A HREF="#hash_multimap::const_iterator">const_iterator</A>&#183; <A HREF="#hash_multimap::const_pointer">const_pointer</A>&#183; <A HREF="#hash_multimap::const_reference">const_reference</A>&#183; <A HREF="#hash_multimap::const_reverse_iterator">const_reverse_iterator</A>&#183; <A HREF="#hash_multimap::count">count</A>&#183; <A HREF="#hash_multimap::difference_type">difference_type</A>&#183; <A HREF="#hash_multimap::empty">empty</A>&#183; <A HREF="#hash_multimap::end">end</A>&#183; <A HREF="#hash_multimap::equal_range">equal_range</A>&#183; <A HREF="#hash_multimap::erase">erase</A>&#183; <A HREF="#hash_multimap::find">find</A>&#183; <A HREF="#hash_multimap::get_allocator">get_allocator</A>&#183; <A HREF="#hash_multimap::insert">insert</A>&#183; <A HREF="#hash_multimap::iterator">iterator</A>&#183; <A HREF="#hash_multimap::key_comp">key_comp</A>&#183; <A HREF="#hash_multimap::key_compare">key_compare</A>&#183; <A HREF="#hash_multimap::key_type">key_type</A>&#183; <A HREF="#hash_multimap::lower_bound">lower_bound</A>&#183; <A HREF="#hash_multimap::mapped_type">mapped_type</A>&#183; <A HREF="#hash_multimap::max_size">max_size</A>&#183; <A HREF="#hash_multimap::hash_multimap">hash_multimap</A>&#183; <A HREF="#hash_multimap::rbegin">rbegin</A>&#183; <A HREF="#hash_multimap::reference">reference</A>&#183; <A HREF="#hash_multimap::rend">rend</A>&#183; <A HREF="#hash_multimap::reverse_iterator">reverse_iterator</A>&#183; <A HREF="#hash_multimap::size">size</A>&#183; <A HREF="#hash_multimap::size_type">size_type</A>&#183; <A HREF="#hash_multimap::swap">swap</A>&#183; <A HREF="#hash_multimap::upper_bound">upper_bound</A>&#183; <A HREF="#hash_multimap::value_comp">value_comp</A>&#183; <A HREF="#hash_multimap::value_compare">value_compare</A>&#183; <A HREF="#hash_multimap::value_type">value_type</A></CODE></B></P><HR><PRE>template&lt;class Key, class Ty,    class Tr = hash_compare&lt;Key, less&lt;Key&gt; &gt;,    class Alloc = allocator&lt;pair&lt;const Key, Ty&gt; &gt; &gt;    class <B>hash_multimap</B> {public:    typedef Key <B><A HREF="#hash_multimap::key_type">key_type</A></B>;    typedef Ty <B><A HREF="#hash_multimap::mapped_type">mapped_type</A></B>;    typedef Tr <B><A HREF="#hash_multimap::key_compare">key_compare</A></B>;    typedef Alloc <B><A HREF="#hash_multimap::allocator_type">allocator_type</A></B>;    typedef pair&lt;const Key, Ty&gt; <B><A HREF="#hash_multimap::value_type">value_type</A></B>;    class <B><A HREF="#hash_multimap::value_compare">value_compare</A></B>;    typedef Alloc::pointer <B><A HREF="#hash_multimap::pointer">pointer</A></B>;    typedef Alloc::const_pointer <B><A HREF="#hash_multimap::const_pointer">const_pointer</A></B>;    typedef Alloc::reference <B><A HREF="#hash_multimap::reference">reference</A></B>;    typedef Alloc::const_reference <B><A HREF="#hash_multimap::const_reference">const_reference</A></B>;    typedef T0 <B><A HREF="#hash_multimap::iterator">iterator</A></B>;    typedef T1 <B><A HREF="#hash_multimap::const_iterator">const_iterator</A></B>;    typedef T2 <B><A HREF="#hash_multimap::size_type">size_type</A></B>;    typedef T3 <B><A HREF="#hash_multimap::difference_type">difference_type</A></B>;    typedef reverse_iterator&lt;const_iterator&gt;        <B><A HREF="#hash_multimap::const_reverse_iterator">const_reverse_iterator</A></B>;    typedef reverse_iterator&lt;iterator&gt; <B><A HREF="#hash_multimap::reverse_iterator">reverse_iterator</A></B>;    <B><A HREF="#hash_multimap::hash_multimap">hash_multimap</A></B>();    explicit <B><A HREF="#hash_multimap::hash_multimap">hash_multimap</A></B>(const Tr&amp; traits);    <B><A HREF="#hash_multimap::hash_multimap">hash_multimap</A></B>(const Tr&amp; traits, const Alloc&amp; al);    <B><A HREF="#hash_multimap::hash_multimap">hash_multimap</A></B>(const hash_multimap&amp; right);    template&lt;class InIt&gt;        <B><A HREF="#hash_multimap::hash_multimap">hash_multimap</A></B>(InIt first, InIt last);    template&lt;class InIt&gt;        <B><A HREF="#hash_multimap::hash_multimap">hash_multimap</A></B>(InIt first, InIt last,            const Tr&amp; traits);    template&lt;class InIt&gt;        <B><A HREF="#hash_multimap::hash_multimap">hash_multimap</A></B>(InIt first, InIt last,            const Tr&amp; traits, const Alloc&amp; al);    iterator <B><A HREF="#hash_multimap::begin">begin</A></B>();    const_iterator <B><A HREF="#hash_multimap::begin">begin</A></B>() const;    iterator <B><A HREF="#hash_multimap::end">end</A></B>();    const_iterator <B><A HREF="#hash_multimap::end">end</A></B>() const;    reverse_iterator <B><A HREF="#hash_multimap::rbegin">rbegin</A></B>();    const_reverse_iterator <B><A HREF="#hash_multimap::rbegin">rbegin</A></B>() const;    reverse_iterator <B><A HREF="#hash_multimap::rend">rend</A></B>();    const_reverse_iterator <B><A HREF="#hash_multimap::rend">rend</A></B>() const;    size_type <B><A HREF="#hash_multimap::size">size</A></B>() const;    size_type <B><A HREF="#hash_multimap::max_size">max_size</A></B>() const;    bool <B><A HREF="#hash_multimap::empty">empty</A></B>() const;    Alloc <B><A HREF="#hash_multimap::get_allocator">get_allocator</A></B>() const;    iterator <B><A HREF="#hash_multimap::insert">insert</A></B>(const value_type&amp; val);    iterator <B><A HREF="#hash_multimap::insert">insert</A></B>(iterator where, const value_type&amp; val);    template&lt;class InIt&gt;        void <B><A HREF="#hash_multimap::insert">insert</A></B>(InIt first, InIt last);    iterator <B><A HREF="#hash_multimap::erase">erase</A></B>(iterator where);    iterator <B><A HREF="#hash_multimap::erase">erase</A></B>(iterator first, iterator last);    size_type <B><A HREF="#hash_multimap::erase">erase</A></B>(const Key&amp; keyval);    void <B><A HREF="#hash_multimap::clear">clear</A></B>();    void <B><A HREF="#hash_multimap::swap">swap</A></B>(hash_multimap&amp; right);    key_compare <B><A HREF="#hash_multimap::key_comp">key_comp</A></B>() const;    value_compare <B><A HREF="#hash_multimap::value_comp">value_comp</A></B>() const;    iterator <B><A HREF="#hash_multimap::find">find</A></B>(const Key&amp; keyval);    const_iterator <B><A HREF="#hash_multimap::find">find</A></B>(const Key&amp; keyval) const;    size_type <B><A HREF="#hash_multimap::count">count</A></B>(const Key&amp; keyval) const;    iterator <B><A HREF="#hash_multimap::lower_bound">lower_bound</A></B>(const Key&amp; keyval);    const_iterator <B><A HREF="#hash_multimap::lower_bound">lower_bound</A></B>(const Key&amp; keyval) const;    iterator <B><A HREF="#hash_multimap::upper_bound">upper_bound</A></B>(const Key&amp; keyval);    const_iterator <B><A HREF="#hash_multimap::upper_bound">upper_bound</A></B>(const Key&amp; keyval) const;    pair&lt;iterator, iterator&gt; <B><A HREF="#hash_multimap::equal_range">equal_range</A></B>(const Key&amp; keyval);    pair&lt;const_iterator, const_iterator&gt;        <B><A HREF="#hash_multimap::equal_range">equal_range</A></B>(const Key&amp; keyval) const;    };</PRE><P>The template class describes an object that controls avarying-length sequence of elements of type<CODE><A HREF="utility.html#pair">pair</A>&lt;const Key, Ty&gt;</CODE>.The sequence is<A HREF="lib_stl.html#sequence ordering">ordered by</A> the<A HREF="#hash traits">hash traits</A> object<CODE>Tr</CODE>, which includes both a two-operand function for imposing a<A HREF="lib_stl.html#strict weak ordering">strict weak ordering</A>and a one-operand <A HREF="#hash function">hash function</A>.

⌨️ 快捷键说明

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