41 #ifndef PB_DS_BIN_SEARCH_TREE_FIND_ITERATORS_HPP
42 #define PB_DS_BIN_SEARCH_TREE_FIND_ITERATORS_HPP
52 #define PB_DS_TREE_CONST_IT_C_DEC \
53 bin_search_tree_const_it_< \
60 Is_Forward_Iterator, \
63 #define PB_DS_TREE_CONST_ODIR_IT_C_DEC \
64 bin_search_tree_const_it_< \
71 !Is_Forward_Iterator, \
74 #define PB_DS_TREE_IT_C_DEC \
75 bin_search_tree_it_< \
82 Is_Forward_Iterator, \
85 #define PB_DS_TREE_ODIR_IT_C_DEC \
86 bin_search_tree_it_< \
93 !Is_Forward_Iterator, \
97 template<
typename Node_Pointer,
100 typename Const_Pointer,
102 typename Const_Reference,
103 bool Is_Forward_Iterator,
118 :
m_p_nd(const_cast<Node_Pointer>(p_nd))
158 {
return m_p_nd == other.m_p_nd; }
162 {
return m_p_nd == other.m_p_nd; }
166 {
return m_p_nd != other.m_p_nd; }
170 {
return m_p_nd != other.m_p_nd; }
176 inc(integral_constant<int,Is_Forward_Iterator>());
191 dec(integral_constant<int,Is_Forward_Iterator>());
218 if (
m_p_nd->m_p_right != 0)
221 while (
m_p_nd->m_p_left != 0)
226 Node_Pointer p_y =
m_p_nd->m_p_parent;
227 while (
m_p_nd == p_y->m_p_right)
230 p_y = p_y->m_p_parent;
233 if (
m_p_nd->m_p_right != p_y)
250 if (
m_p_nd->m_p_left != 0)
252 Node_Pointer p_y =
m_p_nd->m_p_left;
253 while (p_y->m_p_right != 0)
254 p_y = p_y->m_p_right;
259 Node_Pointer p_y =
m_p_nd->m_p_parent;
260 while (
m_p_nd == p_y->m_p_left)
263 p_y = p_y->m_p_parent;
265 if (
m_p_nd->m_p_left != p_y)
274 template<
typename Node_Pointer,
277 typename Const_Pointer,
279 typename Const_Reference,
280 bool Is_Forward_Iterator,
299 base_it_type::m_p_nd = other.m_p_nd;
307 base_it_type::m_p_nd = other.m_p_nd;
311 inline typename PB_DS_TREE_CONST_IT_C_DEC::pointer
315 return &base_it_type::m_p_nd->m_value;
318 inline typename PB_DS_TREE_CONST_IT_C_DEC::reference
322 return base_it_type::m_p_nd->m_value;
328 PB_DS_TREE_CONST_IT_C_DEC:: operator++();
343 PB_DS_TREE_CONST_IT_C_DEC:: operator--();
359 #undef PB_DS_TREE_CONST_IT_C_DEC
360 #undef PB_DS_TREE_CONST_ODIR_IT_C_DEC
361 #undef PB_DS_TREE_IT_C_DEC
362 #undef PB_DS_TREE_ODIR_IT_C_DEC
const_pointer operator->() const
Definition: point_iterators.hpp:143
PB_DS_TREE_IT_C_DEC operator++(int)
Definition: point_iterators.hpp:333
const_reference operator*() const
Definition: point_iterators.hpp:150
void dec(false_type)
Definition: point_iterators.hpp:238
Const iterator.
Definition: point_iterators.hpp:105
Value_Type value_type
Definition: point_iterators.hpp:110
PB_DS_TREE_IT_C_DEC operator--(int)
Definition: point_iterators.hpp:348
PB_DS_TREE_CONST_IT_C_DEC::reference operator*() const
Definition: point_iterators.hpp:319
bin_search_tree_const_it_(const Node_Pointer p_nd=0)
Definition: point_iterators.hpp:117
Iterator.
Definition: point_iterators.hpp:282
Node_Pointer m_p_nd
Definition: point_iterators.hpp:270
Const_Pointer const_pointer
Definition: point_iterators.hpp:112
#define _GLIBCXX_DEBUG_ASSERT(_Condition)
Definition: debug.h:61
PB_DS_TREE_CONST_IT_C_DEC & operator++()
Definition: point_iterators.hpp:173
PB_DS_TREE_CONST_IT_C_DEC & operator=(const PB_DS_TREE_CONST_IT_C_DEC &other)
Definition: point_iterators.hpp:128
bin_search_tree_const_it_(const PB_DS_TREE_CONST_ODIR_IT_C_DEC &other)
Definition: point_iterators.hpp:122
PB_DS_TREE_CONST_IT_C_DEC::pointer operator->() const
Definition: point_iterators.hpp:312
void dec(true_type)
Definition: point_iterators.hpp:242
PB_DS_TREE_IT_C_DEC & operator=(const PB_DS_TREE_ODIR_IT_C_DEC &other)
Definition: point_iterators.hpp:305
PB_DS_TREE_IT_C_DEC & operator=(const PB_DS_TREE_IT_C_DEC &other)
Definition: point_iterators.hpp:297
PB_DS_TREE_IT_C_DEC & operator++()
Definition: point_iterators.hpp:326
void inc(false_type)
Definition: point_iterators.hpp:205
#define PB_DS_TREE_CONST_IT_C_DEC
Definition: point_iterators.hpp:52
#define PB_DS_TREE_CONST_ODIR_IT_C_DEC
Definition: point_iterators.hpp:63
_Alloc::difference_type difference_type
Definition: point_iterators.hpp:109
PB_DS_TREE_CONST_IT_C_DEC & operator=(const PB_DS_TREE_CONST_ODIR_IT_C_DEC &other)
Definition: point_iterators.hpp:136
#define PB_DS_TREE_IT_C_DEC
Definition: point_iterators.hpp:74
bool operator!=(const PB_DS_TREE_CONST_ODIR_IT_C_DEC &other) const
Definition: point_iterators.hpp:169
bin_search_tree_it_(const PB_DS_TREE_ODIR_IT_C_DEC &other)
Definition: point_iterators.hpp:291
#define PB_DS_TREE_ODIR_IT_C_DEC
Definition: point_iterators.hpp:85
PB_DS_TREE_CONST_IT_C_DEC & operator--()
Definition: point_iterators.hpp:189
void inc(true_type)
Definition: point_iterators.hpp:209
PB_DS_TREE_CONST_IT_C_DEC operator++(int)
Definition: point_iterators.hpp:181
Const_Reference const_reference
Definition: point_iterators.hpp:114
bin_search_tree_it_(const Node_Pointer p_nd=0)
Definition: point_iterators.hpp:286
bool operator!=(const PB_DS_TREE_CONST_IT_C_DEC &other) const
Definition: point_iterators.hpp:165
bool operator==(const PB_DS_TREE_CONST_IT_C_DEC &other) const
Definition: point_iterators.hpp:157
std::tr1::integral_constant< int, 1 > true_type
Definition: type_utils.hpp:70
Pointer pointer
Definition: point_iterators.hpp:111
std::bidirectional_iterator_tag iterator_category
Definition: point_iterators.hpp:108
PB_DS_TREE_CONST_IT_C_DEC base_it_type
Definition: point_iterators.hpp:356
PB_DS_TREE_CONST_IT_C_DEC operator--(int)
Definition: point_iterators.hpp:196
Reference reference
Definition: point_iterators.hpp:113
PB_DS_TREE_IT_C_DEC & operator--()
Definition: point_iterators.hpp:341
bool operator==(const PB_DS_TREE_CONST_ODIR_IT_C_DEC &other) const
Definition: point_iterators.hpp:161
std::tr1::integral_constant< int, 0 > false_type
Definition: type_utils.hpp:71