1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
6 <meta name=
"generator" content=
7 "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
9 <title>tree Interface
</title>
10 <meta http-equiv=
"Content-Type" content=
11 "text/html; charset=us-ascii" />
16 <h1><tt>tree
</tt> Interface
</h1>
18 <p>A concrete basic tree-based associative container.
</p>
20 <p>Defined in:
<a href=
21 "../../../../include/ext/pb_ds/assoc_container.hpp"><tt>assoc_container.hpp
</tt></a></p>
23 <h2><a name=
"link1" id=
"link1">Template Parameters
</a></h2>
25 <table class=
"c1" width=
"100%" border=
"1" summary=
26 "Template Parameters">
28 <td width=
"20%" align=
"left"><b>Parameter
</b></td>
30 <td width=
"50%" align=
"left"><b>Description
</b></td>
32 <td width=
"30%" align=
"left"><b>Default Value
</b></td>
38 <a name=
"Key2501" id=
"Key2501"><b>typename
</b> Key
</a>
52 <a name=
"Mapped318655" id=
"Mapped318655"><b>typename
</b> Mapped
</a>
66 <a name=
"Cmp_Fn294335" id=
"Cmp_Fn294335"><b>class
</b> Cmp_Fn
</a>
71 <p>Comparison functor.
</p>
76 std::less
<<a href=
"#Key2501"><tt>Key
</tt></a>>
84 <a name=
"Tag278938" id=
"Tag278938"><b>class
</b> Tag
</a>
89 <p>Mapped-structure tag.
</p>
92 <td><a href=
"rb_tree_tag.html"><span class=
93 "c2"><tt>rb_tree_tag
</tt></span></a></td>
99 <a name=
"Node_Update841554648" id=
100 "Node_Update841554648"><b>template
</b><
101 <b>typename
</b> Const_Node_Iterator,
102 <b>typename
</b> Node_Iterator,
103 <b>class
</b> Cmp_Fn_,
104 <b>typename
</b> Allocator_
>
105 <b>class
</b> Node_Update
</a>
110 <p>Node updater type.
</p>
113 "tree_based_containers.html#invariants">Design::Tree-Based
114 Containers::Node Invariants
</a> explains this
118 <td><a href=
"null_tree_node_update.html"><span class=
119 "c2"><tt>null_tree_node_update
</tt></span></a></td>
125 <a name=
"Allocator35940069" id=
126 "Allocator35940069"><b>class
</b> Allocator
</a>
131 <p>Allocator type.
</p>
136 std::allocator
<<b>char
</b>>
142 <h2><a name=
"link2" id=
"link2">Base Classes
</a></h2>
144 <table class=
"c1" width=
"100%" border=
"1" summary=
"Bases">
146 <td width=
"80%" align=
"left"><b>Class
</b></td>
148 <td width=
"20%" align=
"left"><b>Derivation Type
</b></td>
154 <a href=
"basic_tree.html"><span class=
155 "c2"><tt>basic_tree
</tt></span></a>
165 <h2><a name=
"link3" id=
"link3">Public Types and
168 <h3><a name=
"link4" id=
"link4">Policy Definitions
</a></h3>
170 <table class=
"c1" width=
"100%" border=
"1" summary=
"Types">
172 <td width=
"30%" align=
"left"><b>Type
</b></td>
174 <td width=
"55%" align=
"left"><b>Definition
</b></td>
176 <td width=
"15%" align=
"left"><b>Description
</b></td>
182 <a name=
"cmp_fn394495" id=
"cmp_fn394495">cmp_fn
</a>
188 <a href=
"#Cmp_Fn294335"><tt>Cmp_Fn
</tt></a>
193 <p>Comparison functor type.
</p>
198 <h3><a name=
"link5" id=
"link5">Iterator Definitions
</a></h3>
200 <table class=
"c1" width=
"100%" border=
"1" summary=
"Types">
202 <td width=
"30%" align=
"left"><b>Type
</b></td>
204 <td width=
"55%" align=
"left"><b>Definition
</b></td>
206 <td width=
"15%" align=
"left"><b>Description
</b></td>
212 <a name=
"const_node_iterator4205924553" id=
213 "const_node_iterator4205924553">const_node_iterator
</a>
220 "tree_const_node_iterator.html"><span class=
221 "c2"><tt>const_node_iterator
</tt></span></a>
226 <p>Const node iterator.
</p>
233 <a name=
"node_iterator3431975247" id=
234 "node_iterator3431975247">node_iterator
</a>
240 <a href=
"tree_node_iterator.html"><span class=
241 "c2"><tt>node_iterator
</tt></span></a>
246 <p>Node iterator.
</p>
251 <h2><a name=
"link6" id=
"link6">Public Methods
</a></h2>
253 <h3><a name=
"link7" id=
"link7">Constructors, Destructor, and
256 <table class=
"c1" width=
"100%" border=
"1" summary=
"Methods">
258 <td width=
"45%" align=
"left"><b>Method
</b></td>
260 <td width=
"55%" align=
"left"><b>Description
</b></td>
272 <p>Default constructor.
</p>
280 (
<b>const
</b> <a href=
281 "#cmp_fn394495"><tt>cmp_fn
</tt></a> &r_cmp_fn)
286 <p>Constructor taking some policy objects.
<span class=
287 "c1"><tt>r_cmp_fn
</tt></span> will be copied by the
288 <a href=
"#Cmp_Fn294335"><tt>Cmp_Fn
</tt></a> object of the
289 container object.
</p>
305 <p>Constructor taking iterators to a range of
306 value_types. The value_types between
<span class=
307 "c1"><tt>first_it
</tt></span> and
<span class=
308 "c1"><tt>last_it
</tt></span> will be inserted into the
309 container object.
</p>
321 <b>const
</b> <a href=
322 "#cmp_fn394495"><tt>cmp_fn
</tt></a> &r_cmp_fn)
327 <p>Constructor taking iterators to a range of value_types
328 and some policy objects The value_types between
329 <span class=
"c1"><tt>first_it
</tt></span> and
330 <span class=
"c1"><tt>last_it
</tt></span> will be inserted
331 into the container object.
<span class=
332 "c1"><tt>r_cmp_fn
</tt></span> will be copied by the
333 <a href=
"#cmp_fn394495"><tt>cmp_fn
</tt></a> object of the
334 container object.
</p>
342 (
<b>const
</b> <span class=
343 "c2"><tt>tree
</tt></span> &other)
348 <p>Copy constructor.
</p>
369 <span class=
"c2"><tt>tree
</tt></span> &
371 (
<b>const
</b> <span class=
372 "c2"><tt>tree
</tt></span> &other)
377 <p>Assignment operator.
</p>
387 "c2"><tt>tree
</tt></span> &other)
392 <p>Swaps content.
</p>
397 <h3><a name=
"link8" id=
"link8">Policy Access Methods
</a></h3>
399 <table class=
"c1" width=
"100%" border=
"1" summary=
"Methods">
401 <td width=
"45%" align=
"left"><b>Method
</b></td>
403 <td width=
"55%" align=
"left"><b>Description
</b></td>
409 <a href=
"#cmp_fn394495"><tt>cmp_fn
</tt></a> &
416 <p>Access to the
<a href=
417 "#cmp_fn394495"><tt>cmp_fn
</tt></a> object.
</p>
424 <b>const
</b> <a href=
"#cmp_fn394495"><tt>cmp_fn
</tt></a> &
431 <p>Const access to the
<a href=
432 "#cmp_fn394495"><tt>cmp_fn
</tt></a> object.
</p>
437 <h3><a name=
"link9" id=
"link9">Node-Iteration Methods
</a></h3>
439 <table class=
"c1" width=
"100%" border=
"1" summary=
"Methods">
441 <td width=
"45%" align=
"left"><b>Method
</b></td>
443 <td width=
"55%" align=
"left"><b>Description
</b></td>
449 <a href=
"#node_iterator3431975247"><tt>node_iterator
</tt></a>
456 <p>Returns a
<a href=
457 "#node_iterator3431975247"><tt>node_iterator
</tt></a>
458 corresponding to the node at the root of the tree.
</p>
466 "#const_node_iterator4205924553"><tt>const_node_iterator
</tt></a>
473 <p>Returns a
<a href=
474 "#const_node_iterator4205924553"><tt>const_node_iterator
</tt></a>
475 corresponding to the node at the root of the tree.
</p>
482 <a href=
"#node_iterator3431975247"><tt>node_iterator
</tt></a>
489 <p>Returns a
<a href=
490 "#node_iterator3431975247"><tt>node_iterator
</tt></a>
491 corresponding to a node just after a leaf of the
500 "#const_node_iterator4205924553"><tt>const_node_iterator
</tt></a>
507 <p>Returns a
<a href=
508 "#const_node_iterator4205924553"><tt>const_node_iterator
</tt></a>
509 corresponding to a node just after a leaf of the