Пример #1
0
		// _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);
		}
Пример #2
0
        // _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));
        }
Пример #3
0
        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);
        }
Пример #4
0
 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);
 }
Пример #5
0
 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()));
 }
Пример #6
0
 public IdSlotTree(int id, Db4objects.Db4o.Internal.Slots.Slot slot) : base(id)
 {
     _slot = slot;
 }
Пример #7
0
 public IdSlotMapping(int id, Db4objects.Db4o.Internal.Slots.Slot slot) : this(id,
                                                                               slot.Address(), slot.Length())
 {
 }
Пример #8
0
		public IdSlotTree(int id, Db4objects.Db4o.Internal.Slots.Slot slot) : base(id)
		{
			_slot = slot;
		}
Пример #9
0
 public virtual void PointTo(Db4objects.Db4o.Internal.Slots.Slot slot)
 {
     _slot = slot;
 }
Пример #10
0
		public virtual void PointTo(Db4objects.Db4o.Internal.Slots.Slot slot)
		{
			_slot = slot;
		}
Пример #11
0
 public static bool IsNull(Db4objects.Db4o.Internal.Slots.Slot slot)
 {
     return(slot == null || slot.IsNull());
 }
Пример #12
0
 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()
                                                    ));
 }
Пример #13
0
 public virtual bool IsDirectlyPreceding(Db4objects.Db4o.Internal.Slots.Slot other
                                         )
 {
     return(_address + Length() == other._address);
 }