add event sequence diagram

This commit is contained in:
2023-10-22 17:05:30 +02:00
parent c07c47385e
commit c9d2c05b73
3 changed files with 59 additions and 34 deletions

BIN
UML/event.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

55
UML/event.puml Normal file
View File

@ -0,0 +1,55 @@
@startuml
participant Behavior as b
participant Dispatcher as d
entity Event as e
participant EventQueue as eq
queue "EventQueue::queue_" as q
== Create an Event ==
|||
?->> b ++ : GEN
b -> e ** : new
b -> b --++ : pushEvent
e -> b : getBehavior
b --> e ++: setBehavior
e --> b --
b -> d ++ : getDispatcher
d --> b
b -> d -- : pushEvent
d ->? -- : push
|||
|||
== Push Event ==
|||
?->> d ++: pushEvent
d -> eq--++: push
eq -> q ++
q --> eq
eq -> q -- : pushEndQueue
|||
|||
== Dispatch ==
|||
?->> d ++: executeOnce
d -> q : getFront
q -> e ++
e --> q
q --> d : event
d -> q : pop
deactivate q
d -> d --++ : dispatchEvent
d -> b ++ : getBehavior
b --> d
d -> b -- : process
b -> b--: processEvent
destroy e
@enduml