#include <qgarlib/GenEdge.H>
An edge includes:
The adjacent nodes are arbitrarily called the source and the target. The source (resp. target) is the first (resp. second) node given as argument to the constructor at the creation of the edge.
See class qgar::GenNode for nodes.
Definition at line 96 of file GenEdge.H.
Public Types | |
Types | |
| typedef TEDGE | edge_type |
| Type of the data stored in an edge. | |
| typedef edge_type & | edge_type_reference |
| Reference to qgar::GenEdge::edge_type. | |
| typedef const edge_type & | edge_type_const_reference |
| Constant reference to qgar::GenEdge::edge_type. | |
| typedef edge_type * | edge_type_pointer |
| Pointer to qgar::GenEdge::edge_type. | |
| typedef const edge_type * | edge_type_const_pointer |
| Constant pointer to qgar::GenEdge::edge_type. | |
| typedef TNODE | node_type |
| Type of the data stored in a node. | |
| typedef node_type & | node_type_reference |
| Reference to qgar::GenEdge::node_type. | |
| typedef const node_type & | node_type_const_reference |
| Constant reference to qgar::GenEdge::node_type. | |
| typedef node_type * | node_type_pointer |
| Pointer to qgar::GenEdge::node_type. | |
| typedef const node_type * | node_type_const_pointer |
| Constant pointer to qgar::GenEdge::node_type. | |
Public Member Functions | |
Constructors | |
| GenEdge (short int aFlag=0) | |
| Default constructor. | |
| GenEdge (edge_type_const_reference aData, short int aFlag=0) | |
| Initialize with data. | |
| GenEdge (GenNode< node_type, edge_type > *const aPSource, GenNode< node_type, edge_type > *const aPTarget, short int aFlag=0) | |
| Initialize with source and target. | |
| GenEdge (GenNode< node_type, edge_type > *const aPSource, GenNode< node_type, edge_type > *const aPTarget, edge_type_const_reference aData, short int aFlag=0) | |
| Initialize with data, source and target. | |
| GenEdge (const GenEdge< node_type, edge_type > &anEdge) | |
| Copy constructor. | |
Destructor | |
| ~GenEdge () | |
| Non-virtual destructor. | |
Edge data | |
| edge_type_const_reference | accessData () const |
| Get edge data. | |
| edge_type | data () const |
| Get a copy of edge data. | |
| void | setData (edge_type_const_reference aData) |
| Set edge data. | |
| short int | flag () const |
| Get edge flag. | |
| void | setFlag (short int aFlag) |
| Set edge flag. | |
Adjacent nodes | |
| const GenNode< node_type, edge_type > & | accessSource () const |
| Get source node. | |
| GenNode< node_type, edge_type > | source () const |
| Get a copy of source node. | |
| GenNode< node_type, edge_type > * | pSource () const |
| Get a pointer to source node. | |
| const GenNode< node_type, edge_type > & | accessTarget () const |
| Get target node. | |
| GenNode< node_type, edge_type > | target () const |
| Get a copy of target node. | |
| GenNode< TNODE, TEDGE > * | pTarget () const |
| Get a pointer to target node. | |
| void | setPSource (GenNode< node_type, edge_type > *aPSource) |
| Set (pointer to) source node. | |
| void | setPTarget (GenNode< node_type, edge_type > *aPTarget) |
| Set (pointer to the) target node. | |
| void | setPNode (GenNode< node_type, edge_type > *aPNode) |
| Set (pointer to) given node as source or target. | |
Operators | |
| GenEdge< node_type, edge_type > & | operator= (const GenEdge< node_type, edge_type > &anEdge) |
| Assignment. | |
| bool | operator== (const GenEdge< node_type, edge_type > &anEdge) |
| Equality. | |
| bool | operator!= (const GenEdge< node_type, edge_type > &anEdge) |
| Inequality. | |
Protected Attributes | |
Representation of an edge | |
| edge_type | _data |
| Data contained in the edge. | |
| short int | _flag |
| Flag at client's disposal (default 0). | |
| GenNode< node_type, edge_type > * | _pSource |
| Pointer to the source node. | |
| GenNode< node_type, edge_type > * | _pTarget |
| Pointer to the target node. | |
|
|||||
|
Type of the data stored in an edge.
|
|
|||||
|
Constant pointer to qgar::GenEdge::edge_type.
|
|
|||||
|
Constant reference to qgar::GenEdge::edge_type.
|
|
|||||
|
Pointer to qgar::GenEdge::edge_type.
|
|
|||||
|
Reference to qgar::GenEdge::edge_type.
|
|
|||||
|
Type of the data stored in a node.
|
|
|||||
|
Constant pointer to qgar::GenEdge::node_type.
|
|
|||||
|
Constant reference to qgar::GenEdge::node_type.
|
|
|||||
|
Pointer to qgar::GenEdge::node_type.
|
|
|||||
|
Reference to qgar::GenEdge::node_type.
|
|
||||||||||
|
Default constructor. The source and target of the edge are set to 0.
Definition at line 51 of file GenEdge.TCC. |
|
||||||||||||||||
|
Initialize with data. The source and target of the edge are set to 0.
|
|
||||||||||||||||||||
|
Initialize with source and target.
|
|
||||||||||||||||||||||||
|
Initialize with data, source and target.
|
|
||||||||||
|
Copy constructor.
Definition at line 114 of file GenEdge.TCC. |
|
|||||||||
|
Non-virtual destructor.
Definition at line 134 of file GenEdge.TCC. |
|
|||||||||
|
Get edge data.
Definition at line 149 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_data. |
|
|||||||||
|
Get source node.
Definition at line 204 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_pSource. |
|
|||||||||
|
Get target node.
Definition at line 234 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_pTarget. |
|
|||||||||
|
Get a copy of edge data.
Definition at line 159 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_data. |
|
|||||||||
|
Get edge flag.
Definition at line 179 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_flag. |
|
||||||||||
|
Inequality. Test if the data of the current edge do not compare equal to the data of given edge anEdge, using operator <b>== applying to objects of type TEDGE, The values of the flags are not taken into account.
Definition at line 336 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_data. |
|
||||||||||
|
Assignment.
Definition at line 307 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_data, qgar::GenEdge< TNODE, TEDGE >::_flag, qgar::GenEdge< TNODE, TEDGE >::_pSource, and qgar::GenEdge< TNODE, TEDGE >::_pTarget. |
|
||||||||||
|
Equality.
Definition at line 326 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_data. |
|
|||||||||
|
Get a pointer to source node.
Definition at line 224 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_pSource. |
|
|||||||||
|
Get a pointer to target node.
Definition at line 254 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_pTarget. |
|
||||||||||
|
Set edge data.
|
|
||||||||||
|
Set edge flag.
Definition at line 189 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_flag. |
|
||||||||||
|
Set (pointer to) given node as source or target. The given node becomes the source of the current edge if the source is free. Otherwise, the given node becomes the target of the current edge.
|
|
||||||||||
|
Set (pointer to) source node.
|
|
||||||||||
|
Set (pointer to the) target node.
|
|
|||||||||
|
Get a copy of source node.
Definition at line 214 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_pSource. |
|
|||||||||
|
Get a copy of target node.
Definition at line 244 of file GenEdge.TCC. References qgar::GenEdge< TNODE, TEDGE >::_pTarget. |
|
|||||
|
Data contained in the edge.
Definition at line 402 of file GenEdge.H. Referenced by qgar::GenEdge< TNODE, TEDGE >::accessData(), qgar::GenEdge< TNODE, TEDGE >::data(), qgar::GenEdge< TNODE, TEDGE >::operator!=(), qgar::GenEdge< TNODE, TEDGE >::operator=(), and qgar::GenEdge< TNODE, TEDGE >::operator==(). |
|
|||||
|
Flag at client's disposal (default 0).
Definition at line 407 of file GenEdge.H. Referenced by qgar::GenEdge< TNODE, TEDGE >::flag(), qgar::GenEdge< TNODE, TEDGE >::operator=(), and qgar::GenEdge< TNODE, TEDGE >::setFlag(). |
|
|||||
|
Pointer to the source node.
Definition at line 412 of file GenEdge.H. Referenced by qgar::GenEdge< TNODE, TEDGE >::accessSource(), qgar::GenEdge< TNODE, TEDGE >::operator=(), qgar::GenEdge< TNODE, TEDGE >::pSource(), and qgar::GenEdge< TNODE, TEDGE >::source(). |
|
|||||
|
Pointer to the target node.
Definition at line 417 of file GenEdge.H. Referenced by qgar::GenEdge< TNODE, TEDGE >::accessTarget(), qgar::GenEdge< TNODE, TEDGE >::operator=(), qgar::GenEdge< TNODE, TEDGE >::pTarget(), and qgar::GenEdge< TNODE, TEDGE >::target(). |