public PageCursor(UsageMap _enclosing) { this._enclosing = _enclosing; _forwardDirHandler = new UsageMap.PageCursor.ForwardDirHandler(this); _reverseDirHandler = new UsageMap.PageCursor.ReverseDirHandler(this); this.Reset(); }
/// <exception cref="System.IO.IOException"></exception> public ReferenceHandler(UsageMap _enclosing) : base(_enclosing) { this._enclosing = _enclosing; int numUsagePages = (this._enclosing.GetRowEnd() - this._enclosing.GetRowStart() - 1) / 4; this._enclosing.SetStartOffset(this._enclosing.GetFormat().OFFSET_USAGE_MAP_PAGE_DATA ); this._enclosing.SetPageRange(0, (numUsagePages * this.GetMaxPagesPerUsagePage())); // there is no "start page" for a reference usage map, so we get an // extra page reference on top of the number of page references that fit // in the table for (int i = 0; i < numUsagePages; i++) { int mapPageNum = this._enclosing.GetTableBuffer().GetInt(this.CalculateMapPagePointerOffset (i)); if (mapPageNum > 0) { ByteBuffer mapPageBuffer = this._mapPageHolder.SetPage(this._enclosing.GetPageChannel (), mapPageNum); byte pageType = mapPageBuffer.Get(); if (pageType != PageTypes.USAGE_MAP) { throw new IOException("Looking for usage map at page " + mapPageNum + ", but page type is " + pageType); } mapPageBuffer.Position(this._enclosing.GetFormat().OFFSET_USAGE_MAP_PAGE_DATA); this._enclosing.ProcessMap(mapPageBuffer, (this.GetMaxPagesPerUsagePage() * i)); } } }
/// <exception cref="System.IO.IOException"></exception> internal InlineHandler(UsageMap _enclosing, bool assumeOutOfRangeBitsOn) : base(_enclosing ) { this._enclosing = _enclosing; this._assumeOutOfRangeBitsOn = assumeOutOfRangeBitsOn; this._maxInlinePages = (this.GetInlineDataEnd() - this.GetInlineDataStart()) * 8; int startPage = this._enclosing.GetTableBuffer().GetInt(this._enclosing.GetRowStart () + 1); this.SetInlinePageRange(startPage); this._enclosing.ProcessMap(this._enclosing.GetTableBuffer(), 0); }
public Handler(UsageMap _enclosing) { this._enclosing = _enclosing; }