BaseManager

model.managers.BaseManager
trait BaseManager[A]

Base trait for all managers in the simulation.

Defines a fundamental contract for components that update a "slice" of the simulation state. Managers are designed to be functional, taking an input state and returning a new, updated state, promoting immutability.

Type parameters

A

The type of the state slice that this manager operates on.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def update(slice: A): A

Updates a given slice of the simulation state.

Updates a given slice of the simulation state.

This method encapsulates the core logic of the manager, transforming an input state into an updated state.

Value parameters

slice

The input state slice to be updated.

Attributes

Returns

The updated state slice.

Concrete methods

def |(second: BaseManager[A]): BaseManager[A]
Extension method from model.managers

Chains two BaseManager instances together. The output of the first manager becomes the input of the second manager.

Chains two BaseManager instances together. The output of the first manager becomes the input of the second manager.

Value parameters

second

The second BaseManager in the chain.

Attributes

Returns

A new BaseManager that represents the sequential application of first then second.