WalnutSortDB.mesa
Eric Nickell, June 9, 1985 6:07:05 pm PDT
Dave Rumph, October 15, 1985 12:55:25 pm PDT
DIRECTORY
IO, Rope, SymTab
;
WalnutSortDB: CEDAR DEFINITIONS = BEGIN
ROPE: TYPE ~ Rope.ROPE;
Trigger: TYPE ~ RECORD [msNames: LIST OF ROPENIL, priority: CARDINAL ← 10];
TriggerSet: TYPE ~ REF TriggerSetRep;
TriggerSetRep: TYPE ~ RECORD [
mapping: SymTab.Ref ← NIL, -- NARROW SymTab.Fetch[key: <triggerKeyword>] to a REF Trigger.
clientData: REF ANY ← NIL
];
DeclareSegment: PROC [user: ROPE];
Looks up the default segment for the current user and declares it with Cypress.
GetTriggerSetFromDB: PROC RETURNS [t: TriggerSet];
Builds the user a trigger set. This procedure may be somewhat expensive CPU-wise.
AddTrigger: PROC [msName, keyword: ROPE, priority: CARDINAL ← 10];
Puts a new trigger in the database
DeleteTrigger: PROC [msName, keyword: ROPE];
Deletes an existing trigger from the database, if found.
DumpToFile: PROC [fileName: ROPE];
Dumps a copy of the trigger specifications to the file.
LoadFromFile: PROC [fileName: ROPE];
Loads trigger specifications from the file, erasing previous definitions.
DumpToStream: PROC [s: IO.STREAM];
Dumps a copy of the trigger specifications to the stream.
LoadFromStream: PROC [s: IO.STREAM];
Loads trigger specifications from the stream, erasing previous definitions.
Close: PROC;
Closes the transaction with the keyword database, if currently open. This procedure is solely a convenience for those applications wishing to quiesce an Alpine server. Any calls are purely optional from the standpoint of WalnutSort.
InvalidateCache: PROC;
WalnutSort keeps around cached information derived from the WalnutSort database. This procedure provides the wizard the opportunity to muck around with the underlying data, and have WalnutSort not confuse the situation with cached information.
END.
Dave Rumph, October 15, 1985 12:54:04 pm PDT
Changed to facilitate smoother user changes
changes to: WalnutSortDB, DeclareSegment (added "user" parameter)