datatypes.fsm: cleanup notices for fsm.v

This commit is contained in:
Delyan Angelov 2023-12-20 17:51:51 +02:00
parent 94d288197e
commit 5306469712
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED

View file

@ -4,17 +4,24 @@ pub type EventHandlerFn = fn (receiver voidptr, from string, to string)
pub type ConditionFn = fn (receiver voidptr, from string, to string) bool
fn dummy_event_handler_fn(receiver voidptr, from string, to string) {
}
fn dummy_condition_fn(receiver voidptr, from string, to string) bool {
return true
}
struct State {
mut:
entry_handler EventHandlerFn
run_handler EventHandlerFn
exit_handler EventHandlerFn
entry_handler EventHandlerFn = dummy_event_handler_fn
run_handler EventHandlerFn = dummy_event_handler_fn
exit_handler EventHandlerFn = dummy_event_handler_fn
}
struct Transition {
mut:
to string
condition_handler ConditionFn = unsafe { nil }
condition_handler ConditionFn = dummy_condition_fn
}
pub struct StateMachine {