it.unibo.jakta.agents.fsm.impl.ActivityImpl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jakta-state-machine Show documentation
Show all versions of jakta-state-machine Show documentation
A Kotlin internal DSL for the definition of BDI agents
package it.unibo.jakta.agents.fsm.impl
import it.unibo.jakta.agents.fsm.Activity
import it.unibo.jakta.agents.fsm.Activity.Controller
internal data class ActivityImpl(
val onBeginProcedure: (controller: Controller) -> Unit = {},
val onStepProcedure: (controller: Controller) -> Unit = {},
val onEndProcedure: (controller: Controller) -> Unit = {},
) : Activity {
override fun onBegin(controller: Controller) = onBeginProcedure(controller)
override fun onStep(controller: Controller) = onStepProcedure(controller)
override fun onEnd(controller: Controller) = onEndProcedure(controller)
}