private bool IsOverlap(SlotDetail prevSlot, SlotDetail curSlot) { if (prevSlot == null) { return false; } return prevSlot._slot.Address() + this._enclosing._blockConverter.BytesToBlocks(prevSlot ._slot.Length()) > curSlot._slot.Address(); }
public virtual void Add(SlotDetail slot) { if (TreeIntObject.Find(_slots, new TreeIntObject(slot._slot.Address())) != null) { _dupes.Add(new Pair(ByAddress(slot._slot.Address()), slot)); } _slots = (TreeIntObject)((TreeIntObject)TreeIntObject.Add(_slots, new TreeIntObject (slot._slot.Address(), slot))); }
private bool IsOverlap(SlotDetail prevSlot, SlotDetail curSlot) { if (prevSlot == null) { return(false); } return(prevSlot._slot.Address() + _enclosing._blockConverter.BytesToBlocks(prevSlot ._slot.Length()) > curSlot._slot.Address()); }
public virtual void Add(SlotDetail slot) { if (Tree.Find(_slots, new TreeIntObject(slot._slot.Address())) != null) { _dupes.Add(new Pair(ByAddress(slot._slot.Address()), slot)); } _slots = (TreeIntObject)Tree.Add(_slots, new TreeIntObject (slot._slot.Address(), slot)); }
public void Visit(object tree) { SlotDetail curSlot = (SlotDetail)((TreeIntObject)tree)._object; if (this.IsOverlap(((SlotDetail)prevSlot.value), curSlot)) { overlaps.Add(new Pair(((SlotDetail)prevSlot.value), curSlot)); } prevSlot.value = curSlot; }
public void Apply(object idSlot) { int id = (((int)((Pair)idSlot).first)); Slot slot = ((Slot)((Pair)idSlot).second); SlotDetail detail = id > 0 ? (SlotDetail) new IdObjectSlotDetail(id, slot) : (SlotDetail ) new RawObjectSlotDetail(slot); if (this._enclosing.IsBogusSlot(((Slot)((Pair)idSlot).second).Address(), ((Slot)( (Pair)idSlot).second).Length())) { this._enclosing._bogusSlots.Add(detail); } this._enclosing._overlaps.Add(detail); }