public static packF8 ( byte arr, int offs, double val ) : void | ||
arr | byte | |
offs | int | |
val | double | |
리턴 | void |
internal void pack(Page pg, int i) { byte[] dst = pg.data; switch (key.type) { case ClassDescriptor.FieldType.tpBoolean: case ClassDescriptor.FieldType.tpSByte: case ClassDescriptor.FieldType.tpByte: dst[OldBtreePage.firstKeyOffs + i] = (byte)key.ival; break; case ClassDescriptor.FieldType.tpShort: case ClassDescriptor.FieldType.tpUShort: case ClassDescriptor.FieldType.tpChar: Bytes.pack2(dst, OldBtreePage.firstKeyOffs + i * 2, (short)key.ival); break; case ClassDescriptor.FieldType.tpInt: case ClassDescriptor.FieldType.tpUInt: case ClassDescriptor.FieldType.tpEnum: case ClassDescriptor.FieldType.tpObject: case ClassDescriptor.FieldType.tpOid: Bytes.pack4(dst, OldBtreePage.firstKeyOffs + i * 4, key.ival); break; case ClassDescriptor.FieldType.tpLong: case ClassDescriptor.FieldType.tpULong: case ClassDescriptor.FieldType.tpDate: Bytes.pack8(dst, OldBtreePage.firstKeyOffs + i * 8, key.lval); break; case ClassDescriptor.FieldType.tpFloat: Bytes.packF4(dst, OldBtreePage.firstKeyOffs + i * 4, (float)key.dval); break; case ClassDescriptor.FieldType.tpDouble: Bytes.packF8(dst, OldBtreePage.firstKeyOffs + i * 8, key.dval); break; case ClassDescriptor.FieldType.tpDecimal: Bytes.packDecimal(dst, OldBtreePage.firstKeyOffs + i * 16, key.dec); break; case ClassDescriptor.FieldType.tpGuid: Bytes.packGuid(dst, OldBtreePage.firstKeyOffs + i * 16, key.guid); break; default: Debug.Assert(false, "Invalid type"); break; } Bytes.pack4(dst, OldBtreePage.firstKeyOffs + (OldBtreePage.maxItems - i - 1) * 4, oid); }
public int packF8(int offs, double val) { extend(offs + 8); Bytes.packF8(arr, offs, val); return offs + 8; }