DIRECTORY BasicTime, IO, Pipal, PipalInt, PipalReal, SymTab; PipalIO: CEDAR DEFINITIONS ~ BEGIN ClassReadProc: TYPE = PROC [stream: IO.STREAM] RETURNS [object: Pipal.Object]; ClassWriteProc: TYPE = PROC [stream: IO.STREAM, object: Pipal.Object]; RegisterClass: PROC [class: Pipal.Class, read: ClassReadProc, write: ClassWriteProc]; ReadObject: PROC [stream: IO.STREAM] RETURNS [object: Pipal.Object]; WriteObject: PROC [stream: IO.STREAM, object: Pipal.Object]; ReadIntVector: PROC [stream: IO.STREAM] RETURNS [vector: PipalInt.Vector]; WriteIntVector: PROC [stream: IO.STREAM, vector: PipalInt.Vector]; ReadIntRectangle: PROC [stream: IO.STREAM] RETURNS [rectangle: PipalInt.Rectangle]; WriteIntRectangle: PROC [stream: IO.STREAM, rectangle: PipalInt.Rectangle]; ReadOrientation: PROC [stream: IO.STREAM] RETURNS [orientation: PipalInt.Orientation]; WriteOrientation: PROC [stream: IO.STREAM, orientation: PipalInt.Orientation]; ReadIntTransformation: PROC [stream: IO.STREAM] RETURNS [transformation: PipalInt.Transformation]; WriteIntTransformation: PROC [stream: IO.STREAM, transformation: PipalInt.Transformation]; ReadRealVector: PROC [stream: IO.STREAM] RETURNS [vector: PipalReal.Vector]; WriteRealVector: PROC [stream: IO.STREAM, vector: PipalReal.Vector]; ReadRealRectangle: PROC [stream: IO.STREAM] RETURNS [rectangle: PipalReal.Rectangle]; WriteRealRectangle: PROC [stream: IO.STREAM, rectangle: PipalReal.Rectangle]; ReadRealTransformation: PROC [stream: IO.STREAM] RETURNS [transformation: PipalReal.Transformation]; WriteRealTransformation: PROC [stream: IO.STREAM, transformation: PipalReal.Transformation]; FileInfo: PROC [fileName: Pipal.ROPE, wantedCreatedTime: BasicTime.GMT _ BasicTime.nullGMT] RETURNS [creationTime: BasicTime.GMT _ BasicTime.nullGMT]; RestoreObject: PROC [fileName: Pipal.ROPE, wantedCreatedTime: BasicTime.GMT _ BasicTime.nullGMT] RETURNS [object: Pipal.Object]; SaveObject: PROC [fileName: Pipal.ROPE, object: Pipal.Object] RETURNS [creationTime: BasicTime.GMT]; directoryClass: Pipal.Class; Directory: TYPE = REF DirectoryRec; DirectoryRec: TYPE = RECORD [ name: Pipal.ROPE, table: SymTab.Ref ]; CreateDirectory: PROC [name: Pipal.ROPE, table: SymTab.Ref] RETURNS [directory: Directory]; FetchInDirectory: PROC [directory: Directory, name: Pipal.ROPE] RETURNS [object: Pipal.Object _ NIL]; DirectoryAndShortName: PROC [name: Pipal.ROPE] RETURNS [directory, shortName: Pipal.ROPE _ NIL]; importClass: Pipal.Class; Import: TYPE = REF ImportRec; ImportRec: TYPE = RECORD [ name: Pipal.ROPE, isDirectory: BOOL _ FALSE, referee: Pipal.Object _ NIL, creationTime: BasicTime.GMT _ BasicTime.nullGMT ]; CreateTimedImport: PROC [name: Pipal.ROPE, isDirectory: BOOL _ FALSE, creationTime: BasicTime.GMT] RETURNS [import: Import]; CreateRefereedImport: PROC [name: Pipal.ROPE, isDirectory: BOOL _ FALSE, referee: Pipal.Object] RETURNS [import: Import]; EachImportProc: TYPE = PROC [import: Import] RETURNS [quit: BOOL _ FALSE]; EnumerateObjectImports: PROC [object: Pipal.Object, each: EachImportProc] RETURNS [quit: BOOL _ FALSE]; Fetch: PROC [name: Pipal.ROPE] RETURNS [object: Pipal.Object _ NIL]; ReadObjects: PROC [stream: IO.STREAM] RETURNS [objects: Pipal.Objects _ NIL]; END. ΄PipalIO.mesa Copyright Σ 1988 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet, May 2, 1988 6:06:45 pm PDT Bertrand Serlet, May 9, 1988 11:58:01 pm PDT Framework PipalInt Data Types PipalReal Data Types Pipal Files For all the following operations, the suffix ".pipal" is added to the file name. Returns nullGMT iff not found. Directory Allows packing of several objects into a single one. Also provides some kind of hierarchical naming (enforced by the user interface). short name of the design (such as "Logic") maps short names to objects (such as "nand.sch") name is the short name of the design (such as "Logic"). name is the short name of the object (such as "Nand.sch"). Breaks a full name into the directory name and the shortName. Directory part ends at the first ".". For example DirectoryAndShortName["Logic.nand.sch"] -> ["Logic", "nand.sch"]. directory is NIL if breaking is not possible. Imports Allows explicit sharing and lazy read. full name of the object (such as "Logic.or.sch") private field reserved for the implementation creation time of the underlying file (such as "Logic.or.sch.pipal") Only three of these states are valid: creationTime#nullGMT AND referee#NIL => the underlying file and the VM are consistent. creationTime=nullGMT => the VM is the truth. referee=NIL => the underlying file has not been read yet. When isDirectory is TRUE, referee is the whole directory, and creationTime is the directory creation time. Imports + Directories If there is a file named , an import of this file is made. If not, a directory file is searched. When such a directory file exists a directory import is made, otherwise NIL is returned. Utilities Κ˜codešœ ™ Kšœ<™