// do nothing public virtual int NewId() { int id = _idGenerator.NewId(); _ids = ((IdSlotTree)Tree.Add(_ids, new IdSlotTree(id, Slot.Zero))); return(id); }
public virtual Slot CommittedSlot(int id) { IdSlotTree idSlotMapping = (IdSlotTree)Tree.Find(_ids, new TreeInt(id)); if (idSlotMapping == null) { throw new InvalidIDException(id); } return(idSlotMapping.Slot()); }
private int EstimatedSlotLength(int estimatedCount) { IdSlotTree template = _ids; if (template == null) { template = new IdSlotTree(0, new Slot(0, 0)); } return(template.MarshalledLength(estimatedCount) + _idGenerator.MarshalledLength( ) + Const4.IdLength); }
private void ReadThis() { SystemData systemData = _container.SystemData(); _slot = systemData.IdSystemSlot(); if (!Slot.IsNull(_slot)) { ByteArrayBuffer buffer = _container.ReadBufferBySlot(_slot); _childId = buffer.ReadInt(); _idGenerator.Read(buffer); _ids = (IdSlotTree)new TreeReader(buffer, new IdSlotTree(0, null)).Read(); } }
private void ReadThis() { SystemData systemData = _container.SystemData(); _slot = systemData.IdSystemSlot(); if (!Slot.IsNull(_slot)) { ByteArrayBuffer buffer = _container.ReadBufferBySlot(_slot); _childId = buffer.ReadInt(); _idGenerator.Read(buffer); _ids = (IdSlotTree) new TreeReader(buffer, new IdSlotTree(0, null)).Read(); } }
public override void MapId(int id, Slot slot) { IdSlotTree idSlotMapping = new IdSlotTree(id, slot); _idsToSlots = ((IdSlotTree)Tree.Add(_idsToSlots, idSlotMapping)); }
// do nothing public virtual int NewId() { int id = _idGenerator.NewId(); _ids = ((IdSlotTree)Tree.Add(_ids, new IdSlotTree(id, Slot.Zero))); return id; }
private int EstimatedSlotLength(int estimatedCount) { IdSlotTree template = _ids; if (template == null) { template = new IdSlotTree(0, new Slot(0, 0)); } return template.MarshalledLength(estimatedCount) + _idGenerator.MarshalledLength( ) + Const4.IdLength; }