<> <> <> <> <> <<>> DIRECTORY IO, Imager USING [Context], IP, IPConstants, IPParams, IPNetTab, IPChipRose, Rope, SymTab, CoreRouteFlat; <<>> IPPortTab: CEDAR DEFINITIONS <<-- Intro: This is the table of (I/O) port abstraction. Havent actually used it. >> IMPORTS IPParams = BEGIN Ref: TYPE = REF Rep; Rep: TYPE = RECORD[ports: SymTab.Ref]; Port: TYPE = REF PortRep; PortRep: TYPE = IP.PortRep; --name, pinPorts, length EachPortAction: TYPE = PROC[port: Port] RETURNS [quit: BOOL _ FALSE]; Create: PROC[chipRose: IPChipRose.Ref, netTab: IPNetTab.Ref] RETURNS [Ref]; CreateFromStructure: PROC[structure: CoreRouteFlat.Structure, netTab: IPNetTab.Ref] RETURNS [Ref]; FetchPort: PROC[portTab: Ref, name: Rope.ROPE] RETURNS [Port]; Ports: PROC[portTab: Ref, action: EachPortAction]; DescribeSelf: PROC[portTab: Ref, stream: IO.STREAM]; ReconstructSelf: PROC[stream: IO.STREAM, netTab: IPNetTab.Ref] RETURNS [Ref]; <<--Operation on individual port>> PaintPort: PROC [port: Port, context: Imager.Context, xOffset, yOffset: REAL _ 0.0, scaleFactor: REAL _ 1.0, stipple: CARDINAL _ IPConstants.White, size: NAT _ IPParams.DefaultPortSize, showPortName: BOOL _ TRUE]; PortActive: PROC[port: Port] RETURNS [BOOL] = INLINE {RETURN [port.position # NIL]};--PortActive END.