com.sun.electric.tool.ncc.netlist
Class Port

java.lang.Object
  extended by com.sun.electric.tool.ncc.netlist.NetObject
      extended by com.sun.electric.tool.ncc.netlist.Port
All Implemented Interfaces:
NetObjReport.NetObjReportable, PortReport.PortReportable

public class Port
extends NetObject
implements PortReport.PortReportable

An NCC Port holds all the Export names associated with a single NCC Wire.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.tool.ncc.netlist.NetObject
NetObject.Type
 
Constructor Summary
Port(java.lang.String name, PortCharacteristic type, Wire w)
           
 
Method Summary
 void addExport(java.lang.String nm, PortCharacteristic type, boolean oneNamePerPort)
           
 void checkMe(Circuit parent)
          Make sure this object is OK.
 java.lang.String connectionDescription(int n)
          human readable description of things connected this NetObject
 java.lang.String exportNamesString()
          Electric allows multiple Exports to be attached to network.
 java.util.Iterator<NetObject> getConnected()
           
 java.util.Iterator<java.lang.String> getExportNames()
           
 java.lang.String getName()
          instance name qualified by path prefix
 NetObject.Type getNetObjType()
          Distinguish Parts, Wires, and Ports.
 boolean getToBeRenamed()
           
 PortCharacteristic getType()
           
 Wire getWire()
           
 java.lang.String getWireName()
           
 java.lang.String instanceDescription()
          human readable identification of instance
 boolean isDeleted()
           
 boolean isImplied()
           
 void setToBeRenamed()
           
 java.lang.String valueDescription()
          human readable enumeration of sizes and other values
 
Methods inherited from class com.sun.electric.tool.ncc.netlist.NetObject
error, fullDescription, getCode, getParent, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.electric.tool.ncc.result.NetObjReport.NetObjReportable
fullDescription
 

Constructor Detail

Port

public Port(java.lang.String name,
            PortCharacteristic type,
            Wire w)
Method Detail

getName

public java.lang.String getName()
Description copied from class: NetObject
instance name qualified by path prefix

Specified by:
getName in interface NetObjReport.NetObjReportable
Specified by:
getName in class NetObject

getNetObjType

public NetObject.Type getNetObjType()
Description copied from class: NetObject
Distinguish Parts, Wires, and Ports.

Specified by:
getNetObjType in class NetObject
Returns:
PART or WIRE or PORT

getConnected

public java.util.Iterator<NetObject> getConnected()
Specified by:
getConnected in class NetObject

addExport

public void addExport(java.lang.String nm,
                      PortCharacteristic type,
                      boolean oneNamePerPort)

getType

public PortCharacteristic getType()
Returns:
the type of Export. If a Wire has multiple Exports of different types then return the most common type.

getWire

public Wire getWire()
Returns:
the Wire attached to this Port

getWireName

public java.lang.String getWireName()
Specified by:
getWireName in interface PortReport.PortReportable
Returns:
the name of the Wire attached to this Port

checkMe

public void checkMe(Circuit parent)
Description copied from class: NetObject
Make sure this object is OK.

Specified by:
checkMe in class NetObject

exportNamesString

public java.lang.String exportNamesString()
Electric allows multiple Exports to be attached to network. When this happens, NCC creates a single Port with multiple names.

Specified by:
exportNamesString in interface PortReport.PortReportable
Returns:
a string containing all the Export names of this Port

getExportNames

public java.util.Iterator<java.lang.String> getExportNames()
Returns:
an Iterator over all the Export names

isDeleted

public boolean isDeleted()
Specified by:
isDeleted in class NetObject

isImplied

public boolean isImplied()
Specified by:
isImplied in interface PortReport.PortReportable

setToBeRenamed

public void setToBeRenamed()

getToBeRenamed

public boolean getToBeRenamed()

instanceDescription

public java.lang.String instanceDescription()
Description copied from class: NetObject
human readable identification of instance

Specified by:
instanceDescription in interface NetObjReport.NetObjReportable
Specified by:
instanceDescription in class NetObject

valueDescription

public java.lang.String valueDescription()
Description copied from class: NetObject
human readable enumeration of sizes and other values

Specified by:
valueDescription in class NetObject

connectionDescription

public java.lang.String connectionDescription(int n)
Description copied from class: NetObject
human readable description of things connected this NetObject

Specified by:
connectionDescription in class NetObject