<<>> <> <> <> <> <> <> DIRECTORY Rope USING [ROPE]; Profiles: CEDAR DEFINITIONS = BEGIN OPEN Rope; <> <.profile, or if none exists, User.profile. The purpose of a profile is to allow personalized tailoring of the system. >> <<>> <: RETURN, where value is either (1) a BOOL, (2) an INT, (3) a TOKEN, (4) a ListOfTokens, or (5) an expression which can be assigned to some Cedar type (for more details, see ProfileDoc.tioga). Comments (indicated using the standard "--" convention) can appear anywhere in the profile and will be ignored. The parsing will also ignore extra spaces or blank lines. Any errors or anomalies discovered when parsing or accessing the profile will cause diagnostics to be printed to the file Profile.log. The user will be informed that problems have been encountered via the Message Window. In no case however will the system break.>> <<>> <> <<>> <> <<>> <> Profile: TYPE ~ REF ProfileRep; ProfileRep: TYPE; --Private Create: PROC [files: LIST OF ROPE, keepFresh: BOOL ¬ TRUE] RETURNS [profile: Profile]; <> <> <<>> CreateFromRope: PROC [slices: LIST OF ROPE] RETURNS [profile: Profile]; <> <> <<>> Slice: TYPE ~ RECORD [ SELECT type: * FROM rope => [text: Rope.ROPE], file => [fileName: Rope.ROPE], ENDCASE ]; CreateFromSlices: PROC [slices: LIST OF Slice, keepFresh: BOOL ¬ TRUE] RETURNS [profile: Profile]; <> <> <<>> LetProfileGetStale: PROC [profile: Profile]; <> <> <> <<>> <> <<>> <> Boolean: PROC [profile: Profile, key: ROPE, default: BOOL ¬ FALSE] RETURNS [value: BOOL]; Number: PROC [profile: Profile, key: ROPE, default: INT ¬ 0] RETURNS [value: INT]; Token: PROC [profile: Profile, key: ROPE, default: ROPE ¬ NIL] RETURNS [value: ROPE]; <:, i.e. effectively does an IO.GetTokenRope[... IDBreak]. If the first character encountered is ", then reads everything to the next matching ", and returns this as a single rope.>> <> <> <> <> <> <> ListOfTokens: PROC [profile: Profile, key: ROPE, default: LIST OF ROPE ¬ NIL] RETURNS [value: LIST OF ROPE]; <> <> <> <<>> <> Line: PROC [profile: Profile, key: ROPE, default: ROPE ¬ NIL] RETURNS [value: ROPE]; <> <<>> EnumerateKeys: PROC [profile: Profile, pattern: ROPE, proc: EnumProc]; EnumProc: TYPE ~ PROC [key: ROPE] RETURNS [quit: BOOL ¬ FALSE]; <> <<>> HasEntry: PROC [profile: Profile, key: ROPE] RETURNS [BOOL]; <> <<>> GetProfileNames: PROC [profile: Profile] RETURNS [LIST OF ROPE]; <> <<>> GetProfileSlices: PROC [profile: Profile] RETURNS [LIST OF Slice]; <> << >> <> Error: ERROR [reason: ROPE]; <> <<>> <> <<>> <> <> <<>> <> <> <> <> <<};>> <> CallWhenProfileChanges: PROC [profile: Profile, proc: ProfileChangedProc, clientData: REF]; <> ProfileChangedProc: TYPE = PROC [profile: Profile, reason: ProfileChangeReason, clientData: REF ¬ NIL]; ProfileChangeReason: TYPE = {firstTime, rollBack, edit}; ProfileChanged: ProfileChangedProc; <> <<>> END. <<>>