ObjectIdSimpleBuilder Struct
Namespace: Stride.Core.StorageAssembly: Stride.Core.dll
An optimized version of ObjectIdBuilder to output a ObjectId expecting data to hash be 32bits integers only. See remarks.
public struct ObjectIdSimpleBuilder
Remarks
This implementation is suited when it can be feeded with 32bits values. The resulting value must be identical to ObjectIdBuilder if the length size of the data is a multiple of 16 bytes.
Name | Description | |
---|---|---|
Constructors | ||
ObjectIdSimpleBuilder(UInt32) | ||
Properties | ||
Length | ||
Seed | ||
Methods | ||
ComputeHash() | Gets the current calculated hash. |
|
ComputeHash(out ObjectId) | Gets the current calculated hash. |
|
Reset() | ||
Write(Int32) | ||
Write(UInt32) | ||
Write<T>(T) | Writes the specified data to this builder. Size of data must be multiple of 4 bytes. |
Constructors
ObjectIdSimpleBuilder(UInt32)
public ObjectIdSimpleBuilder(uint seed = 0U)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | seed |
Properties
Length
public readonly uint Length { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Seed
public readonly uint Seed { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
ComputeHash()
Gets the current calculated hash.
public ObjectId ComputeHash()
Returns
Type | Description |
---|---|
ObjectId | The current hash. |
ComputeHash(out ObjectId)
Gets the current calculated hash.
public void ComputeHash(out ObjectId result)
Parameters
Type | Name | Description |
---|---|---|
ObjectId | result |
Reset()
public void Reset()
Write(Int32)
public void Write(int data)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | data |
Write(UInt32)
public void Write(uint data)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | data |
Write<T>(T)
Writes the specified data to this builder. Size of data must be multiple of 4 bytes.
public void Write<T>(T data)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T | data | The data to add to this builder |
Type Parameters
Name | Description |
---|---|
T | Struct type with a size multiple of 4 bytes |
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()