IndexToolPrivate.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Created by Rick Beach, July 7, 1983 3:28 pm
Rick Beach, February 27, 1985 9:32:37 pm PST
DIRECTORY
ChoiceButtons USING [EnumTypeRef],
OrderedSymbolTableRef USING [Table],
Rope USING [ROPE],
TextNode USING [Location, Ref],
ViewerClasses USING [Viewer];
=
BEGIN
ROPE: TYPE = Rope.ROPE;
IndexHandle: TYPE = REF IndexHandleRec;
IndexHandleRec:
TYPE =
RECORD [
indexViewer: ViewerClasses.Viewer,
documentViewer: ViewerClasses.Viewer,
indexTable: OrderedSymbolTableRef.Table ← NIL,
rootIndexBranch: TextNode.Ref,
indexPhrasesContainer: ViewerClasses.Viewer,
sortAsPhrasesContainer: ViewerClasses.Viewer,
seePhrasesContainer: ViewerClasses.Viewer,
rangeChoice: ChoiceButtons.EnumTypeRef,
primaryChoice: ChoiceButtons.EnumTypeRef,
bytePosition: CARDINAL,
bytePositionBox: ViewerClasses.Viewer,
entries: CARDINAL,
entriesBox: ViewerClasses.Viewer,
ranges: CARDINAL,
rangesBox: ViewerClasses.Viewer,
seeCount: CARDINAL,
seeCountBox: ViewerClasses.Viewer,
nestingCount: CARDINAL,
nestingCountBox: ViewerClasses.Viewer
];
IndexEntry: TYPE = REF IndexEntryRec;
IndexEntryRec:
TYPE =
RECORD [
phrases: LIST OF ROPE,
stickyPointer: TextNode.Location,
valid: BOOLEAN ← FALSE,
versionStamp: ROPE ← NIL,
primary: BOOLEAN ← FALSE,
type: IndexEntryType ← single,
seePhrases: LIST OF ROPE ← NIL,
sortAsPhrases: LIST OF ROPE ← NIL,
bytePosition: CARDINAL ← 0,
branchLocationStart: TextNode.Location ← [NIL, 0],
branchLocationEnd: TextNode.Location ← [NIL, 0]
];
IndexEntryType:
TYPE = {single, beginRange, endRange, see};
CreateIndexFromDocument:
PROCEDURE [documentName:
ROPE]
RETURNS [indexHandle: IndexHandle];
CreateIndexFromViewer:
PROCEDURE [documentViewer: ViewerClasses.Viewer]
RETURNS [indexHandle: IndexHandle];
SupplyTiogaBranch:
PROCEDURE [indexHandle: IndexHandle]
RETURNS [branch: TextNode.Ref];
IndexVersionStamp: PROCEDURE [rope: ROPE] RETURNS [stamp: ROPE];