Class SystemBase

Inheritance Relationships

Derived Types

  • public portal::ecs::System< BaseCameraSystem, ecs::Owns< BaseCameraController >, ecs::Views< CameraComponent >, ecs::Views< TransformComponent > > (Template Class System)

  • public portal::ecs::System< BasePlayerInputSystem, ecs::Owns< InputComponent >, ecs::Views< BaseCameraController >, ecs::Views< PlayerTag > > (Template Class System)

  • public portal::ecs::System< SceneRenderingSystem, ecs::Owns< StaticMeshComponent >, ecs::Views< TransformComponent > > (Template Class System)

  • public portal::ecs::System< TransformHierarchySystem, ecs::Owns< TransformDirtyTag >, ecs::Owns< TransformComponent >, ecs::Views< RelationshipComponent > > (Template Class System)

  • public portal::ecs::System< Derived, Components > (Template Class System)

Class Documentation

class SystemBase

Base class for all ECS systems.

Provides execution policy management that derived systems inherit. The policy determines whether execute() runs sequentially or is dispatched as a job.

See also

System for the CRTP-based system template

See also

ExecutionPolicy for policy options

Subclassed by portal::ecs::System< BaseCameraSystem, ecs::Owns< BaseCameraController >, ecs::Views< CameraComponent >, ecs::Views< TransformComponent > >, portal::ecs::System< BasePlayerInputSystem, ecs::Owns< InputComponent >, ecs::Views< BaseCameraController >, ecs::Views< PlayerTag > >, portal::ecs::System< SceneRenderingSystem, ecs::Owns< StaticMeshComponent >, ecs::Views< TransformComponent > >, portal::ecs::System< TransformHierarchySystem, ecs::Owns< TransformDirtyTag >, ecs::Owns< TransformComponent >, ecs::Views< RelationshipComponent > >, portal::ecs::System< Derived, Components >

Public Functions

inline explicit SystemBase(const ExecutionPolicy policy = ExecutionPolicy::Sequential)

Constructs a system base with the specified execution policy.

Parameters:

policy – The execution policy. Defaults to Sequential.

virtual ~SystemBase() = default
inline void set_policy(const ExecutionPolicy new_policy)

Changes the system’s execution policy at runtime.

Example:
my_system.set_policy(ExecutionPolicy::Parallel);

Parameters:

new_policy – The new execution policy

inline ExecutionPolicy get_policy() const

Returns the current execution policy.

Returns:

The execution policy

Protected Attributes

ExecutionPolicy policy