-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathclass-diagram.yuml
24 lines (24 loc) · 1.32 KB
/
class-diagram.yuml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// composable_state_machine class diagram
[≺≺interface≻≻;ICallbackRunner||run_state_machine_callback(callback){bg:green}]
[≺≺interface≻≻;ICallable||call(*)]
[≺≺interface≻≻;IMachine||trigger(event);==(other_state){bg:orange}]
[Machine|state|{bg:orange}]
[Model|initial_state|transition(event...);run_callbacks();run_callbacks_for(){bg:red}]
[Transitions||on(event...);transition(event...){bg:blue}]
[Behaviors||on(behavior...){bg:green}]
[Callbacks||on(trigger...){bg:green}]
[≺≺interface≻≻;ICallable]^-.-[Behaviors]
[≺≺interface≻≻;ICallable]^-.-[Callbacks]
[≺≺interface≻≻;ICallbackRunner]-.-> called[≺≺interface≻≻;ICallable]
[≺≺interface≻≻;ICallbackRunner]^-.-[≺≺mixin≻≻;CallbackRunner{bg:green}]
[≺≺interface≻≻;ICallbackRunner]^-.-[DefaultCallbackRunner{bg:green}]
[≺≺interface≻≻;IMachine]^-.-[MachineWithExternalState]
[Model]-1> default runner[≺≺interface≻≻;ICallbackRunner]
[Model]-1>[Transitions]
[Model]-1>[Behaviors]
[Behaviors]-*> by behavior[Callbacks]
[Callbacks]-*> by trigger[≺≺interface≻≻;ICallable]
[MachineWithExternalState{bg:orange}]^[Machine]
[MachineWithExternalState]-1>[Model]
[MachineWithExternalState]-1>[≺≺interface≻≻;ICallbackRunner]
[MachineWithExternalState]-2> state reader/writer[≺≺interface≻≻;ICallable]