PipalExtractOps.mesa
Copyright Ó 1987, 1988 by Xerox Corporation. All rights reserved.
Barth, October 14, 1987 3:21:10 pm PDT
Jean-Marc Frailong December 6, 1987 3:18:30 pm PST
Bertrand Serlet April 30, 1988 7:00:14 pm PDT
DIRECTORY
CD, Core, Rope,
Pipal, PipalCore, PipalSinix, PipalUI,
ViewerClasses;
Extraction Conveniences
ExtractTopObject:
PROC [object: Pipal.Object, mode: PipalSinix.Mode]
RETURNS [result:
REF, props: Core.Properties];
This version of PipalSinix.Extract starts from a top-level object and computes the context.
Returned arguments have same meaning as in PipalSinix.Extract.
ExtractTopObjectAndReport:
PROC [object: Pipal.Object, mode: PipalSinix.Mode]
RETURNS [result:
REF ←
NIL, props: Core.Properties ←
NIL];
Same as ExtractTopObject but prints errors on terminal.
ExtractTopObjectToCellTypeAndReport:
PROC [object: Pipal.Object, mode: PipalSinix.Mode]
RETURNS [root: Core.CellType ←
NIL];
Same as ExtractTopObjectAndReport but also checks that the result is a cell type.
Mode Heuristics
IsSchematic:
PROC [object: Pipal.Object]
RETURNS [
BOOL];
Uses a heuristic to decide if this object is a schematic.
This is obviously a crock but better than requiring the user to specify the mode in each command.
GetExtractMode:
PROC [object: Pipal.Object]
RETURNS [mode: PipalSinix.Mode];
Uses IsSchematic to choose between schematic or layout modes.