// _key, _slot._address, _slot._length public override object Read(ByteArrayBuffer buffer) { int id = buffer.ReadInt(); Db4objects.Db4o.Internal.Slots.Slot slot = new Db4objects.Db4o.Internal.Slots.Slot (buffer.ReadInt(), buffer.ReadInt()); return new Db4objects.Db4o.Internal.Ids.IdSlotTree(id, slot); }
// _key, _slot._address, _slot._length public override object Read(ByteArrayBuffer buffer) { int id = buffer.ReadInt(); Db4objects.Db4o.Internal.Slots.Slot slot = new Db4objects.Db4o.Internal.Slots.Slot (buffer.ReadInt(), buffer.ReadInt()); return(new Db4objects.Db4o.Internal.Ids.IdSlotTree(id, slot)); }
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 IdSlotTree(int id, Db4objects.Db4o.Internal.Slots.Slot slot) : base(id) { _slot = slot; }
public IdSlotMapping(int id, Db4objects.Db4o.Internal.Slots.Slot slot) : this(id, slot.Address(), slot.Length()) { }
public IdSlotTree(int id, Db4objects.Db4o.Internal.Slots.Slot slot) : base(id) { _slot = slot; }
public virtual void PointTo(Db4objects.Db4o.Internal.Slots.Slot slot) { _slot = slot; }
public virtual void PointTo(Db4objects.Db4o.Internal.Slots.Slot slot) { _slot = slot; }
public static bool IsNull(Db4objects.Db4o.Internal.Slots.Slot slot) { return(slot == null || slot.IsNull()); }
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() )); }
public virtual bool IsDirectlyPreceding(Db4objects.Db4o.Internal.Slots.Slot other ) { return(_address + Length() == other._address); }