ClikaRT::runtime::ModelState
class
Header: ClikaRT/runtime/state.h
Inherited by: ClikaRT::runtime::detail::FromGraphSessionState
Base for a model's per-session state. Subclass it to hold whatever a session needs across phases/steps; override as_batchable() if the state is batchable. The runtime owns the lifetime: Model::make_state returns one, the runtime threads it into Phase_RunOnce/Phase_Iterate, then calls Model::evict and destroys it.
Member functions
~ModelState()
virtual ~ModelState()
Virtual; state is deletable through the interface.
Declared in ClikaRT/runtime/state.h, line 28
as_batchable()
virtual BatchableState* as_batchable() noexcept
Return this (as a BatchableState) iff this state participates in continuous batching; the default is "not batchable" (nullptr). A batchable state overrides BOTH to return this.
Declared in ClikaRT/runtime/state.h, line 33
as_batchable()
virtual const BatchableState* as_batchable() const noexcept
Const twin of as_batchable(); nullptr when the state is not batchable.
Declared in ClikaRT/runtime/state.h, line 35