<> <> <> <<>> DIRECTORY DragOpsCross USING [Word], IO USING [STREAM], Rope USING [ROPE]; TLCacheModels: CEDAR DEFINITIONS = BEGIN <> Word: TYPE = DragOpsCross.Word; wordsPerPage: CARDINAL = 128; logWordsPerPage: CARDINAL = 7; <> Cache: TYPE = REF CacheRec; CacheRec: TYPE = RECORD [ private: REF _ NIL, -- private data to the cache implementation pbus: PBusModel.PBus _ NIL, phACycle: CacheCycleProc _ NIL, phBCycle: CacheCycleProc _ NIL, reset: CacheResetProc _ NIL, -- Resets the given cache to its initial state flush: CacheFlushProc _ NIL, -- Forget everything it knows, but don't effect stats print: CachePrintProc _ NIL, -- Print statistics, and eventually resets them ]; CacheCycleProc: TYPE = PROC [cache: Cache]; CacheResetProc: TYPE = PROC [cache: Cache]; CacheFlushProc: TYPE = PROC [cache: Cache]; CachePrintProc: TYPE = PROC [cache: Cache, stream: IO.STREAM, name: Rope.ROPE, resetStatistics: BOOL _ TRUE]; <> PhACycle: CacheCycleProc; PhBCycle: CacheCycleProc; Reset: CacheResetProc; Flush: CacheFlushProc; Print: CachePrintProc; END.