2018-02-02 12:27:57 +00:00
|
|
|
#ifndef INGREDIENT_H
|
|
|
|
#define INGREDIENT_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2018-02-12 14:15:04 +00:00
|
|
|
/**
|
2018-02-12 15:27:24 +00:00
|
|
|
* @brief The Ingredient class represents an ingredient, which is classified by a food group, and has a name and an ID.
|
|
|
|
* An ingredient cannot be included on its own in a recipe, and must be paired with a Unit in a RecipeIngredient Object.
|
2018-02-12 14:15:04 +00:00
|
|
|
*/
|
|
|
|
|
2018-02-02 12:27:57 +00:00
|
|
|
class Ingredient
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Ingredient();
|
2018-02-12 18:53:03 +00:00
|
|
|
Ingredient(string name, string foodGroup);
|
2018-02-02 12:27:57 +00:00
|
|
|
|
2018-02-12 18:53:03 +00:00
|
|
|
//Getters
|
2018-02-13 09:22:05 +00:00
|
|
|
string getName() const;
|
|
|
|
string getFoodGroup() const;
|
2018-02-02 12:27:57 +00:00
|
|
|
|
2018-02-12 18:53:03 +00:00
|
|
|
//Setters
|
2018-02-02 12:27:57 +00:00
|
|
|
void setName(string newName);
|
|
|
|
void setFoodGroup(string newFoodGroup);
|
2018-03-30 12:33:48 +00:00
|
|
|
|
|
|
|
string toString();
|
2018-02-02 12:27:57 +00:00
|
|
|
protected:
|
|
|
|
string name;
|
|
|
|
string foodGroup;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INGREDIENT_H
|