public class ArcProto extends java.lang.Object implements java.lang.Comparable<ArcProto>, java.io.Serializable
Every arc in the database appears as one prototypical object and many instantiative objects. Thus, for a ArcProto such as the CMOS Metal-1 there is one object (called a ArcProto) that describes the wire prototype and there are many objects (called ArcInsts), one for every instance of a Metal-1 wire that appears in a circuit. ArcProtos are statically created and placed in the Technology objects.
The basic ArcProto has a name, default width, function, Layers that describes it graphically and more.
Modifier and Type | Class and Description |
---|---|
static class |
ArcProto.Function
Function is a typesafe enum class that describes the function of an ArcProto.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCurvable()
Method to set this ArcProto so that instances of it cannot curve.
|
void |
clearEdgeSelect()
Method to set this ArcProto so that instances of it cannot be selected by their edge.
|
void |
clearWipable()
Method to set this ArcProto so that instances of it cannot wipe nodes.
|
int |
compareTo(ArcProto that)
Compares ArcProtos by their Technologies and definition order.
|
java.lang.String |
describe()
Method to describe this ArcProto as a string.
|
static ArcProto |
findArcProto(java.lang.String line)
Method to find the ArcProto with the given name.
|
PrimitiveNode |
findOverridablePinProto(EditingPreferences ep)
Method to find the PrimitiveNode pin corresponding to this ArcProto type.
|
PrimitiveNode |
findPinProto()
Method to find the PrimitiveNode pin corresponding to this ArcProto type.
|
int |
getAngleIncrement(EditingPreferences ep)
Method to get the angle increment on this ArcProto.
|
Technology.ArcLayer[] |
getArcLayers()
Method to return the list of ArcLayers that comprise this ArcProto..
|
long |
getDefaultGridBaseWidth(EditingPreferences ep)
Method to return the default base width of this ArcProto in grid units.
|
ImmutableArcInst |
getDefaultInst(EditingPreferences ep)
Method to return the default immutable instance of this PrimitiveNode
in specified EditingPreferences.
|
double |
getDefaultLambdaBaseWidth()
Method to return the default base width of this ArcProto in lambda units.
|
double |
getDefaultLambdaBaseWidth(EditingPreferences ep)
Method to return the default base width of this ArcProto in lambda units.
|
int |
getFactoryAngleIncrement()
Method to get the default angle increment on this ArcProto.
|
double |
getFactoryAntennaRatio()
Method to tell the default antenna ratio of this ArcProto.
|
long |
getFactoryDefaultGridBaseWidth()
Method to return the factory default base width of this ArcProto in grid units.
|
ImmutableArcInst |
getFactoryDefaultInst()
Method to return the factory default immutable instance of this PrimitiveNode
|
double |
getFactoryDefaultLambdaBaseWidth()
Method to return the factory default base width of this ArcProto in lambda units.
|
java.lang.String |
getFullName()
Method to return the full name of this ArcProto.
|
ArcProto.Function |
getFunction()
Method to return the function of this ArcProto.
|
int |
getGridBaseExtend()
Method to return the base width extend of this ArcProto in grid units.
|
ArcProtoId |
getId()
Method to return the Id of this ArcProto.
|
double |
getLambdaBaseExtend()
Method to return the base width extend of this ArcProto in lambda units.
|
double |
getLambdaElibWidthOffset()
Method to return the width offset of this ArcProto in lambda units.
|
Layer |
getLayer(int arcLayerIndex)
Method to return layer that comprises by its index in all layers
|
int |
getLayerGridExtend(int arcLayerIndex)
Returns the extend of specified layer that comprise this ArcProto over base arc width in grid units.
|
long |
getLayerGridExtend(Layer layer)
Returns the extend of specified layer that comprise this ArcProto over base arc width in grid units.
|
java.util.Iterator<Layer> |
getLayerIterator()
Method to return an iterator over the layers in this ArcProto.
|
double |
getLayerLambdaExtend(int arcLayerIndex)
Returns the extend of specified layer that comprise this ArcProto over base arc width in lambda units.
|
double |
getLayerLambdaExtend(Layer layer)
Returns the extend of specified layer that comprise this ArcProto over base arc width in lambda units.
|
Poly.Type |
getLayerStyle(int arcLayerIndex)
Returns the Poly.Style of specified layer that comprise this ArcLayer.
|
Poly.Type |
getLayerStyle(Layer layer)
Returns the Poly.Style of specified layer that comprise this ArcLayer.
|
int |
getMaxLayerGridExtend()
Method to return the maximal layer extend of this ArcProto in grid units.
|
int |
getMinLayerGridExtend()
Method to return the minimal layer extend of this ArcProto in grid units.
|
java.lang.String |
getName()
Method to return the name of this ArcProto.
|
int |
getNumArcLayers()
Method to return the number of layers that comprise this ArcProto.
|
Poly[] |
getShapeOfDummyArc(double lambdaLength)
Returns the polygons that describe dummy arc of this ArcProto
with default width and specified length.
|
Technology |
getTechnology()
Method to return the Technology of this ArcProto.
|
void |
getZValues(double[] array)
Method to get MinZ and MaxZ of this ArcProto
|
int |
indexOf(Layer layer)
Method to find an index of Layer in a list of Layers that comprise this ArcProto.
|
boolean |
isCurvable()
Method to tell if instances of this ArcProto can curve.
|
boolean |
isEdgeSelect()
Method to tell if instances of this ArcProto can be selected by their edge.
|
boolean |
isNotUsed()
Method to tell if this ArcProto is used.
|
boolean |
isSkipSizeInPalette()
Method to tell if instaces of this ArcProto are special (don't appear in menu).
|
boolean |
isSpecialArc()
Method to tell if instaces of this ArcProto are special (don't appear in menu).
|
boolean |
isWipable()
Method to tell if instances of this ArcProto can wipe nodes.
|
PrimitiveNode |
makeWipablePin(java.lang.String pinName,
java.lang.String portName,
double defSize,
ArcProto... extraArcs) |
void |
setCurvable()
Method to set this ArcProto so that instances of it can curve.
|
void |
setEdgeSelect()
Method to set this ArcProto so that instances of it can be selected by their edge.
|
void |
setFactoryAngleIncrement(int angle)
Method to set the factory-default angle of this ArcProto.
|
void |
setFactoryAntennaRatio(double ratio)
Method to set the factory antenna ratio of this ArcProto.
|
void |
setFactoryExtended(boolean extended)
Method to set the "factory default" end-extension state of this ArcProto.
|
void |
setFactoryFixedAngle(boolean fixed)
Method to set the "factory default" fixed-angle state of this ArcProto.
|
void |
setFactoryRigid(boolean rigid)
Method to set the "factory default" rigid state of this ArcProto.
|
void |
setFactorySlidable(boolean slidable)
Method to set the "factory default" slidability state of this ArcProto.
|
void |
setNotUsed(boolean set)
Method to set this ArcProto so that it is not used.
|
void |
setSkipSizeInPalette()
Method to allow instances of this ArcProto not to be considered in
tech palette for the calculation of the largest icon.
|
void |
setSpecialArc()
Method to allow instances of this ArcProto to be special in menu.
|
void |
setWipable()
Method to set this ArcProto so that instances of it can wipe nodes.
|
java.lang.String |
toString()
Returns a printable version of this ArcProto.
|
protected java.lang.Object |
writeReplace() |
protected java.lang.Object writeReplace()
public ArcProtoId getId()
public java.lang.String getName()
public java.lang.String getFullName()
public Technology getTechnology()
public double getDefaultLambdaBaseWidth()
public double getDefaultLambdaBaseWidth(EditingPreferences ep)
ep
- EditingPreferencespublic double getFactoryDefaultLambdaBaseWidth()
public long getDefaultGridBaseWidth(EditingPreferences ep)
ep
- EditingPreferencespublic long getFactoryDefaultGridBaseWidth()
public ImmutableArcInst getDefaultInst(EditingPreferences ep)
ep
- specified EditingPreferencespublic ImmutableArcInst getFactoryDefaultInst()
public double getLambdaBaseExtend()
public int getGridBaseExtend()
public double getLambdaElibWidthOffset()
public int getMinLayerGridExtend()
public int getMaxLayerGridExtend()
public void setFactoryAntennaRatio(double ratio)
ratio
- the antenna ratio of this ArcProto.public double getFactoryAntennaRatio()
public void setFactoryRigid(boolean rigid)
rigid
- true if this ArcProto should be rigid by factory-default.public void setFactoryFixedAngle(boolean fixed)
fixed
- true if this ArcProto should be fixed-angle by factory-default.public void setFactorySlidable(boolean slidable)
slidable
- true if this ArcProto should be slidability by factory-default.public void setFactoryExtended(boolean extended)
extended
- true if this ArcProto should be end-extended by factory-default.public void setNotUsed(boolean set)
set
- public boolean isNotUsed()
public void setSkipSizeInPalette()
public boolean isSkipSizeInPalette()
public void setWipable()
public void clearWipable()
public boolean isWipable()
public void setCurvable()
public void clearCurvable()
public boolean isCurvable()
public void setEdgeSelect()
public void clearEdgeSelect()
public boolean isEdgeSelect()
public void setSpecialArc()
public boolean isSpecialArc()
public ArcProto.Function getFunction()
public void setFactoryAngleIncrement(int angle)
angle
- the factory-default angle of this ArcProto.public int getAngleIncrement(EditingPreferences ep)
ep
- editing preferences with default incrementpublic int getFactoryAngleIncrement()
public PrimitiveNode findOverridablePinProto(EditingPreferences ep)
ep
- editing preferences with user overridespublic PrimitiveNode findPinProto()
public PrimitiveNode makeWipablePin(java.lang.String pinName, java.lang.String portName, double defSize, ArcProto... extraArcs)
public static ArcProto findArcProto(java.lang.String line)
line
- the name of the ArcProto.public int getNumArcLayers()
public Technology.ArcLayer[] getArcLayers()
public Layer getLayer(int arcLayerIndex)
arcLayerIndex
- layer indexpublic double getLayerLambdaExtend(int arcLayerIndex)
arcLayerIndex
- layer indexpublic int getLayerGridExtend(int arcLayerIndex)
arcLayerIndex
- layer indexpublic Poly.Type getLayerStyle(int arcLayerIndex)
arcLayerIndex
- layer indexpublic double getLayerLambdaExtend(Layer layer)
layer
- specified Layerjava.lang.IndexOutOfBoundsException
- when specified layer diesn't comprise this ArcProtopublic long getLayerGridExtend(Layer layer)
layer
- specified Layerjava.lang.IndexOutOfBoundsException
- when specified layer diesn't comprise this ArcProtopublic Poly.Type getLayerStyle(Layer layer)
layer
- specified Layerjava.lang.IndexOutOfBoundsException
- when specified layer diesn't comprise this ArcProtopublic java.util.Iterator<Layer> getLayerIterator()
public int indexOf(Layer layer)
layer
- the Layer to find.public void getZValues(double[] array)
array
- array[0] is minZ and array[1] is maxpublic Poly[] getShapeOfDummyArc(double lambdaLength)
lambdaLength
- length of dummy arc in lambda units.public java.lang.String describe()
public int compareTo(ArcProto that)
compareTo
in interface java.lang.Comparable<ArcProto>
that
- the other ArcProto.public java.lang.String toString()
toString
in class java.lang.Object