Skip to content

Commit

Permalink
Add uml diagram for Read Command
Browse files Browse the repository at this point in the history
  • Loading branch information
NatLeong committed Mar 28, 2024
1 parent 28386bb commit ebdfbd5
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions docs/diagrams/ReadCommand.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":ReadCommandParser" as ReadCommandParser LOGIC_COLOR
participant "r:ReadCommand" as ReadCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant "m:Model" as Model MODEL_COLOR
end box

[-> LogicManager : execute("read T0123456A")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("read T0123456A")
activate AddressBookParser

create ReadCommandParser
AddressBookParser -> ReadCommandParser
activate ReadCommandParser

ReadCommandParser --> AddressBookParser
deactivate ReadCommandParser

AddressBookParser -> ReadCommandParser : parse("T0123456A")
activate ReadCommandParser

create ReadCommand
ReadCommandParser -> ReadCommand
activate ReadCommand

ReadCommand --> ReadCommandParser :
deactivate ReadCommand

ReadCommandParser --> AddressBookParser : r
deactivate ReadCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
ReadCommandParser -[hidden]-> AddressBookParser
destroy ReadCommandParser

AddressBookParser --> LogicManager : r
deactivate AddressBookParser

LogicManager -> ReadCommand : execute(m)
activate ReadCommand

ReadCommand -> Model
activate Model

Model --> ReadCommand
deactivate Model

create CommandResult
ReadCommand -> CommandResult
activate CommandResult

CommandResult --> ReadCommand
deactivate CommandResult

ReadCommand --> LogicManager :
deactivate ReadCommand

[<--LogicManager
deactivate LogicManager
@enduml
Binary file added docs/images/ReadCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ebdfbd5

Please sign in to comment.