1 # ifndef TPL_STD_ITRO_H
2 # define TPL_STD_ITRO_H
12 template <
class Tree_Type>
17 friend class Set_Type;
19 typedef typename Tree_Type::Iterator Iterator;
27 if (itor.has_current () )
28 underflow = overflow =
false;
30 underflow = overflow =
true;
64 if (not itor.has_current () )
78 if (not itor.has_current () )
82 iterator (Tree_Type & _tree, Node * node)
83 : itor (_tree, node), underflow (false), overflow (false)
91 typedef typename map::size_type difference_type;
98 iterator (Tree_Type & tree) : itor (tree)
106 return KEY (itor.get_current () );
112 return &
KEY (itor.get_current () );
121 return KEY (itor.get_current () );
126 Pair & retPair =
KEY (itor.get_current () );
132 Pair & operator -- ()
136 return KEY (itor.get_current () );
139 Pair & operator -- (
int)
141 Pair & retPair =
KEY (itor.get_current () );
147 Pair & operator += (
const size_type & n)
149 itor.reset_to_pos (itor.get_current_position () + n);
151 return KEY (itor.get_current () );
154 Pair & operator -= (
const size_type & n)
156 itor.reset_to_pos (itor.get_current_position () - n);
158 return KEY (itor.get_current () );
161 bool operator == (
const iterator & _itor)
const
163 return itor == _itor.itor;
166 bool operator != (
const iterator & _itor)
const
168 return not (itor == _itor.itor);
171 bool verify (
const map & _map)
const
173 return itor.verify ( (Tree_Type*) &_map.tree);
176 bool verify (
const iterator & it)
const
178 return itor.verify (it.itor);
186 # endif // TPL_STD_ITRO_H
Pair * operator->()
"Dereferencia" un puntero al elemento actual.
Definition: tpl_stl_itor.H:110
Definition: tpl_stl_itor.H:13
Pair & operator++()
Definition: tpl_stl_itor.H:117
Pair & operator*()
Proporciona una referencia al elemento actual.
Definition: tpl_stl_itor.H:104
map::value_type & reference
Definition: Map.H:79
Pair value_type
Tipo a exportar como tipo del contenedor.
Definition: Map.H:75
iterator()
Constructor vacío; no tiene validez si no se asocia un conjunto.
Definition: tpl_stl_itor.H:96
#define KEY(p)
Definition: tpl_binNode.H:206