Photon Quantum 3.0.0

Public Member Functions | Public Attributes | List of all members
Quantum.BitStreamReplayInputProvider Class Reference

This implementation of IDeterministicStreamReplayInputProvider is used to provide delta compressed input for a Quantum simulation replay from a BitStream. More...

Inheritance diagram for Quantum.BitStreamReplayInputProvider:
Photon.Deterministic.IDeterministicStreamReplayInputProvider Photon.Deterministic.IDeterministicReplayProvider Photon.Deterministic.IDeterministicRpcProvider Photon.Deterministic.IDeterministicInputProvider

Public Member Functions

 BitStreamReplayInputProvider (BitStream inputStream, int maxFrame)
 Create input provider. More...
 
void AddRpc (int player, byte[] data, bool command)
 Unused. More...
 
int BeginReadFrame (int frame)
 Read the size of the input from the stream. It is expected that the input requested matches the input order in the stream. More...
 
bool CanSimulate (int frame)
 Returns true if for the given frame input is available. More...
 
void CompleteReadFrame (int frame, int length, ref byte[] data)
 Actually read the input data. More...
 
DeterministicFrameInputTemp GetInput (int frame, int player)
 Unused. More...
 
QTuple< byte[], bool > GetRpc (int frame, int player)
 Unused. More...
 
void Reset ()
 Reset the stream to the beginning. More...
 

Public Attributes

int MaxFrame => _maxFrame
 The max frame available to read. More...
 

Additional Inherited Members

- Properties inherited from Photon.Deterministic.IDeterministicStreamReplayInputProvider
int MaxFrame [get]
 The maximum frame number that the input provider can provide at a given moment. More...
 

Detailed Description

This implementation of IDeterministicStreamReplayInputProvider is used to provide delta compressed input for a Quantum simulation replay from a BitStream.

Constructor & Destructor Documentation

◆ BitStreamReplayInputProvider()

Quantum.BitStreamReplayInputProvider.BitStreamReplayInputProvider ( BitStream  inputStream,
int  maxFrame 
)
inline

Create input provider.

Parameters
inputStreamThe input bitstream
maxFrameThe max frame of the recorded replay

Member Function Documentation

◆ Reset()

void Quantum.BitStreamReplayInputProvider.Reset ( )
inline

Reset the stream to the beginning.

Implements Photon.Deterministic.IDeterministicStreamReplayInputProvider.

◆ CanSimulate()

bool Quantum.BitStreamReplayInputProvider.CanSimulate ( int  frame)
inline

Returns true if for the given frame input is available.

Parameters
frameRequested frame
Returns
True if input for that frame can be requested

Implements Photon.Deterministic.IDeterministicInputProvider.

◆ BeginReadFrame()

int Quantum.BitStreamReplayInputProvider.BeginReadFrame ( int  frame)
inline

Read the size of the input from the stream. It is expected that the input requested matches the input order in the stream.

Parameters
frameInput requested for this frame
Returns
The size of the input that can be read

Implements Photon.Deterministic.IDeterministicStreamReplayInputProvider.

◆ CompleteReadFrame()

void Quantum.BitStreamReplayInputProvider.CompleteReadFrame ( int  frame,
int  length,
ref byte[]  data 
)
inline

Actually read the input data.

Parameters
frameThe frame of the requested input
lengthThe input length returned by BeginReadFrame(int)
dataThe data to be copied to

Implements Photon.Deterministic.IDeterministicStreamReplayInputProvider.

◆ GetInput()

DeterministicFrameInputTemp Quantum.BitStreamReplayInputProvider.GetInput ( int  frame,
int  player 
)
inline

◆ AddRpc()

void Quantum.BitStreamReplayInputProvider.AddRpc ( int  player,
byte[]  data,
bool  command 
)
inline

◆ GetRpc()

QTuple<byte[], bool> Quantum.BitStreamReplayInputProvider.GetRpc ( int  frame,
int  player 
)
inline

Member Data Documentation

◆ MaxFrame

int Quantum.BitStreamReplayInputProvider.MaxFrame => _maxFrame

The max frame available to read.