CDSequencer.mesa (A Chipndale module)
by Christian Jacobi June 29, 1983 2:34 pm
last edited by Christian Jacobi February 16, 1984 10:59 am
DIRECTORY
CD;
CDSequencer: CEDAR DEFINITIONS =
BEGIN
Command: TYPE = REF CommandRec;
CommandRec: TYPE = RECORD [
a: ATOMNIL,
design: CD.Design ← NIL,
l: CD.Level ← CD.combined,
n: CD.Number ← 0,
pos: CD.DesignPosition ← [0, 0], -- final position of command
sPos: CD.DesignPosition ← [0, 0], -- special position, start position, (exceptional: size)
orient: CD.Orientation ← CD.original,
ref: REFNIL,
b: BOOLEANFALSE
];
CommandProc: TYPE = PROC[Command];
QueueCommand: PROC[design: CD.Design←NIL, comm: Command];
--for compatibility reasons not yet removed
--After calling QueueCommand the client must not modify any fields of comm^.
--comm^ then is subject to garbage collection
Queueing: TYPE = {dontQueue, doQueue};
ExecuteCommand: PROC [comm: CDSequencer.Command, design: CD.Design←NIL, as: ATOMNIL, queue: Queueing ← doQueue];
--if as#NIL replaces comm.a
--if design#NIL replaces comm.designv
ImplementCommand: PROC [a: ATOM, p: CommandProc, technology: CD.Technology←NIL];
--If technology is NIL implement for all technologies.
--Reimplementing the same atom in a technology it already exists overwrites the command;
--If the same atom is specified for a particular technology and all technologies,
--the more specific implementation wins independent of order.
--There is a (finite, short) list of atoms you MUST NOT use.
--Don't fool with NIL CommandProc's if you don't know exactly how it works.
--(NIL CommandProc's serves too install the list of commands you MUST NOT use.)
END.