<!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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>libstdc++: node_iterators.hpp Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">libstdc++ </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('a15217_source.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">bin_search_tree_/node_iterators.hpp</div> </div> </div><!--header--> <div class="contents"> <a href="a15217.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// -*- C++ -*-</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// Copyright (C) 2005-2015 Free Software Foundation, Inc.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// This file is part of the GNU ISO C++ Library. This library is free</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// software; you can redistribute it and/or modify it under the terms</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// of the GNU General Public License as published by the Free Software</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// Foundation; either version 3, or (at your option) any later</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// version.</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> </div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// This library is distributed in the hope that it will be useful, but</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">// WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// General Public License for more details.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// Under Section 7 of GPL version 3, you are granted additional</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">// permissions described in the GCC Runtime Library Exception, version</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// 3.1, as published by the Free Software Foundation.</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">// You should have received a copy of the GNU General Public License and</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">// a copy of the GCC Runtime Library Exception along with this program;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment">// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">// <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment">// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment">// Permission to use, copy, modify, sell, and distribute this software</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment">// is hereby granted without fee, provided that the above copyright</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment">// notice appears in all copies, and that both that copyright notice</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment">// and this permission notice appear in supporting documentation. None</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">// of the above authors, nor IBM Haifa Research Laboratories, make any</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// representation about the suitability of this software for any</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment">// purpose. It is provided "as is" without express or implied</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// warranty.</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"></span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">/**</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"> * @file bin_search_tree_/node_iterators.hpp</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"> * Contains an implementation class for bin_search_tree_.</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment"> */</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#ifndef PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor">#define PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor">#include <<a class="code" href="a01073.html">ext/pb_ds/tag_and_trait.hpp</a>></span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">namespace </span><a class="code" href="a01535.html">__gnu_pbds</a></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keyword">namespace </span><a class="code" href="a01537.html">detail</a></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor">#define PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC \</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor"> bin_search_tree_const_node_it_<Node, Const_Iterator, Iterator, _Alloc></span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"></span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment"> /// Const node iterator.</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment"></span> <span class="keyword">template</span><<span class="keyword">typename</span> Node,</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keyword">class </span>Const_Iterator,</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keyword">class </span>Iterator,</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keyword">typename</span> _Alloc></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="a10289.html"> 58</a></span>  <span class="keyword">class </span><a class="code" href="a10289.html">bin_search_tree_const_node_it_</a></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keyword">typedef</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keyword">typename</span> _Alloc::template rebind<</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  Node>::other::pointer</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  node_pointer;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keyword">public</span>:<span class="comment"></span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment"> /// Category.</span></div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="a10289.html#ae7cdc704c64581039293828b5c6f4b15"> 68</a></span> <span class="comment"></span> <span class="keyword">typedef</span> <a class="code" href="a09853.html">trivial_iterator_tag</a> <a class="code" href="a10289.html#ae7cdc704c64581039293828b5c6f4b15">iterator_category</a>;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"></span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> /// Difference type.</span></div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="a10289.html#a60ca6e16f3a71fde157c1376d14afc62"> 71</a></span> <span class="comment"></span> <span class="keyword">typedef</span> <a class="code" href="a01476.html#ga3a45dab56a44f762c97eb0eaee17f6f2">trivial_iterator_difference_type</a> <a class="code" href="a10289.html#a60ca6e16f3a71fde157c1376d14afc62">difference_type</a>;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment"></span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"> /// Iterator's value type.</span></div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="a10289.html#a67882de51ea972e066ed1ea5e39ae76c"> 74</a></span> <span class="comment"></span> <span class="keyword">typedef</span> Const_Iterator <a class="code" href="a10289.html#a67882de51ea972e066ed1ea5e39ae76c">value_type</a>;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"></span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment"> /// Iterator's reference type.</span></div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="a10289.html#a00a0a67e9558dd2891dd4ddc9a568fab"> 77</a></span> <span class="comment"></span> <span class="keyword">typedef</span> Const_Iterator <a class="code" href="a10289.html#a00a0a67e9558dd2891dd4ddc9a568fab">reference</a>;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment"></span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> /// Iterator's __const reference type.</span></div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="a10289.html#a7c469cca98a372efbd8ed9cb086fa3ae"> 80</a></span> <span class="comment"></span> <span class="keyword">typedef</span> Const_Iterator <a class="code" href="a10289.html#a7c469cca98a372efbd8ed9cb086fa3ae">const_reference</a>;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment"></span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment"> /// Metadata type.</span></div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="a10289.html#a7eb0036cd037c9139ab0019c557be22d"> 83</a></span> <span class="comment"></span> <span class="keyword">typedef</span> <span class="keyword">typename</span> Node::metadata_type <a class="code" href="a10289.html#a7eb0036cd037c9139ab0019c557be22d">metadata_type</a>;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment"></span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"> /// Const metadata reference type.</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"></span> <span class="keyword">typedef</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keyword">typename</span> _Alloc::template rebind<metadata_type>::other::const_reference</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="a10289.html#a1cc97219243280077e011641b5a34d7c"> 88</a></span>  <a class="code" href="a10289.html#a1cc97219243280077e011641b5a34d7c">metadata_const_reference</a>;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> </div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="a10289.html">bin_search_tree_const_node_it_</a>(<span class="keyword">const</span> node_pointer p_nd = 0)</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  : m_p_nd(const_cast<node_pointer>(p_nd))</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  { }</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"></span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> /// Access.</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"></span> const_reference</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="a10289.html#aeebd8eab002abaceeeeedbb0850ae617"> 97</a></span>  <a class="code" href="a10289.html#aeebd8eab002abaceeeeedbb0850ae617">operator*</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="keyword"> </span>{ <span class="keywordflow">return</span> Const_Iterator(m_p_nd); }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment"></span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> /// Metadata access.</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"></span> <a class="code" href="a10289.html#a1cc97219243280077e011641b5a34d7c">metadata_const_reference</a></div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="a10289.html#ac2361c1a9389f98ad1476a463670ad30"> 102</a></span>  <a class="code" href="a10289.html#ac2361c1a9389f98ad1476a463670ad30">get_metadata</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_p_nd->get_metadata(); }</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"></span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> /// Returns the __const node iterator associated with the left node.</span></div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"></span> PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC</div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="a10289.html#adef28620e7ee83e27bf0a3850c31765b"> 107</a></span>  <a class="code" href="a10289.html#adef28620e7ee83e27bf0a3850c31765b">get_l_child</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="keyword"> </span>{ <span class="keywordflow">return</span> PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC(m_p_nd->m_p_left); }</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"></span></div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> /// Returns the __const node iterator associated with the right node.</span></div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"></span> PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="a10289.html#a29777270beba31264794e507ac3b7fee"> 112</a></span>  <a class="code" href="a10289.html#a29777270beba31264794e507ac3b7fee">get_r_child</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="keyword"> </span>{ <span class="keywordflow">return</span> PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC(m_p_nd->m_p_right); }</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"></span></div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> /// Compares to a different iterator object.</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"></span> <span class="keywordtype">bool</span></div><div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="a10289.html#a7acc944a17c34a7e6a1f46a18319abe7"> 117</a></span>  <a class="code" href="a10289.html#a7acc944a17c34a7e6a1f46a18319abe7">operator==</a>(<span class="keyword">const</span> PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC& other)<span class="keyword"> const</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_p_nd == other.m_p_nd; }</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"></span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment"> /// Compares (negatively) to a different iterator object.</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"></span> <span class="keywordtype">bool</span></div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="a10289.html#af00d0999bd1cb1c6a731bf5327caea72"> 122</a></span>  <a class="code" href="a10289.html#af00d0999bd1cb1c6a731bf5327caea72">operator!=</a>(<span class="keyword">const</span> PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC& other)<span class="keyword"> const</span></div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_p_nd != other.m_p_nd; }</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  node_pointer m_p_nd;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  };</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="preprocessor">#define PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC \</span></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="preprocessor"> bin_search_tree_node_it_<Node, Const_Iterator, Iterator, _Alloc></span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="comment"></span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment"> /// Node iterator.</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment"></span> <span class="keyword">template</span><<span class="keyword">typename</span> Node,</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keyword">class </span>Const_Iterator,</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keyword">class </span>Iterator,</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keyword">typename</span> _Alloc></div><div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="a10293.html"> 136</a></span>  <span class="keyword">class </span><a class="code" href="a10293.html">bin_search_tree_node_it_</a></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  : <span class="keyword">public</span> PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  {</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keyword">typedef</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keyword">typename</span> _Alloc::template rebind<</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  Node>::other::pointer</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  node_pointer;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span> </div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keyword">public</span>:<span class="comment"></span></div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="comment"> /// Iterator's value type.</span></div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="a10293.html#ac8e3c7ff2237536b5567dc23b5218d38"> 147</a></span> <span class="comment"></span> <span class="keyword">typedef</span> Iterator <a class="code" href="a10293.html#ac8e3c7ff2237536b5567dc23b5218d38">value_type</a>;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="comment"></span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="comment"> /// Iterator's reference type.</span></div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="a10293.html#a4ad1cd9fab408c3e3bb9aaac4fb02ca9"> 150</a></span> <span class="comment"></span> <span class="keyword">typedef</span> Iterator <a class="code" href="a10293.html#a4ad1cd9fab408c3e3bb9aaac4fb02ca9">reference</a>;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="comment"></span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="comment"> /// Iterator's __const reference type.</span></div><div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="a10293.html#a4929c6c309b332e7e61ca667d4970f34"> 153</a></span> <span class="comment"></span> <span class="keyword">typedef</span> Iterator <a class="code" href="a10293.html#a4929c6c309b332e7e61ca667d4970f34">const_reference</a>;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keyword">inline</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="a10293.html">bin_search_tree_node_it_</a>(<span class="keyword">const</span> node_pointer p_nd = 0)</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  : PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC(const_cast<node_pointer>(p_nd))</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  { }</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="comment"></span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="comment"> /// Access.</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="comment"></span> Iterator</div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="a10293.html#aab710c87290d148b6dd2eb260ff27a1d"> 162</a></span>  <a class="code" href="a10293.html#aab710c87290d148b6dd2eb260ff27a1d">operator*</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="keyword"> </span>{ <span class="keywordflow">return</span> Iterator(PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC::m_p_nd); }</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span> <span class="comment"></span></div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <span class="comment"> /// Returns the node iterator associated with the left node.</span></div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> <span class="comment"></span> PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC</div><div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="a10293.html#a7c165db48078740c7eb8d7d9acd5eba8"> 167</a></span>  <a class="code" href="a10293.html#a7c165db48078740c7eb8d7d9acd5eba8">get_l_child</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">return</span> PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC(</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC::m_p_nd->m_p_left);</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  }</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> <span class="comment"></span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="comment"> /// Returns the node iterator associated with the right node.</span></div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="comment"></span> PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC</div><div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="a10293.html#aafe527c188b1b6900addb0bcb67f5f0b"> 175</a></span>  <a class="code" href="a10293.html#aafe527c188b1b6900addb0bcb67f5f0b">get_r_child</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">return</span> PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC(</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC::m_p_nd->m_p_right);</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  }</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span> </div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  };</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="preprocessor">#undef PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC</span></div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="preprocessor">#undef PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  } <span class="comment">// namespace detail</span></div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span> } <span class="comment">// namespace __gnu_pbds</span></div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span> <span class="preprocessor">#endif // #ifndef PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP</span></div><div class="ttc" id="a10293_html_aafe527c188b1b6900addb0bcb67f5f0b"><div class="ttname"><a href="a10293.html#aafe527c188b1b6900addb0bcb67f5f0b">__gnu_pbds::detail::bin_search_tree_node_it_::get_r_child</a></div><div class="ttdeci">bin_search_tree_node_it_< Node, Const_Iterator, Iterator, _Alloc > get_r_child() const</div><div class="ttdoc">Returns the node iterator associated with the right node. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00175">bin_search_tree_/node_iterators.hpp:175</a></div></div> <div class="ttc" id="a01073_html"><div class="ttname"><a href="a01073.html">tag_and_trait.hpp</a></div></div> <div class="ttc" id="a10289_html_a00a0a67e9558dd2891dd4ddc9a568fab"><div class="ttname"><a href="a10289.html#a00a0a67e9558dd2891dd4ddc9a568fab">__gnu_pbds::detail::bin_search_tree_const_node_it_::reference</a></div><div class="ttdeci">Const_Iterator reference</div><div class="ttdoc">Iterator&#39;s reference type. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00077">bin_search_tree_/node_iterators.hpp:77</a></div></div> <div class="ttc" id="a10289_html_a29777270beba31264794e507ac3b7fee"><div class="ttname"><a href="a10289.html#a29777270beba31264794e507ac3b7fee">__gnu_pbds::detail::bin_search_tree_const_node_it_::get_r_child</a></div><div class="ttdeci">bin_search_tree_const_node_it_< Node, Const_Iterator, Iterator, _Alloc > get_r_child() const</div><div class="ttdoc">Returns the __const node iterator associated with the right node. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00112">bin_search_tree_/node_iterators.hpp:112</a></div></div> <div class="ttc" id="a10289_html_a7eb0036cd037c9139ab0019c557be22d"><div class="ttname"><a href="a10289.html#a7eb0036cd037c9139ab0019c557be22d">__gnu_pbds::detail::bin_search_tree_const_node_it_::metadata_type</a></div><div class="ttdeci">Node::metadata_type metadata_type</div><div class="ttdoc">Metadata type. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00083">bin_search_tree_/node_iterators.hpp:83</a></div></div> <div class="ttc" id="a10289_html_a1cc97219243280077e011641b5a34d7c"><div class="ttname"><a href="a10289.html#a1cc97219243280077e011641b5a34d7c">__gnu_pbds::detail::bin_search_tree_const_node_it_::metadata_const_reference</a></div><div class="ttdeci">_Alloc::template rebind< metadata_type >::other::const_reference metadata_const_reference</div><div class="ttdoc">Const metadata reference type. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00088">bin_search_tree_/node_iterators.hpp:88</a></div></div> <div class="ttc" id="a10289_html_a7acc944a17c34a7e6a1f46a18319abe7"><div class="ttname"><a href="a10289.html#a7acc944a17c34a7e6a1f46a18319abe7">__gnu_pbds::detail::bin_search_tree_const_node_it_::operator==</a></div><div class="ttdeci">bool operator==(const bin_search_tree_const_node_it_< Node, Const_Iterator, Iterator, _Alloc > &other) const</div><div class="ttdoc">Compares to a different iterator object. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00117">bin_search_tree_/node_iterators.hpp:117</a></div></div> <div class="ttc" id="a10289_html_aeebd8eab002abaceeeeedbb0850ae617"><div class="ttname"><a href="a10289.html#aeebd8eab002abaceeeeedbb0850ae617">__gnu_pbds::detail::bin_search_tree_const_node_it_::operator*</a></div><div class="ttdeci">const_reference operator*() const</div><div class="ttdoc">Access. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00097">bin_search_tree_/node_iterators.hpp:97</a></div></div> <div class="ttc" id="a10293_html_ac8e3c7ff2237536b5567dc23b5218d38"><div class="ttname"><a href="a10293.html#ac8e3c7ff2237536b5567dc23b5218d38">__gnu_pbds::detail::bin_search_tree_node_it_::value_type</a></div><div class="ttdeci">Iterator value_type</div><div class="ttdoc">Iterator&#39;s value type. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00147">bin_search_tree_/node_iterators.hpp:147</a></div></div> <div class="ttc" id="a01535_html"><div class="ttname"><a href="a01535.html">__gnu_pbds</a></div><div class="ttdoc">GNU extensions for policy-based data structures for public use. </div><div class="ttdef"><b>Definition:</b> <a href="a01058_source.html#l00051">assoc_container.hpp:51</a></div></div> <div class="ttc" id="a10289_html_af00d0999bd1cb1c6a731bf5327caea72"><div class="ttname"><a href="a10289.html#af00d0999bd1cb1c6a731bf5327caea72">__gnu_pbds::detail::bin_search_tree_const_node_it_::operator!=</a></div><div class="ttdeci">bool operator!=(const bin_search_tree_const_node_it_< Node, Const_Iterator, Iterator, _Alloc > &other) const</div><div class="ttdoc">Compares (negatively) to a different iterator object. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00122">bin_search_tree_/node_iterators.hpp:122</a></div></div> <div class="ttc" id="a10289_html"><div class="ttname"><a href="a10289.html">__gnu_pbds::detail::bin_search_tree_const_node_it_</a></div><div class="ttdoc">Const node iterator. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00058">bin_search_tree_/node_iterators.hpp:58</a></div></div> <div class="ttc" id="a10293_html_a7c165db48078740c7eb8d7d9acd5eba8"><div class="ttname"><a href="a10293.html#a7c165db48078740c7eb8d7d9acd5eba8">__gnu_pbds::detail::bin_search_tree_node_it_::get_l_child</a></div><div class="ttdeci">bin_search_tree_node_it_< Node, Const_Iterator, Iterator, _Alloc > get_l_child() const</div><div class="ttdoc">Returns the node iterator associated with the left node. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00167">bin_search_tree_/node_iterators.hpp:167</a></div></div> <div class="ttc" id="a10289_html_ae7cdc704c64581039293828b5c6f4b15"><div class="ttname"><a href="a10289.html#ae7cdc704c64581039293828b5c6f4b15">__gnu_pbds::detail::bin_search_tree_const_node_it_::iterator_category</a></div><div class="ttdeci">trivial_iterator_tag iterator_category</div><div class="ttdoc">Category. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00068">bin_search_tree_/node_iterators.hpp:68</a></div></div> <div class="ttc" id="a10293_html_a4ad1cd9fab408c3e3bb9aaac4fb02ca9"><div class="ttname"><a href="a10293.html#a4ad1cd9fab408c3e3bb9aaac4fb02ca9">__gnu_pbds::detail::bin_search_tree_node_it_::reference</a></div><div class="ttdeci">Iterator reference</div><div class="ttdoc">Iterator&#39;s reference type. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00150">bin_search_tree_/node_iterators.hpp:150</a></div></div> <div class="ttc" id="a10289_html_adef28620e7ee83e27bf0a3850c31765b"><div class="ttname"><a href="a10289.html#adef28620e7ee83e27bf0a3850c31765b">__gnu_pbds::detail::bin_search_tree_const_node_it_::get_l_child</a></div><div class="ttdeci">bin_search_tree_const_node_it_< Node, Const_Iterator, Iterator, _Alloc > get_l_child() const</div><div class="ttdoc">Returns the __const node iterator associated with the left node. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00107">bin_search_tree_/node_iterators.hpp:107</a></div></div> <div class="ttc" id="a10293_html"><div class="ttname"><a href="a10293.html">__gnu_pbds::detail::bin_search_tree_node_it_</a></div><div class="ttdoc">Node iterator. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00136">bin_search_tree_/node_iterators.hpp:136</a></div></div> <div class="ttc" id="a10289_html_ac2361c1a9389f98ad1476a463670ad30"><div class="ttname"><a href="a10289.html#ac2361c1a9389f98ad1476a463670ad30">__gnu_pbds::detail::bin_search_tree_const_node_it_::get_metadata</a></div><div class="ttdeci">metadata_const_reference get_metadata() const</div><div class="ttdoc">Metadata access. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00102">bin_search_tree_/node_iterators.hpp:102</a></div></div> <div class="ttc" id="a01476_html_ga3a45dab56a44f762c97eb0eaee17f6f2"><div class="ttname"><a href="a01476.html#ga3a45dab56a44f762c97eb0eaee17f6f2">__gnu_pbds::trivial_iterator_difference_type</a></div><div class="ttdeci">void trivial_iterator_difference_type</div><div class="ttdoc">Prohibit moving trivial iterators. </div><div class="ttdef"><b>Definition:</b> <a href="a01073_source.html#l00079">tag_and_trait.hpp:79</a></div></div> <div class="ttc" id="a01537_html"><div class="ttname"><a href="a01537.html">detail</a></div><div class="ttdef"><b>Definition:</b> <a href="a01355_source.html#l00043">hash_prime_size_policy_imp.hpp:43</a></div></div> <div class="ttc" id="a10289_html_a67882de51ea972e066ed1ea5e39ae76c"><div class="ttname"><a href="a10289.html#a67882de51ea972e066ed1ea5e39ae76c">__gnu_pbds::detail::bin_search_tree_const_node_it_::value_type</a></div><div class="ttdeci">Const_Iterator value_type</div><div class="ttdoc">Iterator&#39;s value type. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00074">bin_search_tree_/node_iterators.hpp:74</a></div></div> <div class="ttc" id="a09853_html"><div class="ttname"><a href="a09853.html">__gnu_pbds::trivial_iterator_tag</a></div><div class="ttdoc">A trivial iterator tag. Signifies that the iterators has none of std::iterators&#39;s movement abilities...</div><div class="ttdef"><b>Definition:</b> <a href="a01073_source.html#l00075">tag_and_trait.hpp:75</a></div></div> <div class="ttc" id="a10293_html_aab710c87290d148b6dd2eb260ff27a1d"><div class="ttname"><a href="a10293.html#aab710c87290d148b6dd2eb260ff27a1d">__gnu_pbds::detail::bin_search_tree_node_it_::operator*</a></div><div class="ttdeci">Iterator operator*() const</div><div class="ttdoc">Access. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00162">bin_search_tree_/node_iterators.hpp:162</a></div></div> <div class="ttc" id="a10289_html_a60ca6e16f3a71fde157c1376d14afc62"><div class="ttname"><a href="a10289.html#a60ca6e16f3a71fde157c1376d14afc62">__gnu_pbds::detail::bin_search_tree_const_node_it_::difference_type</a></div><div class="ttdeci">trivial_iterator_difference_type difference_type</div><div class="ttdoc">Difference type. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00071">bin_search_tree_/node_iterators.hpp:71</a></div></div> <div class="ttc" id="a10293_html_a4929c6c309b332e7e61ca667d4970f34"><div class="ttname"><a href="a10293.html#a4929c6c309b332e7e61ca667d4970f34">__gnu_pbds::detail::bin_search_tree_node_it_::const_reference</a></div><div class="ttdeci">Iterator const_reference</div><div class="ttdoc">Iterator&#39;s __const reference type. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00153">bin_search_tree_/node_iterators.hpp:153</a></div></div> <div class="ttc" id="a10289_html_a7c469cca98a372efbd8ed9cb086fa3ae"><div class="ttname"><a href="a10289.html#a7c469cca98a372efbd8ed9cb086fa3ae">__gnu_pbds::detail::bin_search_tree_const_node_it_::const_reference</a></div><div class="ttdeci">Const_Iterator const_reference</div><div class="ttdoc">Iterator&#39;s __const reference type. </div><div class="ttdef"><b>Definition:</b> <a href="a15217_source.html#l00080">bin_search_tree_/node_iterators.hpp:80</a></div></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_3a83f109ff04170a1f8448445d1bdcba.html">include</a></li><li class="navelem"><a class="el" href="dir_d6815ee4ad7be618f033845800be3017.html">ext</a></li><li class="navelem"><a class="el" href="dir_afaff2f5b61f44d50c9875b428318082.html">pb_ds</a></li><li class="navelem"><a class="el" href="dir_f37d910f5ba825954160494085256009.html">detail</a></li><li class="navelem"><a class="el" href="dir_7cbb3293f490fa6a5479ac623bcc8b31.html">bin_search_tree_</a></li><li class="navelem"><a class="el" href="a15217.html">node_iterators.hpp</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> </ul> </div> </body> </html>