2018-02-12 14:15:04 +00:00
|
|
|
#include "model/recipe/ingredients/ingredient.h"
|
2018-02-02 12:27:57 +00:00
|
|
|
|
|
|
|
Ingredient::Ingredient(){
|
|
|
|
setName("NULL");
|
|
|
|
setFoodGroup("NULL");
|
|
|
|
}
|
|
|
|
|
2018-02-12 18:53:03 +00:00
|
|
|
Ingredient::Ingredient(string name, string foodGroup){
|
2018-02-02 12:27:57 +00:00
|
|
|
setName(name);
|
|
|
|
setFoodGroup(foodGroup);
|
|
|
|
}
|
|
|
|
|
2018-02-13 09:22:05 +00:00
|
|
|
string Ingredient::getName() const{
|
2018-02-02 12:27:57 +00:00
|
|
|
return this->name;
|
|
|
|
}
|
|
|
|
|
2018-02-13 09:22:05 +00:00
|
|
|
string Ingredient::getFoodGroup() const{
|
2018-02-02 12:27:57 +00:00
|
|
|
return this->foodGroup;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Ingredient::setName(string newName){
|
|
|
|
this->name = newName;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Ingredient::setFoodGroup(string newFoodGroup){
|
2018-03-30 12:33:48 +00:00
|
|
|
this->foodGroup = newFoodGroup;
|
|
|
|
}
|
|
|
|
|
|
|
|
string Ingredient::toString(){
|
|
|
|
return this->getName();
|
2018-02-02 12:27:57 +00:00
|
|
|
}
|