ProcessingData

data class ProcessingData<Primary : Any, C : KlerkContext, V>(val primaryModel: ModelID<Primary>? = null, val currentModel: ModelID<out Any>? = null, val actions: List<GeneralAction> = emptyList(), val createdModels: List<ModelID<out Any>> = emptyList(), val updatedModels: List<ModelID<out Any>> = emptyList(), val transitions: List<ModelID<out Any>> = emptyList(), val deletedModels: List<ModelID<out Any>> = emptyList(), val unFinalizedTransition: Triple<String, Instant, Model<out Any>>? = null, val aggregatedModelState: Map<ModelID<out Any>, Model<out Any>> = emptyMap(), val newJobs: List<Job<C, V>> = emptyList(), val remainingBlocks: List<Block<*, *, C, V>> = emptyList(), val currentBlock: Block<*, *, C, V>? = null, val processedBlocks: List<Block<*, *, C, V>> = emptyList(), val remainingCommands: List<Command<out Any, out Any?>> = emptyList(), val currentCommand: Command<out Any, out Any?>? = null, val processedCommands: List<Command<out Any, out Any?>> = emptyList(), val log: List<String> = emptyList(), val functionsToUpdateViews: List<() -> Unit> = emptyList(), val problems: List<Problem> = emptyList(), val timeTriggers: Map<ModelID<out Any>, Instant?> = emptyMap(), val remainingTimeTrigger: Model<out Any>? = null)

TODO: make sure this documentation is correct

Note that lists are used when ordering matters and maps are used for models as it is possible that a model is updated/transitioned more than once for the same command.

Constructors

Link copied to clipboard
constructor(primaryModel: ModelID<Primary>? = null, currentModel: ModelID<out Any>? = null, actions: List<GeneralAction> = emptyList(), createdModels: List<ModelID<out Any>> = emptyList(), updatedModels: List<ModelID<out Any>> = emptyList(), transitions: List<ModelID<out Any>> = emptyList(), deletedModels: List<ModelID<out Any>> = emptyList(), unFinalizedTransition: Triple<String, Instant, Model<out Any>>? = null, aggregatedModelState: Map<ModelID<out Any>, Model<out Any>> = emptyMap(), newJobs: List<Job<C, V>> = emptyList(), remainingBlocks: List<Block<*, *, C, V>> = emptyList(), currentBlock: Block<*, *, C, V>? = null, processedBlocks: List<Block<*, *, C, V>> = emptyList(), remainingCommands: List<Command<out Any, out Any?>> = emptyList(), currentCommand: Command<out Any, out Any?>? = null, processedCommands: List<Command<out Any, out Any?>> = emptyList(), log: List<String> = emptyList(), functionsToUpdateViews: List<() -> Unit> = emptyList(), problems: List<Problem> = emptyList(), timeTriggers: Map<ModelID<out Any>, Instant?> = emptyMap(), remainingTimeTrigger: Model<out Any>? = null)

Properties

Link copied to clipboard
Link copied to clipboard

the models as they are after the last block was executed

Link copied to clipboard

models that were created. Note that they may have been modified after creation, which means that the model in this map may NOT be the final outcome for this model. See modifiedModels instead.

Link copied to clipboard
val currentBlock: Block<*, *, C, V>? = null
Link copied to clipboard
val currentCommand: Command<out Any, out Any?>? = null
Link copied to clipboard
val currentModel: ModelID<out Any>? = null

is the model that was created or manipulated by the current command. Will be the same as primary unless the current command is a sub-command.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val newJobs: List<Job<C, V>>
Link copied to clipboard

is the model that was created or manipulated by the primary command (i.e. the command that the user initiated).

Link copied to clipboard
Link copied to clipboard
val processedBlocks: List<Block<*, *, C, V>>
Link copied to clipboard
Link copied to clipboard
val remainingBlocks: List<Block<*, *, C, V>>
Link copied to clipboard
Link copied to clipboard
val remainingTimeTrigger: Model<out Any>? = null
Link copied to clipboard
val timeTriggers: Map<ModelID<out Any>, Instant?>
Link copied to clipboard

models that changed state. Note that they may have been modified after the transition, which means that the model in this map may NOT be the final outcome for this model. See modifiedModels instead.

Link copied to clipboard
val unFinalizedTransition: Triple<String, Instant, Model<out Any>>? = null
Link copied to clipboard

models that were updated. Note that they may have been modified after the update, which means that the model in this map may NOT be the final outcome for this model. See modifiedModels instead.

Functions

Link copied to clipboard
open override fun toString(): String