Photon Quantum 3.0.0

Public Member Functions | Public Attributes | List of all members
Photon.Deterministic.DeterministicCommand Class Referenceabstract

The base class for deterministic commands. Always override Serialize(BitStream) to add additional data. More...

Inheritance diagram for Photon.Deterministic.DeterministicCommand:
Photon.Deterministic.IDeterministicCommandFactory Quantum.Core.CompoundCommand

Public Member Functions

 DeterministicCommand ()
 Empty constructor. More...
 
virtual void Dispose ()
 Disposing commands is done internally and does not need to be called manually. The method is public because of the IDisposable interface and to be able to derive it. More...
 
virtual DeterministicCommand GetCommandInstance ()
 The object can be used as a IDeterministicCommandFactory and it will try to creates an instance of the command using the pool, otherwise it will use reflection. More...
 
abstract void Serialize (BitStream stream)
 Override this method to add additional data to the command. More...
 
virtual void Serialize (BitStream stream, DeterministicCommandSerializer cmdSerializer)
 Serialized the command to and from the bitstream. Use the Serialize(BitStream) method to add custom data. More...
 

Public Attributes

Type CommandType => GetType()
 Returns the type of the concrete command class. More...
 
IDeterministicCommandPool Pool
 The command pool that the object is returned to during Dispose. More...
 

Additional Inherited Members

- Properties inherited from Photon.Deterministic.IDeterministicCommandFactory
Type CommandType [get]
 The type of commands to create. More...
 

Detailed Description

The base class for deterministic commands. Always override Serialize(BitStream) to add additional data.

Constructor & Destructor Documentation

◆ DeterministicCommand()

Photon.Deterministic.DeterministicCommand.DeterministicCommand ( )
inline

Empty constructor.

Member Function Documentation

◆ Serialize() [1/2]

virtual void Photon.Deterministic.DeterministicCommand.Serialize ( BitStream  stream,
DeterministicCommandSerializer  cmdSerializer 
)
inlinevirtual

Serialized the command to and from the bitstream. Use the Serialize(BitStream) method to add custom data.

Parameters
streamStream
cmdSerializerSerializer

Reimplemented in Quantum.Core.CompoundCommand.

◆ Serialize() [2/2]

abstract void Photon.Deterministic.DeterministicCommand.Serialize ( BitStream  stream)
pure virtual

Override this method to add additional data to the command.

Parameters
streamStream to write and read from

Implemented in Quantum.Core.CompoundCommand.

◆ GetCommandInstance()

virtual DeterministicCommand Photon.Deterministic.DeterministicCommand.GetCommandInstance ( )
inlinevirtual

The object can be used as a IDeterministicCommandFactory and it will try to creates an instance of the command using the pool, otherwise it will use reflection.

Returns

Implements Photon.Deterministic.IDeterministicCommandFactory.

◆ Dispose()

virtual void Photon.Deterministic.DeterministicCommand.Dispose ( )
inlinevirtual

Disposing commands is done internally and does not need to be called manually. The method is public because of the IDisposable interface and to be able to derive it.

Reimplemented in Quantum.Core.CompoundCommand.

Member Data Documentation

◆ Pool

IDeterministicCommandPool Photon.Deterministic.DeterministicCommand.Pool

The command pool that the object is returned to during Dispose.

◆ CommandType

Type Photon.Deterministic.DeterministicCommand.CommandType => GetType()

Returns the type of the concrete command class.