Photon Quantum 3.0.0

Public Member Functions | Public Attributes | List of all members
Photon.Deterministic.DeterministicCommandSerializer Class Reference

The DeterministicCommandSerializer is used to serialize and de-serialize DeterministicCommands. More...

Public Member Functions

 DeterministicCommandSerializer ()
 Constructor. More...
 
Boolean PackNext (BitStream s, DeterministicCommand cmd)
 Packing a command into a bitstream. More...
 
Boolean ReadNext (BitStream s, out DeterministicCommand cmd)
 Read commands from the bitstream. More...
 
void RegisterFactories (params IDeterministicCommandFactory[] factories)
 Register a list of command factories. More...
 
void RegisterFactory (IDeterministicCommandFactory factory)
 Register one command factory. More...
 

Public Attributes

BitStream CommandSerializerStreamRead
 The reusable read stream. More...
 
BitStream CommandSerializerStreamWrite
 The reuseable write stream. More...
 

Detailed Description

The DeterministicCommandSerializer is used to serialize and de-serialize DeterministicCommands.

Constructor & Destructor Documentation

◆ DeterministicCommandSerializer()

Photon.Deterministic.DeterministicCommandSerializer.DeterministicCommandSerializer ( )
inline

Constructor.

Member Function Documentation

◆ RegisterFactory()

void Photon.Deterministic.DeterministicCommandSerializer.RegisterFactory ( IDeterministicCommandFactory  factory)
inline

Register one command factory.

Parameters
factoryFactory instance

◆ RegisterFactories()

void Photon.Deterministic.DeterministicCommandSerializer.RegisterFactories ( params IDeterministicCommandFactory[]  factories)
inline

Register a list of command factories.

Parameters
factoriesFactory params

◆ PackNext()

Boolean Photon.Deterministic.DeterministicCommandSerializer.PackNext ( BitStream  s,
DeterministicCommand  cmd 
)
inline

Packing a command into a bitstream.

Parameters
sStream
cmdCommand object
Returns
true if successfully written the command into the stream

◆ ReadNext()

Boolean Photon.Deterministic.DeterministicCommandSerializer.ReadNext ( BitStream  s,
out DeterministicCommand  cmd 
)
inline

Read commands from the bitstream.

Parameters
sStream
cmdCommand that was read from the stream.
Returns
true when a command has successfully been read form the stream.

Member Data Documentation

◆ CommandSerializerStreamRead

BitStream Photon.Deterministic.DeterministicCommandSerializer.CommandSerializerStreamRead

The reusable read stream.

◆ CommandSerializerStreamWrite

BitStream Photon.Deterministic.DeterministicCommandSerializer.CommandSerializerStreamWrite

The reuseable write stream.