Photon Quantum 3.0.0

Public Member Functions | List of all members
Quantum.ByteSerializerHashMapper< T > Class Template Reference

Maps value hashes to an indexed collection of previous values. Can be used in combination with a ByteStream to avoid serializing the same value multiple times. More...

Public Member Functions

 ByteSerializerHashMapper (Int32 capacity)
 Constructor. More...
 
void Clear ()
 Clears internal structures. Must be done once before serializing or de-serializing a sequence of values. More...
 

Detailed Description

Maps value hashes to an indexed collection of previous values. Can be used in combination with a ByteStream to avoid serializing the same value multiple times.

Template Parameters
TThe type of the value to be serialized/hashed. Must have a deterministic ValueType.GetHashCode implementation. Ideally should also override ValueType.GetHashCode in order to avoid boxing allocations.
Type Constraints
T :struct 
T :IByteStreamSerializable 

Constructor & Destructor Documentation

◆ ByteSerializerHashMapper()

Constructor.

Parameters
capacityDefault value capacity.

Member Function Documentation

◆ Clear()

void Quantum.ByteSerializerHashMapper< T >.Clear ( )
inline

Clears internal structures. Must be done once before serializing or de-serializing a sequence of values.