1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>oscl: oscl_map.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<h1>oscl_map.h</h1><a href="oscl__map_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- c++ -*-</span>
<a name="l00002"></a>00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
<a name="l00003"></a>00003
<a name="l00004"></a>00004 <span class="comment">// O S C L _ M A P</span>
<a name="l00005"></a>00005
<a name="l00006"></a>00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
<a name="l00007"></a>00007
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef OSCL_MAP_H_INCLUDED</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_MAP_H_INCLUDED</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef OSCL_BASE_H_INCLUDED</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__base_8h.html" title="The file oscl_base.h is the public header that should be included to pick up the...">oscl_base.h</a>"</span>
<a name="l00023"></a>00023 <span class="preprocessor">#endif</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef OSCL_TREE_H_INCLUDED</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__tree_8h.html" title="The file oscl_tree.h defines the template class Oscl_Rb_Tree which has a very similar...">oscl_tree.h</a>"</span>
<a name="l00027"></a>00027 <span class="preprocessor">#endif</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00029"></a><a class="code" href="group__osclbase.html#ga9fcc278d0a7a8d1c95f95c3bd7067994">00029</a> <span class="preprocessor">#define OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="osclconfig__compiler__warnings_8h.html" title="This file contains the ability to turn off/on compiler warnings.">osclconfig_compiler_warnings.h</a>"</span>
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="keyword">template</span> <<span class="keyword">class</span> T>
<a name="l00033"></a><a class="code" href="structOscl__Less.html">00033</a> <span class="keyword">struct </span><a class="code" href="structOscl__Less.html">Oscl_Less</a>
<a name="l00034"></a>00034 {
<a name="l00035"></a><a class="code" href="structOscl__Less.html#a9a8b8bde8e07448b958852fa3f298bfb">00035</a> <span class="keywordtype">bool</span> <a class="code" href="structOscl__Less.html#a9a8b8bde8e07448b958852fa3f298bfb">operator()</a>(<span class="keyword">const</span> T& x, <span class="keyword">const</span> T& y)<span class="keyword"> const</span>
<a name="l00036"></a>00036 <span class="keyword"> </span>{
<a name="l00037"></a>00037 <span class="keywordflow">return</span> x < y ? <span class="keyword">true</span> : false ;
<a name="l00038"></a>00038 }
<a name="l00039"></a>00039 };
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="keyword">template</span> <<span class="keyword">class</span> V, <span class="keyword">class</span> U>
<a name="l00042"></a><a class="code" href="structOscl__Select1st.html">00042</a> <span class="keyword">struct </span><a class="code" href="structOscl__Select1st.html">Oscl_Select1st</a>
<a name="l00043"></a>00043 {
<a name="l00044"></a><a class="code" href="structOscl__Select1st.html#a87148532b01d27a3c2b412d19f3a02ea">00044</a> <span class="keyword">const</span> U& <a class="code" href="structOscl__Select1st.html#a87148532b01d27a3c2b412d19f3a02ea">operator()</a>(<span class="keyword">const</span> V& x)<span class="keyword"> const</span>
<a name="l00045"></a>00045 <span class="keyword"> </span>{
<a name="l00046"></a>00046 <span class="keywordflow">return</span> x.first;
<a name="l00047"></a>00047 }
<a name="l00048"></a>00048 };
<a name="l00049"></a>00049
<a name="l00060"></a>00060 <span class="keyword">template</span> < <span class="keyword">class</span> Key, <span class="keyword">class</span> T, <span class="keyword">class</span> Alloc, <span class="keyword">class</span> Compare = Oscl_Less<Key> >
<a name="l00061"></a><a class="code" href="classOscl__Map.html">00061</a> <span class="keyword">class </span><a class="code" href="classOscl__Map.html">Oscl_Map</a>
<a name="l00062"></a>00062 {
<a name="l00063"></a>00063
<a name="l00064"></a>00064 <span class="keyword">public</span>:
<a name="l00065"></a><a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">00065</a> <span class="keyword">typedef</span> Key <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>;
<a name="l00066"></a><a class="code" href="classOscl__Map.html#a964f51f9418903ab910a41eff442d802">00066</a> <span class="keyword">typedef</span> Compare <a class="code" href="structOscl__Tag__Base.html">key_compare</a>;
<a name="l00067"></a><a class="code" href="classOscl__Map.html#a1a292b354022092d184ed97442a9fcb0">00067</a> <span class="keyword">typedef</span> <a class="code" href="structOscl__Pair.html">Oscl_Pair<const Key, T></a> <a class="code" href="structOscl__Pair.html">value_type</a>;
<a name="l00068"></a><a class="code" href="classOscl__Map.html#a1f10d72177e1c4e909fc6cbc15309a59">00068</a> <span class="keyword">typedef</span> <a class="code" href="classOscl__Map.html">Oscl_Map<Key, T, Alloc, Compare></a> <span class="keyword">self</span>;
<a name="l00069"></a>00069
<a name="l00070"></a>00070 <span class="keyword">private</span>:
<a name="l00071"></a>00071 <span class="keyword">typedef</span> <a class="code" href="classOscl__Rb__Tree.html">Oscl_Rb_Tree</a> < <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>, <a class="code" href="structOscl__Pair.html">value_type</a>,
<a name="l00072"></a>00072 <a class="code" href="structOscl__Select1st.html">Oscl_Select1st<value_type, key_type></a>,
<a name="l00073"></a>00073 <a class="code" href="structOscl__Tag__Base.html">key_compare</a>, Alloc > <a class="code" href="classOscl__Rb__Tree.html">rep_type</a>;
<a name="l00074"></a>00074 <a class="code" href="classOscl__Rb__Tree.html">rep_type</a> t; <span class="comment">// red-black tree representing map</span>
<a name="l00075"></a>00075
<a name="l00076"></a>00076 <span class="keyword">public</span>:
<a name="l00077"></a><a class="code" href="classOscl__Map.html#a8f76d38b0a3925eb8027368b54f32c17">00077</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classOscl__Rb__Tree.html#a42d15633e230fb238206c98499ca283e">rep_type::pointer</a> <a class="code" href="classOscl__Map.html#a8f76d38b0a3925eb8027368b54f32c17">pointer</a>;
<a name="l00078"></a><a class="code" href="classOscl__Map.html#a890adb0759982e9defc8d7902fe4de58">00078</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classOscl__Rb__Tree.html#a407ce7ae6a82b4e6d7a336098d8f800c">rep_type::reference</a> <a class="code" href="classOscl__Map.html#a890adb0759982e9defc8d7902fe4de58">reference</a>;
<a name="l00079"></a><a class="code" href="classOscl__Map.html#a940fab4fc883705390bdd283fe90844b">00079</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classOscl__Rb__Tree.html#acf1c56e9fd99bb7cf3e182c0cf514aac">rep_type::const_reference</a> <a class="code" href="classOscl__Map.html#a940fab4fc883705390bdd283fe90844b">const_reference</a>;
<a name="l00080"></a><a class="code" href="classOscl__Map.html#a12b0e0245655a77ed14ab92d00f22d79">00080</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structOscl__Rb__Tree__Iterator.html">rep_type::iterator</a> <a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a>;
<a name="l00081"></a><a class="code" href="classOscl__Map.html#adda0925492fb3659d06abfaea0dccf59">00081</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structOscl__Rb__Tree__Const__Iterator.html">rep_type::const_iterator</a> <a class="code" href="structOscl__Rb__Tree__Const__Iterator.html">const_iterator</a>;
<a name="l00082"></a><a class="code" href="classOscl__Map.html#a2598417d77e47c4dda321146fc5e0d1e">00082</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classOscl__Rb__Tree.html#a97bd6d64c71ea73b325eb5d349a93a68">rep_type::size_type</a> <a class="code" href="classOscl__Map.html#a2598417d77e47c4dda321146fc5e0d1e">size_type</a>;
<a name="l00083"></a>00083
<a name="l00084"></a><a class="code" href="classOscl__Map_1_1value__compare.html">00084</a> <span class="keyword">class </span><a class="code" href="classOscl__Map_1_1value__compare.html">value_compare</a>
<a name="l00085"></a>00085 {
<a name="l00086"></a><a class="code" href="classOscl__Map_1_1value__compare.html#a75e36d31c45ba0cac3fc17230163ee72">00086</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOscl__Map.html">Oscl_Map</a><Key, T, Alloc, Compare>;
<a name="l00087"></a>00087 <span class="keyword">protected</span> :
<a name="l00088"></a><a class="code" href="classOscl__Map_1_1value__compare.html#a630062a517bbaec851ce215b714cdf4b">00088</a> Compare <a class="code" href="classOscl__Map_1_1value__compare.html#a630062a517bbaec851ce215b714cdf4b">comp</a>;
<a name="l00089"></a><a class="code" href="classOscl__Map_1_1value__compare.html#a04c3829d1aa6afe67034a0d10d14ad8d">00089</a> <a class="code" href="classOscl__Map_1_1value__compare.html#a04c3829d1aa6afe67034a0d10d14ad8d">value_compare</a>(Compare c) : <a class="code" href="classOscl__Map_1_1value__compare.html#a630062a517bbaec851ce215b714cdf4b">comp</a>(c) {}
<a name="l00090"></a>00090 <span class="keyword">public</span>:
<a name="l00091"></a><a class="code" href="classOscl__Map_1_1value__compare.html#a104e0f5e56c35e8867187ec546842c42">00091</a> <span class="keywordtype">bool</span> <a class="code" href="classOscl__Map_1_1value__compare.html#a104e0f5e56c35e8867187ec546842c42">operator()</a>(<span class="keyword">const</span> <a class="code" href="structOscl__Pair.html">value_type</a>& x, <span class="keyword">const</span> <a class="code" href="structOscl__Pair.html">value_type</a>& y)<span class="keyword"> const</span>
<a name="l00092"></a>00092 <span class="keyword"> </span>{
<a name="l00093"></a>00093 <span class="keywordflow">return</span> <a class="code" href="classOscl__Map_1_1value__compare.html#a630062a517bbaec851ce215b714cdf4b">comp</a>(x.<a class="code" href="structOscl__Pair.html#a387c30c4c90b310715510ea0a74a94e4">first</a>, y.<a class="code" href="structOscl__Pair.html#a387c30c4c90b310715510ea0a74a94e4">first</a>);
<a name="l00094"></a>00094 }
<a name="l00095"></a>00095 };
<a name="l00096"></a>00096
<a name="l00097"></a>00097 <span class="keyword">public</span>:
<a name="l00098"></a>00098
<a name="l00102"></a><a class="code" href="classOscl__Map.html#aab382280a1b1542b2b2bdaf657ed3adb">00102</a> <a class="code" href="classOscl__Map.html#aab382280a1b1542b2b2bdaf657ed3adb">Oscl_Map</a>(<span class="keyword">const</span> Compare& comp = Compare()) : t(comp) {}
<a name="l00103"></a>00103 <span class="comment">// Oscl_Map(const value_type* first, const value_type* last,</span>
<a name="l00104"></a>00104 <span class="comment">// const Compare& comp = Compare()) : t(first, last, comp, false) {}</span>
<a name="l00105"></a>00105
<a name="l00109"></a><a class="code" href="classOscl__Map.html#a9dedec501c8ea6ecbd2920b022612053">00109</a> <a class="code" href="classOscl__Map.html#a9dedec501c8ea6ecbd2920b022612053">Oscl_Map</a>(<span class="keyword">const</span> <span class="keyword">self</span>& x) : t(x.t) {}
<a name="l00113"></a><a class="code" href="classOscl__Map.html#aa4c4fc6e20d071330338a4a2a005a9e0">00113</a> <span class="keyword">self</span>& <a class="code" href="classOscl__Map.html#aa4c4fc6e20d071330338a4a2a005a9e0">operator=</a>(<span class="keyword">const</span> <span class="keyword">self</span>& x)
<a name="l00114"></a>00114 {
<a name="l00115"></a>00115 t = x.t;
<a name="l00116"></a>00116 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00117"></a>00117 }
<a name="l00121"></a><a class="code" href="classOscl__Map.html#a15326a14dd9a1e71c79c4b8216c4b736">00121</a> <a class="code" href="structOscl__Tag__Base.html">key_compare</a> <a class="code" href="classOscl__Map.html#a15326a14dd9a1e71c79c4b8216c4b736">key_comp</a>()<span class="keyword"> const</span>
<a name="l00122"></a>00122 <span class="keyword"> </span>{
<a name="l00123"></a>00123 <span class="keywordflow">return</span> t.key_comp();
<a name="l00124"></a>00124 }
<a name="l00128"></a><a class="code" href="classOscl__Map.html#a5bcf61096fbb419e47656faca49f16ea">00128</a> value_compare <a class="code" href="classOscl__Map.html#a5bcf61096fbb419e47656faca49f16ea">value_comp</a>()<span class="keyword"> const</span>
<a name="l00129"></a>00129 <span class="keyword"> </span>{
<a name="l00130"></a>00130 <span class="keywordflow">return</span> value_compare(t.key_comp());
<a name="l00131"></a>00131 }
<a name="l00135"></a><a class="code" href="classOscl__Map.html#acc77f87b38990d3f701b6c19f0712b5f">00135</a> <a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> <a class="code" href="classOscl__Map.html#acc77f87b38990d3f701b6c19f0712b5f">begin</a>()
<a name="l00136"></a>00136 {
<a name="l00137"></a>00137 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#ada9de4870590904bbff92f186c8bd9aa">begin</a>();
<a name="l00138"></a>00138 }
<a name="l00142"></a><a class="code" href="classOscl__Map.html#abd271589c42d6793901ab4002eb7fd10">00142</a> <a class="code" href="structOscl__Rb__Tree__Const__Iterator.html">const_iterator</a> <a class="code" href="classOscl__Map.html#acc77f87b38990d3f701b6c19f0712b5f">begin</a>()<span class="keyword"> const</span>
<a name="l00143"></a>00143 <span class="keyword"> </span>{
<a name="l00144"></a>00144 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#ada9de4870590904bbff92f186c8bd9aa">begin</a>();
<a name="l00145"></a>00145 }
<a name="l00149"></a><a class="code" href="classOscl__Map.html#adda6300896ea737e03b144f6d815465c">00149</a> <a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> <a class="code" href="classOscl__Map.html#adda6300896ea737e03b144f6d815465c">end</a>()
<a name="l00150"></a>00150 {
<a name="l00151"></a>00151 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#accd49378d36ca2b2c2a83dcbec76baf8">end</a>();
<a name="l00152"></a>00152 }
<a name="l00156"></a><a class="code" href="classOscl__Map.html#a60dc20b3eec5efb85495898b10c26767">00156</a> <a class="code" href="structOscl__Rb__Tree__Const__Iterator.html">const_iterator</a> <a class="code" href="classOscl__Map.html#adda6300896ea737e03b144f6d815465c">end</a>()<span class="keyword"> const</span>
<a name="l00157"></a>00157 <span class="keyword"> </span>{
<a name="l00158"></a>00158 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#accd49378d36ca2b2c2a83dcbec76baf8">end</a>();
<a name="l00159"></a>00159 }
<a name="l00163"></a><a class="code" href="classOscl__Map.html#a1e7f73947e4ec71d6b6485a034a70935">00163</a> <span class="keywordtype">bool</span> <a class="code" href="classOscl__Map.html#a1e7f73947e4ec71d6b6485a034a70935">empty</a>()<span class="keyword"> const</span>
<a name="l00164"></a>00164 <span class="keyword"> </span>{
<a name="l00165"></a>00165 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#a44e806d69de20d4b524ba0a3fdf7a4f2">empty</a>();
<a name="l00166"></a>00166 }
<a name="l00170"></a><a class="code" href="classOscl__Map.html#a7f102127ea6b1235c0e5cbd38a6e1120">00170</a> <a class="code" href="classOscl__Map.html#a2598417d77e47c4dda321146fc5e0d1e">size_type</a> <a class="code" href="classOscl__Map.html#a7f102127ea6b1235c0e5cbd38a6e1120">size</a>()<span class="keyword"> const</span>
<a name="l00171"></a>00171 <span class="keyword"> </span>{
<a name="l00172"></a>00172 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#ad52a69a8c308804c64c7b1883adf4bdb">size</a>();
<a name="l00173"></a>00173 }
<a name="l00177"></a><a class="code" href="classOscl__Map.html#a763ed7bc0c84a9f1461fe2adab926476">00177</a> <a class="code" href="classOscl__Map.html#a2598417d77e47c4dda321146fc5e0d1e">size_type</a> <a class="code" href="classOscl__Map.html#a763ed7bc0c84a9f1461fe2adab926476">max_size</a>()<span class="keyword"> const</span>
<a name="l00178"></a>00178 <span class="keyword"> </span>{
<a name="l00179"></a>00179 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#aa082848ce3f503a242fa3d9ce22f0140">max_size</a>();
<a name="l00180"></a>00180 }
<a name="l00185"></a><a class="code" href="classOscl__Map.html#ab18000a14ce765f13494a166ff8ad3d1">00185</a> T& <a class="code" href="classOscl__Map.html#ab18000a14ce765f13494a166ff8ad3d1">operator[]</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& k)
<a name="l00186"></a>00186 {
<a name="l00187"></a>00187 <span class="keywordflow">return</span> (*((<a class="code" href="classOscl__Map.html#a51ac843810bfff8a3c419e4119b4c88d">insert</a>(<a class="code" href="classOscl__Map.html#a1a292b354022092d184ed97442a9fcb0">value_type</a>(k, T()))).first)).second;
<a name="l00188"></a>00188 }
<a name="l00189"></a>00189 <span class="comment">// void swap(map<Key, T, Compare>& x) { t.swap(x.t); }</span>
<a name="l00190"></a>00190
<a name="l00191"></a>00191
<a name="l00192"></a><a class="code" href="classOscl__Map.html#afa7edca680feabc92f95d258e59db610">00192</a> <span class="keyword">typedef</span> <a class="code" href="structOscl__Pair.html">Oscl_Pair<iterator, bool></a> <a class="code" href="structOscl__Pair.html">pair_iterator_bool</a>;
<a name="l00196"></a><a class="code" href="classOscl__Map.html#a51ac843810bfff8a3c419e4119b4c88d">00196</a> <a class="code" href="structOscl__Pair.html">pair_iterator_bool</a> <a class="code" href="classOscl__Map.html#a51ac843810bfff8a3c419e4119b4c88d">insert</a>(<span class="keyword">const</span> <a class="code" href="structOscl__Pair.html">value_type</a>& x)
<a name="l00197"></a>00197 {
<a name="l00198"></a>00198 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#adf068ddc76bc9b85d81aedfd2e9c2d01">insert_unique</a>(x);
<a name="l00199"></a>00199 }
<a name="l00203"></a><a class="code" href="classOscl__Map.html#afdc79d9ccc3af0738537737bf01108d9">00203</a> <a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> <a class="code" href="classOscl__Map.html#a51ac843810bfff8a3c419e4119b4c88d">insert</a>(<a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> position, <span class="keyword">const</span> <a class="code" href="structOscl__Pair.html">value_type</a>& x)
<a name="l00204"></a>00204 {
<a name="l00205"></a>00205 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#adf068ddc76bc9b85d81aedfd2e9c2d01">insert_unique</a>(position, x);
<a name="l00206"></a>00206 }
<a name="l00210"></a><a class="code" href="classOscl__Map.html#a5a29ab97e942a03abb1fc8abaceef930">00210</a> <span class="keywordtype">void</span> <a class="code" href="classOscl__Map.html#a51ac843810bfff8a3c419e4119b4c88d">insert</a>(<span class="keyword">const</span> <a class="code" href="structOscl__Pair.html">value_type</a>* first, <span class="keyword">const</span> <a class="code" href="structOscl__Pair.html">value_type</a>* last)
<a name="l00211"></a>00211 {
<a name="l00212"></a>00212 t.<a class="code" href="classOscl__Rb__Tree.html#adf068ddc76bc9b85d81aedfd2e9c2d01">insert_unique</a>(first, last);
<a name="l00213"></a>00213 }
<a name="l00217"></a><a class="code" href="classOscl__Map.html#a2055e60f431ce7b7d65effa110c8b25d">00217</a> <span class="keywordtype">void</span> <a class="code" href="classOscl__Map.html#a2055e60f431ce7b7d65effa110c8b25d">erase</a>(<a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> position)
<a name="l00218"></a>00218 {
<a name="l00219"></a>00219 t.<a class="code" href="classOscl__Rb__Tree.html#a8b1e357fdcbb6eb60d3c8125eb32cc9d">erase</a>(position);
<a name="l00220"></a>00220 }
<a name="l00224"></a><a class="code" href="classOscl__Map.html#a19ed47e36226697bbde3e46fc8ca2ab5">00224</a> <a class="code" href="classOscl__Map.html#a2598417d77e47c4dda321146fc5e0d1e">size_type</a> <a class="code" href="classOscl__Map.html#a2055e60f431ce7b7d65effa110c8b25d">erase</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)
<a name="l00225"></a>00225 {
<a name="l00226"></a>00226 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#a8b1e357fdcbb6eb60d3c8125eb32cc9d">erase</a>(x);
<a name="l00227"></a>00227 }
<a name="l00231"></a><a class="code" href="classOscl__Map.html#af865ad69e62ae1f42c29d3e291298c9c">00231</a> <span class="keywordtype">void</span> <a class="code" href="classOscl__Map.html#a2055e60f431ce7b7d65effa110c8b25d">erase</a>(<a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> first, <a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> last)
<a name="l00232"></a>00232 {
<a name="l00233"></a>00233 t.<a class="code" href="classOscl__Rb__Tree.html#a8b1e357fdcbb6eb60d3c8125eb32cc9d">erase</a>(first, last);
<a name="l00234"></a>00234 }
<a name="l00238"></a><a class="code" href="classOscl__Map.html#a1ef5efbb570a544bf3d3b94eadb1911d">00238</a> <span class="keywordtype">void</span> <a class="code" href="classOscl__Map.html#a1ef5efbb570a544bf3d3b94eadb1911d">clear</a>()
<a name="l00239"></a>00239 {
<a name="l00240"></a>00240 t.<a class="code" href="classOscl__Rb__Tree.html#a59f1dfdb0d1299bc7768ec35e8e5a437">clear</a>();
<a name="l00241"></a>00241 }
<a name="l00245"></a><a class="code" href="classOscl__Map.html#a2ed3db119c7633fed136f24250e00b5f">00245</a> <a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> <a class="code" href="classOscl__Map.html#a2ed3db119c7633fed136f24250e00b5f">find</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)
<a name="l00246"></a>00246 {
<a name="l00247"></a>00247 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#a15cf6e805436634c7821a30868161bb0">find</a>(x);
<a name="l00248"></a>00248 }
<a name="l00252"></a><a class="code" href="classOscl__Map.html#a850a5b3c4bddc0ac1db352c6fd429eda">00252</a> <a class="code" href="structOscl__Rb__Tree__Const__Iterator.html">const_iterator</a> <a class="code" href="classOscl__Map.html#a2ed3db119c7633fed136f24250e00b5f">find</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)<span class="keyword"> const</span>
<a name="l00253"></a>00253 <span class="keyword"> </span>{
<a name="l00254"></a>00254 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#a15cf6e805436634c7821a30868161bb0">find</a>(x);
<a name="l00255"></a>00255 }
<a name="l00259"></a><a class="code" href="classOscl__Map.html#a40bc146bbc302b5ae4b9624133619e6e">00259</a> <a class="code" href="classOscl__Map.html#a2598417d77e47c4dda321146fc5e0d1e">size_type</a> <a class="code" href="classOscl__Map.html#a40bc146bbc302b5ae4b9624133619e6e">count</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)<span class="keyword"> const</span>
<a name="l00260"></a>00260 <span class="keyword"> </span>{
<a name="l00261"></a>00261 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#aac75faceee92a1ab7d8f03dad3ee917c">count</a>(x);
<a name="l00262"></a>00262 }
<a name="l00266"></a><a class="code" href="classOscl__Map.html#a27493039835fbe5119acb85f373dcf27">00266</a> <a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> <a class="code" href="classOscl__Map.html#a27493039835fbe5119acb85f373dcf27">lower_bound</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)
<a name="l00267"></a>00267 {
<a name="l00268"></a>00268 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#abafbe90bd41cfa11f62a6e1d83936ebb">lower_bound</a>(x);
<a name="l00269"></a>00269 }
<a name="l00273"></a><a class="code" href="classOscl__Map.html#a39917c3d4db7bb13e876b194d9411ad3">00273</a> <a class="code" href="structOscl__Rb__Tree__Const__Iterator.html">const_iterator</a> <a class="code" href="classOscl__Map.html#a27493039835fbe5119acb85f373dcf27">lower_bound</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)<span class="keyword"> const</span>
<a name="l00274"></a>00274 <span class="keyword"> </span>{
<a name="l00275"></a>00275 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#abafbe90bd41cfa11f62a6e1d83936ebb">lower_bound</a>(x);
<a name="l00276"></a>00276 }
<a name="l00280"></a><a class="code" href="classOscl__Map.html#a94a6edf9175d480adcf6d0d915c20ac3">00280</a> <a class="code" href="structOscl__Rb__Tree__Iterator.html">iterator</a> <a class="code" href="classOscl__Map.html#a94a6edf9175d480adcf6d0d915c20ac3">upper_bound</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)
<a name="l00281"></a>00281 {
<a name="l00282"></a>00282 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#a7419c9dd3a81e5339b8f804087fd41f7">upper_bound</a>(x);
<a name="l00283"></a>00283 }
<a name="l00287"></a><a class="code" href="classOscl__Map.html#a92d12401c054b6e9785eff451f7b723f">00287</a> <a class="code" href="structOscl__Rb__Tree__Const__Iterator.html">const_iterator</a> <a class="code" href="classOscl__Map.html#a94a6edf9175d480adcf6d0d915c20ac3">upper_bound</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)<span class="keyword"> const</span>
<a name="l00288"></a>00288 <span class="keyword"> </span>{
<a name="l00289"></a>00289 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#a7419c9dd3a81e5339b8f804087fd41f7">upper_bound</a>(x);
<a name="l00290"></a>00290 }
<a name="l00291"></a><a class="code" href="classOscl__Map.html#a866c61a285f67015d6a5446fa932e4db">00291</a> <span class="keyword">typedef</span> <a class="code" href="structOscl__Pair.html">Oscl_Pair<iterator, iterator></a> <a class="code" href="structOscl__Pair.html">pair_iterator_iterator</a>;
<a name="l00295"></a><a class="code" href="classOscl__Map.html#aa2a43319f4277b576824df48612b040a">00295</a> <a class="code" href="structOscl__Pair.html">pair_iterator_iterator</a> <a class="code" href="classOscl__Map.html#aa2a43319f4277b576824df48612b040a">equal_range</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)
<a name="l00296"></a>00296 {
<a name="l00297"></a>00297 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#a6600c02d24a2a83a8216e731598312a7">equal_range</a>(x);
<a name="l00298"></a>00298 }
<a name="l00299"></a><a class="code" href="classOscl__Map.html#a36c7ea79dd47b84d096f62173311903f">00299</a> <span class="keyword">typedef</span> <a class="code" href="structOscl__Pair.html">Oscl_Pair<const_iterator, const_iterator></a> <a class="code" href="structOscl__Pair.html">pair_citerator_citerator</a>;
<a name="l00303"></a><a class="code" href="classOscl__Map.html#aa3104dc18d4b0f369aa19929a854b250">00303</a> <a class="code" href="structOscl__Pair.html">pair_citerator_citerator</a> <a class="code" href="classOscl__Map.html#aa2a43319f4277b576824df48612b040a">equal_range</a>(<span class="keyword">const</span> <a class="code" href="classOscl__Map.html#a4c46b104de3477a233cbd7c88a63362d">key_type</a>& x)<span class="keyword"> const</span>
<a name="l00304"></a>00304 <span class="keyword"> </span>{
<a name="l00305"></a>00305 <span class="keywordflow">return</span> t.<a class="code" href="classOscl__Rb__Tree.html#a6600c02d24a2a83a8216e731598312a7">equal_range</a>(x);
<a name="l00306"></a>00306 }
<a name="l00307"></a>00307
<a name="l00308"></a>00308 <span class="keyword">private</span>:
<a name="l00309"></a>00309
<a name="l00310"></a>00310 };
<a name="l00311"></a>00311
<a name="l00312"></a>00312 <span class="comment">//template <class Key, class T, class Compare></span>
<a name="l00313"></a>00313 <span class="comment">//inline bool operator==(const map<Key, T, Compare>& x,</span>
<a name="l00314"></a>00314 <span class="comment">// const map<Key, T, Compare>& y) {</span>
<a name="l00315"></a>00315 <span class="comment">// return x.size() == y.size() && equal(x.begin(), x.end(), y.begin());</span>
<a name="l00316"></a>00316 <span class="comment">//}</span>
<a name="l00317"></a>00317
<a name="l00318"></a>00318 <span class="comment">//template <class Key, class T, class Compare></span>
<a name="l00319"></a>00319 <span class="comment">//inline bool operator<(const map<Key, T, Compare>& x,</span>
<a name="l00320"></a>00320 <span class="comment">// const map<Key, T, Compare>& y) {</span>
<a name="l00321"></a>00321 <span class="comment">// return lexicographical_compare(x.begin(), x.end(), y.begin(), y.end());</span>
<a name="l00322"></a>00322 <span class="comment">//}</span>
<a name="l00323"></a>00323
<a name="l00324"></a>00324
<a name="l00328"></a>00328 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.004.1.1 </small>
</small></address>
</body>
</html>
|