27 # ifndef TPL_STD_ITRO_H 28 # define TPL_STD_ITRO_H 38 template <
class Tree_Type>
43 friend class Set_Type;
45 typedef typename Tree_Type::Iterator Iterator;
53 if (itor.has_current () )
54 underflow = overflow =
false;
56 underflow = overflow =
true;
90 if (not itor.has_current () )
104 if (not itor.has_current () )
108 iterator (Tree_Type & _tree, Node * node)
109 : itor (_tree, node), underflow (false), overflow (false)
117 typedef typename map::size_type difference_type;
124 iterator (Tree_Type & tree) : itor (tree)
132 return KEY (itor.get_current () );
138 return &
KEY (itor.get_current () );
147 return KEY (itor.get_current () );
152 Pair & retPair =
KEY (itor.get_current () );
158 Pair & operator -- ()
162 return KEY (itor.get_current () );
165 Pair & operator -- (
int)
167 Pair & retPair =
KEY (itor.get_current () );
173 Pair & operator += (
const size_type & n)
175 itor.reset_to_pos (itor.get_current_position () + n);
177 return KEY (itor.get_current () );
180 Pair & operator -= (
const size_type & n)
182 itor.reset_to_pos (itor.get_current_position () - n);
184 return KEY (itor.get_current () );
187 bool operator == (
const iterator & _itor)
const 189 return itor == _itor.itor;
192 bool operator != (
const iterator & _itor)
const 194 return not (itor == _itor.itor);
197 bool verify (
const map & _map)
const 199 return itor.verify ( (Tree_Type*) &_map.tree);
202 bool verify (
const iterator & it)
const 204 return itor.verify (it.itor);
212 # endif // TPL_STD_ITRO_H Pair * operator->()
"Dereferencia" un puntero al elemento actual.
Definition: tpl_stl_itor.H:136
Definition: tpl_stl_itor.H:39
Node::Key_Type & KEY(Node *p) noexcept
Definition: tpl_binNode.H:318
Pair & operator++()
Definition: tpl_stl_itor.H:143
Pair & operator*()
Proporciona una referencia al elemento actual.
Definition: tpl_stl_itor.H:130
map::value_type & reference
Definition: Map.H:104
Pair value_type
Tipo a exportar como tipo del contenedor.
Definition: Map.H:100
iterator()
Constructor vacÃo; no tiene validez si no se asocia un conjunto.
Definition: tpl_stl_itor.H:122