RoseDriveImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Barth, September 5, 1985 6:37:22 pm PDT
Spreitzer, September 22, 1985 4:36:52 pm PDT
DIRECTORY Basics, IO, Rope, RoseTransduce, RoseWireClasses, RoseWireTypes, VFonts;
RoseDriveImpl:
CEDAR
PROGRAM
IMPORTS
EXPORTS RoseWireClasses =
BEGIN OPEN RoseWireTypes;
GetDrive:
PUBLIC
PROC
RETURNS [RoseWireClass] = {
RETURN[driveClass]};
driveSuperClass: RoseWireSuperClass ←
NEW[RoseWireSuperClassRec ← [
GetType: DriveGetType,
ListFormats: NIL,
GetFormat: NIL,
Bits: DriveBits,
MesaRepresentation: DriveMesaRepresentation,
MesaRepAux: DriveMesaRepAux,
flavor: drive
]];
driveClass: RoseWireClass ←
NEW[RoseWireClassRec ← [
structure: atom,
dereference: FALSE,
addressContaining: FALSE,
classData: NIL,
super: driveSuperClass]];
DriveGetType:
PROC [rwc: RoseWireClass, wire: Wire]
RETURNS [rwt: RoseWireType] = {
IF wire.structure # atom THEN ERROR;
RETURN[driveType];
};
driveType:
PUBLIC RoseWireType ←
NEW[RoseWireTypeRec ← [
class: driveClass,
typeData: NIL,
length: 0,
other: NIL]];
BitsPerDrive: NAT = SIZE[PACKED ARRAY [0 .. 32) OF Drive] / SIZE[PACKED ARRAY [0 .. 32) OF BOOL];
DriveBits:
PROC [rwt: RoseWireType]
RETURNS [n:
INT] = {
RETURN[BitsPerDrive]};
DriveMesaRepresentation:
PROC [rwc: RoseWireClass]
RETURNS [mesa: Mesa] = {
mesa ← [mesa: "Drive"]};
DriveMesaRepAux:
PROC [rwc: RoseWireClass]
RETURNS [mesa: Mesa] = {
mesa ← [
mesa: "Drive: TYPE = RoseBehavior.Drive",
directory: LIST["RoseBehavior"]
];
};
END.