Table of Contents

Struct ObjectIdSimpleBuilder

Namespace
Stride.Core.Storage
Assembly
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
Inherited Members

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.

Constructors

ObjectIdSimpleBuilder(uint)

public ObjectIdSimpleBuilder(uint seed = 0)

Parameters

seed uint

Properties

Length

public uint Length { get; }

Property Value

uint

Seed

public uint Seed { get; }

Property Value

uint

Methods

ComputeHash()

Gets the current calculated hash.

public ObjectId ComputeHash()

Returns

ObjectId

The current hash.

ComputeHash(out ObjectId)

Gets the current calculated hash.

public void ComputeHash(out ObjectId result)

Parameters

result ObjectId

Reset()

public void Reset()

Write(int)

public void Write(int data)

Parameters

data int

Write(uint)

public void Write(uint data)

Parameters

data uint

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

data T

The data to add to this builder

Type Parameters

T

Struct type with a size multiple of 4 bytes