
<<SMProj.mesa>>
<<Copyright  1985 by Xerox Corporation.  All rights reserved.>>
<<last edit by Satterthwaite, May 14, 1986 4:07:14 pm PDT>>

DIRECTORY
BcdDefs: TYPE USING [BcdBase],
CompilerOps: TYPE USING [Transaction],
FS: TYPE USING [OpenFile, nullOpenFile],
FileSegment: TYPE USING [Span, nullSpan],
Rope: TYPE USING [ROPE],
TimeStamp: TYPE USING [Stamp],
VM: TYPE USING [Interval];

SMProj: CEDAR DEFINITIONS~{

<<projection objects are centrally managed>>
<<do not change contents without acquiring the monitor lock of SMProjImpl>>

Proj: TYPE~REF ProjInfo;
ProjInfo: TYPE~RECORD[
<<the key (encodes all inputs by hashing)>>
stamp: TimeStamp.Stamp_,    -- version stamp, not create
<<version map info>>
fName: Rope.ROPE_NIL,
gName: Rope.ROPE_NIL,
<<hints>>
state: {empty, analyzed, opened}_$empty,
cantOpen: BOOL_FALSE,
interface: BOOL_FALSE,
symbolPages: FileSegment.Span_FileSegment.nullSpan,
localName: Rope.ROPE_NIL,
wDir: Rope.ROPE_NIL,
file: FS.OpenFile_FS.nullOpenFile
];

Analyzed: PROC[proj: Proj] RETURNS[BOOL];

Available: PROC[proj: Proj] RETURNS[BOOL];

Erase: PROC[proj: Proj];    -- clears cache

Fill: PROC[proj: Proj, localName, wDir: Rope.ROPE, new: BOOL];

Find: PROC[stamp: TimeStamp.Stamp] RETURNS[Proj];

Flush: PROC;

Read: PROC[proj: Proj] RETURNS[pages: VM.Interval, base: BcdDefs.BcdBase];

Reset: PROC;    -- erases local file system info

Update: PROC[proj: Proj, parms: REF READONLY CompilerOps.Transaction];

}.

