<> <> <> <> DIRECTORY CD USING [Technology], Icons USING [IconFlavor], Rope USING [ROPE], TIPUser USING [TIPTable]; CDEnvironment: CEDAR DEFINITIONS = BEGIN <> <<>> <<>> <<-- Tip tables >> SetTipTable: PROC [for: REF, tipTable: Rope.ROPE_NIL]; <<--verbose on TerminalIO>> <<--for: Design, Technology or global>> <<--tipTable: NIL for standard lookup (user profile)>> GetTipTable: PROC [for: REF] RETURNS [TIPUser.TIPTable]; <<--for: Design, Technology or global>> <<-- Icons >> SetIcon: PROC [for: REF, file: Rope.ROPE, n: NAT]; <<--for: Design, Technology or global>> <<--only new viewers might get the new icon>> GetIcon: PROC [for: REF] RETURNS [Icons.IconFlavor]; <<--for: Design, Technology or global>> SetPanelIcon: PROC [for: REF, file: Rope.ROPE, n: NAT]; <<--for: Design, Technology or global>> <<--only new viewers might get the new icon>> GetPanelIcon: PROC [for: REF] RETURNS [Icons.IconFlavor]; <<--for: Design, Technology or global>> <<>> <<-- Working Directories >> SetWorkingDirectory: PROC [for: REF, wDir: Rope.ROPE_NIL]; <<--Sets the working directory of ChipNDale feature (not process)>> <<--for: Design, Technology, NIL for ChipNDale itself (dangerous)>> <<--wDir: if NIL: takes wDir from profile or process>> GetWorkingDirectory: PROC [for: REF_NIL] RETURNS [wDir: Rope.ROPE]; <<--Gets the working directory for a ChipNDale feature (not process)>> <<--design: Design, Technology or ChipNDale's global directory>> <<>> DoWithWDir: PROC [wDir: Rope.ROPE, proc: PROC]; <<--executes proc with wDir as current working directory for process >> <<>> <<>> <<-- Names >> MakeName: PROC [base: Rope.ROPE, ext: Rope.ROPE_NIL, wDir: Rope.ROPE_NIL, modifier: Rope.ROPE_NIL] RETURNS [Rope.ROPE]; <<--makes a full path filename: adds extension ext if base does not have an extension;>> <<--adds working directory wDir if base is not a full path name>> <<--adds modifier if not NIL>> <<>> <<>> <<-- Loader >> RemoveSpaces: PROC [line: Rope.ROPE] RETURNS [Rope.ROPE_NIL]; <<--returns rope with spaces (and tabs) removed from both ends>> SplitLine: PROC [line: Rope.ROPE] RETURNS [key, rest: Rope.ROPE_NIL]; <<--splits a line into a keyword and the rest >> <<--returns>> <<-- key: keyword at beginning of line; >> <<-- (leading spaces and trailing separator [space or colon] removed)>> <<-- rest: rest of line (after separator)>> <<-- (leading spaces removed)>> <<>> FetchKeyLine: PROC [fileName: Rope.ROPE, key: Rope.ROPE] RETURNS [entry: Rope.ROPE]; <<--Searches for a line starting with key in file>> <<--Returns the rest of the line found or NIL if not found>> StuffToCommandTool: PROC [r: Rope.ROPE, wDir: Rope.ROPE_NIL, searchPath: LIST OF Rope.ROPE_NIL] RETURNS [result: REF_NIL]; <<--Executes r with a commandtool>> ExecFileEntry: PROC [key: Rope.ROPE, technology: CD.Technology_NIL, modifier: Rope.ROPE_NIL]; <<--checks whether a particular key is mentioned in a .CDLoadList file>> <<--if particular key is found, executes the rest of the line with a command tool>> <<--technology and modifier are used to make the name of the used .CDLoadList file>> <<--(using modifier .CDLoadList files for particular feature classes can be distinguished)>> <<--building of name for the .CDLoadList files:>> <<-- ChipNDale-CD.CDLoadList if {technology=NIL, modifier=NIL}>> <<-- ChipNDale-CD-modifier.CDLoadList if {technology=NIL, modifier#NIL}>> <<-- ChipNDale-technologyName.CDLoadList if {technology#NIL, modifier=NIL}>> <<-- ChipNDale-technologyName-modifier.CDLoadList if {technology#NIL, modifier#NIL}>> LoadTechnology: PROC [key: ATOM, name: Rope.ROPE] RETURNS [CD.Technology]; <<--makes all the necessary messages if not loaded>> <<>> END.