Photon Fusion
2.1.1
A buffer for instances of SimulationInput. More...
Public Member Functions | |
| bool | Add (SimulationInput input, double? timeInserted=null) |
| Adds input to the buffer. | |
| Buffer (int capacity) | |
| Creates a new Buffer. | |
| void | Clear () |
| Removes all inputs from the buffer. | |
| bool | Contains (Tick tick) |
Returns true if the buffer has an input for the provided tick . | |
| int | CopySortedTo (SimulationInput[] array) |
| Copies the buffer to an array and sorts it. | |
| SimulationInput | Get (Tick tick) |
| Returns the input for the provided tick . | |
| SimulationInputHeader | GetLastUsedInputHeader () |
| Returns the most recently removed input header. | |
| bool | Remove (Tick tick, out SimulationInput removed) |
Returns true if the buffer had an input for the provided tick (and outputs the removed input). | |
| bool | Remove (Tick tick, out SimulationInput removed, out double? timeInserted) |
Returns true if the buffer had an input for the provided tick (and outputs the removed input and its insertion time). | |
| bool | TryGet (Tick tick, out SimulationInput input) |
Returns true if the buffer has an input for the provided tick (and outputs the input ). | |
| bool | TryGet (Tick tick, out SimulationInput input, out double? timeInserted) |
Returns true if the buffer has an input for the provided tick (and outputs the input and its insertion time). | |
A buffer for instances of SimulationInput.
| Buffer | ( | int | capacity | ) |
Creates a new Buffer.
| capacity | The maximum number of inputs that the buffer can contain. |
| bool Add | ( | SimulationInput | input, |
| double? | timeInserted = null ) |
Adds input to the buffer.
| input | |
| timeInserted |
| bool Contains | ( | Tick | tick | ) |
Returns true if the buffer has an input for the provided tick .
| tick |
| int CopySortedTo | ( | SimulationInput[] | array | ) |
Copies the buffer to an array and sorts it.
| array | Array to copy to. |
| SimulationInput Get | ( | Tick | tick | ) |
Returns the input for the provided tick .
| tick |
| SimulationInputHeader GetLastUsedInputHeader | ( | ) |
Returns the most recently removed input header.
| bool Remove | ( | Tick | tick, |
| out SimulationInput | removed ) |
Returns true if the buffer had an input for the provided tick (and outputs the removed input).
| tick | |
| removed |
| bool Remove | ( | Tick | tick, |
| out SimulationInput | removed, | ||
| out double? | timeInserted ) |
Returns true if the buffer had an input for the provided tick (and outputs the removed input and its insertion time).
| tick | |
| removed | |
| timeInserted |
| bool TryGet | ( | Tick | tick, |
| out SimulationInput | input ) |
Returns true if the buffer has an input for the provided tick (and outputs the input ).
| tick | |
| input |
| bool TryGet | ( | Tick | tick, |
| out SimulationInput | input, | ||
| out double? | timeInserted ) |
Returns true if the buffer has an input for the provided tick (and outputs the input and its insertion time).
| tick | |
| input | |
| timeInserted |