public unsafe node(long cell_id, AccessorBuffer buffer) { byte[] cellContent = buffer.Buffer; fixed(byte *ptr = cellContent) { using (var accessor = new node_Accessor(ptr)) { this.name = accessor.name; this.friends = accessor.friends; } CellID = cell_id; } }
public unsafe SSSPCell(long cell_id, AccessorBuffer buffer) { byte[] cellContent = buffer.Buffer; fixed(byte *ptr = cellContent) { using (var accessor = new SSSPCell_Accessor(ptr)) { this.distance = accessor.distance; this.parent = accessor.parent; this.neighbors = accessor.neighbors; } CellID = cell_id; } }
public unsafe node(AccessorBuffer buffer) { byte[] cellContent = buffer.Buffer; fixed(byte *ptr = cellContent) { using (var accessor = new node_Accessor(ptr)) { this.name = accessor.name; this.friends = accessor.friends; } CellID = CellIDFactory.NewCellID(); } }