[B]asic module for [unit] program testing:
|
Iteradores [CONST] para obtener todos los vértices de un grafo. More...
#include <ADH_Graph.h>
Public Member Functions | |
const_iterator () | |
Constructor. | |
const_iterator (const const_iterator &o) | |
Constructor de copia. | |
const_iterator & | operator= (const const_iterator &o) |
Copia. | |
const_iterator | operator++ (int) |
it++ | |
const_iterator | operator++ () |
++it | |
const_iterator | operator-- (int) |
it-- | |
const_iterator | operator-- () |
--it | |
const key_type & | operator* () |
*p | |
const key_type * | operator-> () |
p-> | |
Private Attributes | |
Rep::const_iterator | m_it |
Iterador [CONST] de "Graph" . | |
Friends | |
class | Graph |
bool | operator== (const const_iterator &p, const const_iterator &q) |
¿ p == q ? | |
bool | operator!= (const const_iterator &p, const const_iterator &q) |
¿ p != q ? |
Iteradores [CONST] para obtener todos los vértices de un grafo.
{{ // test::Rep_const_iterator() Graph Tree; Tree.set("root", "child(1)", 1 ); Tree.set("root", "child(2)", 2*2 ); Tree.set("root", "child(3)", 3*3*3); Graph::Rep_const_iterator it, jt; int val = int(); for ( it = Tree.begin_Rep() ; it != Tree.end_Rep() ; ++it ) { for ( jt = Tree.begin_Rep() ; jt != Tree.end_Rep() ; ++jt ) { if ( Tree.isArc( it->first , jt->first , val ) ) { assertTrue( it->first == "root" ); assertTrue( jt->first.substr(0,5) == "child" ); } } } }}
Definition at line 85 of file ADH_Graph.h.
ADH::Graph::const_iterator::const_iterator | ( | ) | [inline] |
Constructor.
Definition at line 88 of file ADH_Graph.h.
ADH::Graph::const_iterator::const_iterator | ( | const const_iterator & | o | ) | [inline] |
Constructor de copia.
Definition at line 91 of file ADH_Graph.h.
const_iterator& ADH::Graph::const_iterator::operator= | ( | const const_iterator & | o | ) | [inline] |
Copia.
Definition at line 92 of file ADH_Graph.h.
const_iterator ADH::Graph::const_iterator::operator++ | ( | int | ) | [inline] |
it++
Definition at line 104 of file ADH_Graph.h.
const_iterator ADH::Graph::const_iterator::operator++ | ( | ) | [inline] |
++it
Definition at line 106 of file ADH_Graph.h.
const_iterator ADH::Graph::const_iterator::operator-- | ( | int | ) | [inline] |
it--
Definition at line 107 of file ADH_Graph.h.
const_iterator ADH::Graph::const_iterator::operator-- | ( | ) | [inline] |
--it
Definition at line 109 of file ADH_Graph.h.
const key_type& ADH::Graph::const_iterator::operator* | ( | ) | [inline] |
*p
Definition at line 111 of file ADH_Graph.h.
const key_type* ADH::Graph::const_iterator::operator-> | ( | ) | [inline] |
p->
Definition at line 112 of file ADH_Graph.h.
friend class Graph [friend] |
Definition at line 86 of file ADH_Graph.h.
bool operator== | ( | const const_iterator & | p, |
const const_iterator & | q | ||
) | [friend] |
¿ p == q
?
Definition at line 97 of file ADH_Graph.h.
bool operator!= | ( | const const_iterator & | p, |
const const_iterator & | q | ||
) | [friend] |
¿ p != q
?
Definition at line 100 of file ADH_Graph.h.
Rep::const_iterator ADH::Graph::const_iterator::m_it [private] |
Iterador [CONST] de "Graph"
.
Definition at line 114 of file ADH_Graph.h.