<> <> <> <> <<>> DIRECTORY Core, CoreMapFunction, CoreOps, CoreProperties, CoreSequence, IO; CoreMapFunctionImpl: CEDAR PROGRAM IMPORTS CoreOps, CoreProperties, IO EXPORTS CoreMapFunction = BEGIN OPEN Core, CoreMapFunction; mapFnCellClass: PUBLIC CellClass _ NEW[CellClassRec _ [name: "MapFn", recast: Recast, write: Write, read: Read, properties: CoreProperties.Props[[CoreOps.printClassProcProp, NEW[CoreOps.PrintClassProc _ PropPrintClass]]]]]; Start: PROC = { CoreOps.RegisterCellClass[mapFnCellClass]; }; Write: WriteProc = { }; Read: ReadProc = { }; Recast: RecastProc = { }; Create: PUBLIC PROC [name: ROPE _ NIL, publicWire: Wire, args: MapFnCellType] RETURNS [cellType: CellType] = { cellType _ NEW[CellTypeRec _ [ name: name, class: mapFnCellClass, publicWire: publicWire, data: args]]; <> <> <> <> <> }; PropPrintClass: CoreOps.PrintClassProc = {Print[NARROW[data], out]}; Print: PUBLIC PROC [cell: MapFnCellType, out: IO.STREAM] = { IO.PutF[out, "\n\nBase cell type: %g", IO.rope[cell.cells[0].name]]; <> <> <> <> <> <> <> <> <> }; Start[]; END.