A multi-threaded system to parallelize updating components. More...
Public Member Functions | |
sealed override void | OnInit (Frame f) |
Initializes the system and call the virtual OnInitUser(Frame) method. More... | |
abstract void | Update (FrameThreadSafe f, EntityRef entity, T *component) |
Override to add workload. More... | |
Public Member Functions inherited from Quantum.SystemBase | |
SystemBase () | |
Constructor. More... | |
SystemBase (string scheduleSample) | |
Create a new instance and setting the sample name. More... | |
virtual void | OnDisabled (Frame f) |
Is called when the system was disabled for example after Frame.SystemDisable(Type). More... | |
virtual void | OnEnabled (Frame f) |
Is called when the system was enabled for example after calling Frame.SystemEnable<T>() or during QuantumGame.InitSystems(Photon.Deterministic.DeterministicFrame). More... | |
TaskHandle | OnSchedule (Frame f, TaskHandle taskHandle) |
Creates the task graph for the system. More... | |
Public Attributes | |
virtual int | SlicesCount => MAX_SLICES_COUNT / 2 |
Override to specify the number of slices to use. More... | |
Protected Member Functions | |
virtual void | OnInitUser (Frame f) |
Override to initialize a custom system. More... | |
override TaskHandle | Schedule (Frame f, TaskHandle taskHandle) |
Override to schedule extra tasks. More... | |
Additional Inherited Members | |
Properties inherited from Quantum.SystemBase | |
virtual IEnumerable< SystemBase > | ChildSystems [get] |
The enumerable child systems. More... | |
IEnumerable< SystemBase > | Hierarchy [get] |
Creates the complete sub graph of child systems. More... | |
SystemBase | ParentSystem [get] |
The parent system in the system hierarchy. More... | |
Int32 | RuntimeIndex [get, set] |
A unique index assigned to identify systems at runtime. More... | |
virtual Boolean | StartEnabled [get, set] |
Set to true when the simulation should start with this system enabled. More... | |
A multi-threaded system to parallelize updating components.
Only access to the component itself and FrameThreadSafe is safe.
Array task: similar to SystemThreadedComponent<T>, but, instead of slicing the component buffer in N slices of a fixed size each, the buffer is sliced in a fixed number of slices and the size of the slice depends on the size of the buffer, which must be known in Schedule time.
For more information request access to the online multi-threading documentation.
T | Component type to update. |
T | : | unmanaged | |
T | : | IComponent |
|
inlinevirtual |
Initializes the system and call the virtual OnInitUser(Frame) method.
f | The referenced frame. |
Reimplemented from Quantum.SystemBase.
|
inlineprotectedvirtual |
Override to initialize a custom system.
f | The referenced frame. |
|
inlineprotectedvirtual |
Override to schedule extra tasks.
f | The referenced frame. |
taskHandle | The initial task handle. |
Implements Quantum.SystemBase.
|
pure virtual |
Override to add workload.
Only access to the component itself and FrameThreadSafe is safe.
f | The thread-safe referenced frame. |
entity | The entity that the component belongs to, only read access is safe. |
component | The component to update. |
virtual int Quantum.Task.SystemArrayComponent< T >.SlicesCount => MAX_SLICES_COUNT / 2 |
Override to specify the number of slices to use.