public abstract class Router
extends java.lang.Object
A Route is a List of RouteElements. See RouteElement for details of the elements.
User: gainsley Date: Mar 1, 2004 Time: 2:48:46 PM
Modifier and Type | Class and Description |
---|---|
protected static class |
Router.ContactSize
ContactSize class to deterime the arc sizes and contact size between two
objects to be connected by the wirer.
|
protected static class |
Router.CreateRouteJob
Job to create the route.
|
Modifier and Type | Field and Description |
---|---|
protected Tool |
tool
the tool that is making routes
|
protected boolean |
verbose
set to tell user short info on what was done
|
Constructor and Description |
---|
Router() |
Modifier and Type | Method and Description |
---|---|
void |
createRoute(Route route,
Cell cell)
Create the route within a Job.
|
static boolean |
createRouteNoJob(Route route,
Cell cell,
java.util.Map<ArcProto,java.lang.Integer> arcsCreatedMap,
java.util.Map<NodeProto,java.lang.Integer> nodesCreatedMap)
Method to create the route.
|
static ArcProto |
getArcToUse(PortProto port1,
PortProto port2)
Determine which arc type to use to connect two ports
NOTE: for safety, will NOT return a Generic.tech.universal_arc,
Generic.tech.invisible_arc, or Generic.tech.unrouted_arc,
unless it is the currently selected arc.
|
static double |
getArcWidthToUse(ElectricObject obj,
ArcProto ap,
int arcAngle,
boolean ignoreAngle)
Get arc width to use to connect to PortInst pi.
|
static void |
reportRoutingResults(java.lang.String prefix,
java.util.Map<ArcProto,java.lang.Integer> arcsCreatedMap,
java.util.Map<NodeProto,java.lang.Integer> nodesCreatedMap,
boolean beep) |
void |
setTool(Tool tool)
Method to set the tool associated with this router
|
protected boolean verbose
protected Tool tool
public void createRoute(Route route, Cell cell)
route
- the route to createcell
- the cell in which to create the routepublic static boolean createRouteNoJob(Route route, Cell cell, java.util.Map<ArcProto,java.lang.Integer> arcsCreatedMap, java.util.Map<NodeProto,java.lang.Integer> nodesCreatedMap)
route
- the route to createcell
- the cell in which to create the routearcsCreatedMap
- a map of arcs to integers which is updated to indicate the number of each arc type created.nodesCreatedMap
- a map of nodes to integers which is updated to indicate the number of each node type created.public static void reportRoutingResults(java.lang.String prefix, java.util.Map<ArcProto,java.lang.Integer> arcsCreatedMap, java.util.Map<NodeProto,java.lang.Integer> nodesCreatedMap, boolean beep)
public void setTool(Tool tool)
public static ArcProto getArcToUse(PortProto port1, PortProto port2)
port1
- one end point of arc (ignored if null)port2
- other end point of arc (ignored if null)public static double getArcWidthToUse(ElectricObject obj, ArcProto ap, int arcAngle, boolean ignoreAngle)
You may specify pi as null, in which case it just returns ap.getDefaultLambdaFullWidth().
If ignoreAngle is false, only arcs whose angles match arcAngle will have their sizes used to determine the arc width. 180 degrees out of phase also matches in this case.
If ignoreAngle is true, any arcs will have their sizes used to determine the return arc size.
obj
- the object to connect to, either a PortInst or an ArcInstap
- the Arc type to connect witharcAngle
- of the arc that will be drawn (in tenth-degrees)ignoreAngle
- to ignore the angle of arc to be drawn and existing arcs