-- File: DBSegmentParticularTable.mesa
-- Last edited by:
--   MBrown on December 16, 1982 1:13 pm
-- Last Edited by: Woosh, January 11, 1983 9:41 am

  DIRECTORY
    DBCommon USING [DBPage, OpenFileHandle, Segment, VersionOptions, Trans],
    Environment USING [Comparison],
    Inline USING [CompareLC],
    Rope USING [ROPE];


ParticularTable: CEDAR DEFINITIONS IMPORTS Inline = BEGIN
  ROPE: TYPE = Rope.ROPE;

  Node: TYPE = REF NodeRecord;
  NodeRecord: TYPE = RECORD [
    segmentID: DBCommon.DBPage,
    segment: DBCommon.Segment ← NIL,
    trans: DBCommon.Trans ← NIL,
    openFile: DBCommon.OpenFileHandle ← NIL,
    readonly: BOOL ← TRUE,
    
    version: DBCommon.VersionOptions ← OldFileOnly,
    initializeExistingFile: BOOL ← FALSE,
    rbColor: BOOL ← FALSE,
    fileName: ROPE ← NIL,
    pagesInitial, pagesPerExtent: NAT ← 0,
    rbLLink, rbRLink: Node ← NIL
    ];

  Key: TYPE = DBCommon.DBPage;
  GetKey: PROC [n: Node] RETURNS [Key] = INLINE {
    RETURN [n.segmentID] };
  CompareKeyToNode: PROC [k: Key, n: Node] RETURNS [Environment.Comparison] = INLINE {
    RETURN [Inline.CompareLC[k, n.segmentID]] };

  END.--ParticularTable