forked from nus-cs2103-AY2021S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from jiaqi20/documentation
Update DG
- Loading branch information
Showing
6 changed files
with
218 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":WishfulShrinkingParser" as WishfulShrinkingParser LOGIC_COLOR | ||
participant ":DeleteRecipeCommandParser" as DeleteRecipeCommandParser LOGIC_COLOR | ||
participant "d:DeleteRecipeCommand" as DeleteRecipeCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant ":WishfulShrinking" as WishfulShrinking MODEL_COLOR | ||
participant ":UniqueRecipeList" as UniqueRecipeList MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("deleteR 1") | ||
activate LogicManager | ||
|
||
LogicManager -> WishfulShrinkingParser : parseCommand("deleteR 1") | ||
activate WishfulShrinkingParser | ||
|
||
create DeleteRecipeCommandParser | ||
WishfulShrinkingParser -> DeleteRecipeCommandParser | ||
activate DeleteRecipeCommandParser | ||
|
||
DeleteRecipeCommandParser --> WishfulShrinkingParser | ||
deactivate DeleteRecipeCommandParser | ||
|
||
WishfulShrinkingParser -> DeleteRecipeCommandParser : parse("1") | ||
activate DeleteRecipeCommandParser | ||
|
||
create DeleteRecipeCommand | ||
DeleteRecipeCommandParser -> DeleteRecipeCommand | ||
activate DeleteRecipeCommand | ||
|
||
DeleteRecipeCommand --> DeleteRecipeCommandParser : command | ||
deactivate DeleteRecipeCommand | ||
|
||
DeleteRecipeCommandParser --> WishfulShrinkingParser : command | ||
deactivate DeleteRecipeCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
DeleteRecipeCommandParser -[hidden]-> WishfulShrinkingParser | ||
destroy DeleteRecipeCommandParser | ||
|
||
WishfulShrinkingParser --> LogicManager : command | ||
deactivate WishfulShrinkingParser | ||
|
||
LogicManager -> DeleteRecipeCommand : execute() | ||
activate DeleteRecipeCommand | ||
|
||
DeleteCommand -> Model : getFilteredRecipeList() | ||
activate Model | ||
|
||
Model -> WishfulShrinking : removeRecipe(key) | ||
activate WishfulShrinking | ||
|
||
WishfulShrinking -> UniqueRecipeList : remove(toRemove) | ||
activate UniqueRecipeList | ||
|
||
UniqueRecipeList -> WishfulShrinking | ||
deactivate UniqueRecipeList | ||
|
||
WishfulShrinking -> Model | ||
deactivate WishfulShrinking | ||
|
||
Model -> DeleteRecipeCommand | ||
deactivate Model | ||
|
||
Model --> DeleteRecipeCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
DeleteRecipeCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> DeleteRecipeCommand | ||
deactivate CommandResult | ||
|
||
DeleteRecipeCommand --> LogicManager : result | ||
deactivate DeleteRecipeCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":WishfulShrinkingParser" as WishfulShrinkingParser LOGIC_COLOR | ||
participant "l:ListRecipesCommand" as ListRecipesCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant ":WishfulShrinking" as WishfulShrinking MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("recipes") | ||
activate LogicManager | ||
|
||
LogicManager -> WishfulShrinkingParser : parseCommand("recipes") | ||
activate WishfulShrinkingParser | ||
|
||
create ListRecipesCommand | ||
WishfulShrinkingParser -> ListRecipesCommand | ||
activate ListRecipesCommand | ||
|
||
ListRecipesCommand --> WishfulShrinkingParser | ||
deactivate ListRecipesCommand | ||
|
||
WishfulShrinkingParser --> LogicManager : command | ||
deactivate WishfulShrinkingParser | ||
|
||
LogicManager -> ListRecipesCommand : execute() | ||
activate ListRecipesCommand | ||
|
||
ListRecipesCommand -> Model : updateFilteredRecipeList() | ||
activate Model | ||
|
||
Model -> WishfulShrinking : getRecipeList() | ||
activate WishfulShrinking | ||
|
||
WishfulShrinking -> UniqueRecipeList : asUnmodifiableObservableList() | ||
activate UniqueRecipeList | ||
|
||
UniqueRecipeList -> WishfulShrinking | ||
deactivate UniqueRecipeList | ||
|
||
WishfulShrinking -> Model | ||
deactivate WishfulShrinking | ||
|
||
Model -> ListRecipesCommand | ||
deactivate Model | ||
|
||
Model --> ListRRecipesCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
ListRecipesCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> ListRecipesCommand | ||
deactivate CommandResult | ||
|
||
ListRecipesCommand --> LogicManager : result | ||
deactivate ListRecipesCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters