--File IntStorageDefs.mesa
--July 24, 1980 9:48 PM by MN
DIRECTORY
ParserTypeDefs: FROM "ParserTypeDefs" USING [Point, Path],
IntVMDefs: FROM "IntVMDefs" USING [VMAddr, NilVMAddr],
IntTransDefs: FROM "IntTransDefs" USING [TransformRecord];
IntStorageDefs: DEFINITIONS =
BEGIN
Object: TYPE = POINTER TO ObjectRecord;
ObjectType: TYPE = {STEntry, SetNode, Call, Box, MBox, Flash, Polygon, Wire, User};
ObjectName: TYPE = IntVMDefs.VMAddr;
BBoxRecord: TYPE = RECORD [left,right,bottom,top: LONG INTEGER];
NilObjectName: ObjectName = IntVMDefs.NilVMAddr;
ObjectRecord: TYPE = RECORD [
SELECT type: ObjectType FROM
STEntry => [
bb: BBoxRecord,
bbValid,deleted,expanded,bound,defined: BOOLEAN,
guts: ObjectName,
symNumber: LONG CARDINAL,
overflow,sameNumber: ObjectName,
cby: ObjectName],
SetNode => [
contents: LONG CARDINAL,
next: ObjectName],
Call => [
bb: BBoxRecord,
next: ObjectName,
symNumber: LONG CARDINAL,
uniqueID: ObjectName,
t: IntTransDefs.TransformRecord],
Box => [
bb: BBoxRecord,
next: ObjectName,
layer: CARDINAL,
length, width: LONG CARDINAL,
center: ParserTypeDefs.Point,
xRot, yRot: LONG INTEGER],
MBox => [ --Manhattan Box
bb: BBoxRecord,
next: ObjectName,
layer: CARDINAL],
Flash => [
bb: BBoxRecord,
next: ObjectName,
layer: CARDINAL,
diameter: LONG CARDINAL,
center: ParserTypeDefs.Point],
Polygon =>[
bb: BBoxRecord,
next: ObjectName,
layer: CARDINAL,
p: ParserTypeDefs.Path],
Wire => [
bb: BBoxRecord,
next: ObjectName,
layer: CARDINAL,
width: LONG CARDINAL,
p: ParserTypeDefs.Path],
User => [
bb: BBoxRecord,
next: ObjectName,
layer: CARDINAL,
size: CARDINAL,
data: POINTER TO UNSPECIFIED],
ENDCASE];
--Object oriented storage package for CIF Parser
InitStorage: PROCEDURE RETURNS [BOOLEAN];
FinishStorage: PROCEDURE RETURNS [BOOLEAN];
-- Stores Thing in VM, returns a name by which Thing may be later retrieved using FetchObject.
StoreObject: PROCEDURE [src: Object] RETURNS [ObjectName];
FetchObject: PROCEDURE [src: ObjectName, dest: Object];
-- Replace, dest with thing, they had better be of the same size...
ReplaceObject: PROCEDURE [src: Object, dest: ObjectName];
-- Get rid of the named object.
DeleteObject: PROCEDURE [what: ObjectName];
END.