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 branch 'master' into documentation
- Loading branch information
Showing
44 changed files
with
1,030 additions
and
50 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
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,89 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":WishfulShrinkingParser" as WishfulShrinkingParser LOGIC_COLOR | ||
participant ":AddIngredientCommandParser" as AddIngredientCommandParser LOGIC_COLOR | ||
participant "command :AddIngredientCommand" as AddIngredientCommand 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 ":UniqueIngredientList" as UniqueIngredientList MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("addF i/tomato") | ||
activate LogicManager | ||
|
||
LogicManager -> WishfulShrinkingParser : parseCommand("addF i/tomato") | ||
activate WishfulShrinkingParser | ||
|
||
create AddIngredientCommandParser | ||
WishfulShrinkingParser -> AddIngredientCommandParser | ||
activate AddIngredientCommandParser | ||
|
||
AddIngredientCommandParser --> WishfulShrinkingParser | ||
deactivate AddIngredientCommandParser | ||
|
||
WishfulShrinkingParser -> AddIngredientCommandParser : parse("i/tomato") | ||
activate AddIngredientCommandParser | ||
|
||
create AddIngredientCommand | ||
AddIngredientCommandParser -> AddIngredientCommand | ||
activate AddIngredientCommand | ||
|
||
AddIngredientCommand --> AddIngredientCommandParser : command | ||
deactivate AddIngredientCommand | ||
|
||
AddIngredientCommandParser --> WishfulShrinkingParser : command | ||
deactivate AddIngredientCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
AddIngredientCommandParser -[hidden]-> WishfulShrinkingParser | ||
destroy AddIngredientCommandParser | ||
|
||
WishfulShrinkingParser --> LogicManager : command | ||
deactivate WishfulShrinkingParser | ||
|
||
LogicManager -> AddIngredientCommand : execute() | ||
activate AddIngredientCommand | ||
|
||
AddIngredientCommand -> Model : updateFilteredIngredientList(predicate) | ||
activate Model | ||
|
||
Model --> AddIngredientCommand | ||
deactivate Model | ||
|
||
AddIngredientCommand -> Model : addIngredient("tomato") | ||
activate Model | ||
|
||
Model -> WishfulShrinking : addIngredient("tomato") | ||
activate WishfulShrinking | ||
|
||
WishfulShrinking --> UniqueIngredientList: add("tomato") | ||
activate UniqueIngredientList | ||
|
||
UniqueIngredientList --> WishfulShrinking | ||
deactivate UniqueIngredientList | ||
|
||
WishfulShrinking --> Model | ||
deactivate WishfulShrinking | ||
|
||
Model --> AddIngredientCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
AddIngredientCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> AddIngredientCommand | ||
deactivate CommandResult | ||
|
||
AddIngredientCommand --> LogicManager : result | ||
deactivate AddIngredientCommand | ||
|
||
[<--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,89 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":WishfulShrinkingParser" as WishfulShrinkingParser LOGIC_COLOR | ||
participant ":DeleteConsumptionCommandParser" as DeleteConsumptionCommandParser LOGIC_COLOR | ||
participant "d:DeleteConsumptionCommand" as DeleteConsumptionCommand 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 ":ConsumptionList" as ConsumptionList MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("deleteC 1") | ||
activate LogicManager | ||
|
||
LogicManager -> WishfulShrinkingParser : parseCommand("deleteC 1") | ||
activate WishfulShrinkingParser | ||
|
||
create DeleteConsumptionCommandParser | ||
WishfulShrinkingParser -> DeleteConsumptionCommandParser | ||
activate DeleteConsumptionCommandParser | ||
|
||
DeleteConsumptionCommandParser --> WishfulShrinkingParser | ||
deactivate DeleteConsumptionCommandParser | ||
|
||
WishfulShrinkingParser -> DeleteConsumptionCommandParser : parse("1") | ||
activate DeleteConsumptionCommandParser | ||
|
||
create DeleteConsumptionCommand | ||
DeleteConsumptionCommandParser -> DeleteConsumptionCommand | ||
activate DeleteConsumptionCommand | ||
|
||
DeleteConsumptionCommand --> DeleteConsumptionCommandParser : command | ||
deactivate DeleteConsumptionCommand | ||
|
||
DeleteConsumptionCommandParser --> WishfulShrinkingParser : command | ||
deactivate DeleteConsumptionCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
DeleteConsumptionCommandParser -[hidden]-> WishfulShrinkingParser | ||
destroy DeleteConsumptionCommandParser | ||
|
||
WishfulShrinkingParser --> LogicManager : command | ||
deactivate WishfulShrinkingParser | ||
|
||
LogicManager -> DeleteConsumptionCommand : execute() | ||
activate DeleteConsumptionCommand | ||
|
||
DeleteConsumptionCommand -> Model : getFilteredConsumptionList() | ||
activate Model | ||
|
||
Model --> DeleteConsumptionCommand | ||
deactivate Model | ||
|
||
DeleteConsumptionCommand -> Model : deleteConsumption(target) | ||
activate Model | ||
|
||
Model -> WishfulShrinking : removeConsumption(key) | ||
activate WishfulShrinking | ||
|
||
WishfulShrinking --> ConsumptionList: remove(toRemove) | ||
activate ConsumptionList | ||
|
||
ConsumptionList --> WishfulShrinking | ||
deactivate ConsumptionList | ||
|
||
WishfulShrinking --> Model | ||
deactivate WishfulShrinking | ||
|
||
Model --> DeleteConsumptionCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
DeleteConsumptionCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> DeleteConsumptionCommand | ||
deactivate CommandResult | ||
|
||
DeleteConsumptionCommand --> LogicManager : result | ||
deactivate DeleteConsumptionCommand | ||
|
||
[<--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,58 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":WishfulShrinkingParser" as WishfulShrinkingParser LOGIC_COLOR | ||
participant "command :RecommendCommand" as RecommendCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute(recommend) | ||
activate LogicManager | ||
|
||
LogicManager -> WishfulShrinkingParser : parseCommand(recommend) | ||
activate WishfulShrinkingParser | ||
|
||
create RecommendCommand | ||
WishfulShrinkingParser -> RecommendCommand | ||
activate RecommendCommand | ||
|
||
RecommendCommand --> WishfulShrinkingParser : command | ||
deactivate RecommendCommand | ||
|
||
WishfulShrinkingParser --> LogicManager : command | ||
deactivate WishfulShrinkingParser | ||
|
||
LogicManager -> RecommendCommand : execute() | ||
activate RecommendCommand | ||
|
||
RecommendCommand -> Model : updateFilteredRecipeList(predicate) | ||
activate Model | ||
|
||
Model --> RecommendCommand | ||
deactivate Model | ||
|
||
RecommendCommand -> Model : getFilteredRecipeList() | ||
activate Model | ||
|
||
Model --> RecommendCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
RecommendCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> RecommendCommand | ||
deactivate CommandResult | ||
|
||
RecommendCommand --> LogicManager : result | ||
deactivate RecommendCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |
Oops, something went wrong.