CDCore.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
by Christian Jacobi, August 14, 1985 2:35:33 pm PDT
Last Edited by Christian Jacobi, September 10, 1985 4:43:28 pm PDT
DIRECTORY
CD,
Core,
Rope USING [ROPE];
CDCore: CEDAR DEFINITIONS =
BEGIN
-- General
generateLayout: ATOM = $GenLayout;
--Put this property on Core CellType or CellClass to find generation procedures:
--  the value of this property (either ATOM or LIST OF REF ANY [using first])
--  determines which CDCore generator should be called
--[Core structure creators which do not load ChipNDale may use the Atom value directly]
--The file CDCoreDoc has a pointer to a list of some registered CDCore generators
-- Generating Layout
Problem: SIGNAL [messagetype: ProblemType, message: Rope.ROPE ← NIL];
ProblemType: TYPE = {noGenerator, generatorParameterError, generatorFailed, other, parameterError, internalError};
CreateCDFromCore: PROC [coreDesign: Core.Design, coreCellType: Core.CellType, cdDesign: CD.Design] RETURNS [ob: CD.Object];
--may raise Problem or Core.StructureError
--tries to cache objects
--  cache may be wrong if ChipNDale child objects are edited
--  cache may miss hit if coreDesign or cdDesign used in other pairings
InvalidateCache: PROC [what: REF];
--what: either CD.Object or Core.CellType
--does not propagate to parent structures
-- Tools
CreateProc: TYPE = PROC [coreDesign: Core.Design, coreCellType: Core.CellType, cdDesign: CD.Design, param: LIST OF REF ANYNIL, key: ATOM] RETURNS [ob: CD.Object ← NIL];
--param: parameters, value of generateLayout property, key removed
--key: registration key; first field of generateLayout property
RegisterGenerator: PROC [createProc: CreateProc, name: ATOM, registrationKey: REFNIL];
--may raise CD.Error[doubleRegistration]
--double registration is allowed if registrationKey not NIL and equal
END.