public virtual int CompareByLength(Db4objects.Db4o.Internal.Slots.Slot slot) { // FIXME: This is the wrong way around !!! // Fix here and in all referers. int res = slot.Length() - Length(); if (res != 0) { return(res); } return(slot._address - _address); }
public virtual Tree Free(LocalObjectContainer file, Tree treeRoot, Db4objects.Db4o.Internal.Slots.Slot slot) { file.Free(_slot.Address(), _slot.Length()); if (RemoveReferenceIsLast()) { if (treeRoot != null) { return(treeRoot.RemoveNode(this)); } } PointTo(slot); return(treeRoot); }
public override bool Equals(object obj) { if (obj == this) { return(true); } if (!(obj is Db4objects.Db4o.Internal.Slots.Slot)) { return(false); } Db4objects.Db4o.Internal.Slots.Slot other = (Db4objects.Db4o.Internal.Slots.Slot) obj; return((_address == other._address) && (Length() == other.Length())); }
public override void Write(ByteArrayBuffer buffer) { buffer.WriteInt(_key); buffer.WriteInt(_slot.Address()); buffer.WriteInt(_slot.Length()); }
public IdSlotMapping(int id, Db4objects.Db4o.Internal.Slots.Slot slot) : this(id, slot.Address(), slot.Length()) { }
public virtual Db4objects.Db4o.Internal.Slots.Slot Append(Db4objects.Db4o.Internal.Slots.Slot slot) { return(new Db4objects.Db4o.Internal.Slots.Slot(Address(), _length + slot.Length() )); }