Class RouteEdge - RouteEdge.h, RouteEdge.cc



 
Definition:
A class used by the class RouteTracks.  A RouteEdge is simply a vertical or horizontal edge used to connect two MazePoints.   Each edge is assigned a track and edge number as well as a vertical or horizontal orientation corresponding to its location within the maze.  Additionally, each edge hold the nets which are routed over it. There is no explicit way of determining which two MazePoints a route edge connects, but you can implicitly find them by the track number, edge number and the orientation of the edge.  I never implicitly showed the connection just because I never needed it, though it would be a nice addition.
Typedefs:
typedef list<Net *> NetList;
typedef NetList::iterator NetListItr;
Included:
#include "Net.h"
#include <list>



Variable Index
 
o bool horizontal
The orientation of this edge.
o int trackNum
The track number of this edge.
o int edgeNum
The edge number (within the track) of this edge.
o int numNets
The number of nets which are routed over this edge.
o NetList * netList
A list of the nets which are routed over this edge.

 

Constructor Index

o RouteEdge()
Default constructor.
o RouteEdge(bool horiz, int row_or_col, int edge_num)
Sets the orientation (horizontal), the track number trackNum and the edge number edgeNum.
o ~RouteEdge()
Deconstructor.
Method Index
o bool isHorizontal()
Returns 'true' if the orientation (horizontal) of the edge is horizontal.
o bool isVertical()
Returns 'true' if the orientation (horizontal) of the edge is vertical.
o int getEdgeNum()
Returns the number of the edge (edgeNum) within the track.  NOTE: there can be several edges with the same edge number, but they should have different edge numbers. This is not meant to uniquely identify an edge.
o int getTrackNum()
Returns the number of the track (trackNum) of this edge.
o int getNumNets()
Returns the number of nets which are routed over this edge.
o NetList * getNetList()
Returns a pointer to the list of nets which are routed over this edge.
o void addNet(Net * aNet)
Adds the specified Net as routed over this edge.
o void removeNet(Net * aNet)
Removes the specified net as routed over this edge.
o void resetNumNets()
Resets the variable numNets to the size of the net list netList.  This variable should always be consistent, but this function was created to insure that it is consistent.
o void print()
A debugging function which prints the location of this edge (track num, edge num, orientation).