コード例 #1
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);
        }
コード例 #2
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);
 }
コード例 #3
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()));
 }
コード例 #4
0
 public override void Write(ByteArrayBuffer buffer)
 {
     buffer.WriteInt(_key);
     buffer.WriteInt(_slot.Address());
     buffer.WriteInt(_slot.Length());
 }
コード例 #5
0
 public IdSlotMapping(int id, Db4objects.Db4o.Internal.Slots.Slot slot) : this(id,
                                                                               slot.Address(), slot.Length())
 {
 }
コード例 #6
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()
                                                    ));
 }