-- MCrossSorter.Mesa -- A simple interface for sorting a collection of objects based on a string key -- last edited 22-Oct-81 15:36:49 by Paul Rovner DIRECTORY MCrossRefDefs; MCrossSorter: DEFINITIONS = BEGIN -- Types SortOrder: TYPE = {increasing, decreasing, unordered}; -- Errors NotInitialized: ERROR; -- Procedures Initialize: PROC[keyLength: CARDINAL]; Finalize: PROC[]; Clear: PROC; Enter: PROC[token: MCrossRefDefs.TokenHandle]; Enumerate: PROC[ leafProc: PROC[token: MCrossRefDefs.TokenHandle] RETURNS[stop: BOOLEAN], order: SortOrder ← unordered] RETURNS[stopped: BOOLEAN]; END. Implementation notes (SorterImpl.mesa): Duplicates may occur; they will not be removed. Not protected with monitors. Sorage requirements: 8 pages for tables