2018-02-12 14:15:04 +00:00
|
|
|
#include "model/recipe/ingredients/recipeingredient.h"
|
2018-02-02 12:27:57 +00:00
|
|
|
|
2018-02-12 18:20:38 +00:00
|
|
|
RecipeIngredient::RecipeIngredient(int id, string name, string foodGroup, int quantity, UnitOfMeasure unit) : Ingredient(id, name, foodGroup){
|
2018-02-02 12:27:57 +00:00
|
|
|
setQuantity(quantity);
|
|
|
|
setUnit(unit);
|
|
|
|
}
|
|
|
|
|
2018-02-12 18:20:38 +00:00
|
|
|
RecipeIngredient::RecipeIngredient(Ingredient i, int quantity, UnitOfMeasure unit){
|
2018-02-02 12:27:57 +00:00
|
|
|
setId(i.getId());
|
|
|
|
setName(i.getName());
|
|
|
|
setFoodGroup(i.getFoodGroup());
|
|
|
|
setQuantity(quantity);
|
|
|
|
setUnit(unit);
|
|
|
|
}
|
|
|
|
|
|
|
|
string RecipeIngredient::getComment(){
|
|
|
|
return this->comment;
|
|
|
|
}
|
|
|
|
|
|
|
|
void RecipeIngredient::setQuantity(int newQuantity){
|
|
|
|
this->quantity = newQuantity;
|
|
|
|
}
|
|
|
|
|
2018-02-12 18:20:38 +00:00
|
|
|
void RecipeIngredient::setUnit(UnitOfMeasure newUnit){
|
2018-02-02 12:27:57 +00:00
|
|
|
this->unit = newUnit;
|
|
|
|
}
|
|
|
|
|
|
|
|
void RecipeIngredient::setComment(string newComment){
|
|
|
|
this->comment = newComment;
|
|
|
|
}
|