41 #ifndef PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP 42 #define PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP 50 #define PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC \ 51 bin_search_tree_const_node_it_<Node, Const_Iterator, Iterator, _Alloc> 54 template<
typename Node,
62 typename _Alloc::template rebind<
87 typename _Alloc::template rebind<metadata_type>::other::const_reference
92 : m_p_nd(const_cast<node_pointer>(p_nd))
98 {
return Const_Iterator(m_p_nd); }
103 {
return m_p_nd->get_metadata(); }
106 PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC
108 {
return PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC(m_p_nd->m_p_left); }
111 PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC
113 {
return PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC(m_p_nd->m_p_right); }
117 operator==(
const PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC& other)
const 118 {
return m_p_nd == other.m_p_nd; }
122 operator!=(
const PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC& other)
const 123 {
return m_p_nd != other.m_p_nd; }
128 #define PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC \ 129 bin_search_tree_node_it_<Node, Const_Iterator, Iterator, _Alloc> 132 template<
typename Node,
133 class Const_Iterator,
137 :
public PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC
141 typename _Alloc::template rebind<
142 Node>::other::pointer
157 : PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC(const_cast<node_pointer>(p_nd))
163 {
return Iterator(PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC::m_p_nd); }
166 PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC
169 return PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC(
170 PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC::m_p_nd->m_p_left);
174 PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC
177 return PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC(
178 PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC::m_p_nd->m_p_right);
183 #undef PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC 184 #undef PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC 189 #endif // #ifndef PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP
Iterator value_type
Iterator's value type.
trivial_iterator_difference_type difference_type
Difference type.
_Alloc::template rebind< metadata_type >::other::const_reference metadata_const_reference
Const metadata reference type.
metadata_const_reference get_metadata() const
Metadata access.
const_reference operator*() const
Access.
bin_search_tree_const_node_it_< Node, Const_Iterator, Iterator, _Alloc > get_r_child() const
Returns the __const node iterator associated with the right node.
Const_Iterator const_reference
Iterator's __const reference type.
Iterator reference
Iterator's reference type.
A trivial iterator tag. Signifies that the iterators has none of std::iterators's movement abilities...
bool operator!=(const bin_search_tree_const_node_it_< Node, Const_Iterator, Iterator, _Alloc > &other) const
Compares (negatively) to a different iterator object.
bool operator==(const bin_search_tree_const_node_it_< Node, Const_Iterator, Iterator, _Alloc > &other) const
Compares to a different iterator object.
bin_search_tree_node_it_< Node, Const_Iterator, Iterator, _Alloc > get_r_child() const
Returns the node iterator associated with the right node.
bin_search_tree_node_it_< Node, Const_Iterator, Iterator, _Alloc > get_l_child() const
Returns the node iterator associated with the left node.
Const_Iterator reference
Iterator's reference type.
Iterator operator*() const
Access.
Node::metadata_type metadata_type
Metadata type.
trivial_iterator_tag iterator_category
Category.
GNU extensions for policy-based data structures for public use.
Const_Iterator value_type
Iterator's value type.
Iterator const_reference
Iterator's __const reference type.
void trivial_iterator_difference_type
Prohibit moving trivial iterators.
bin_search_tree_const_node_it_< Node, Const_Iterator, Iterator, _Alloc > get_l_child() const
Returns the __const node iterator associated with the left node.