RecipeDB/model/recipe/ingredients/recipeingredient.h

35 lines
849 B
C
Raw Normal View History

#ifndef RECIPEINGREDIENT_H
#define RECIPEINGREDIENT_H
#include <string>
#include "model/recipe/ingredients/ingredient.h"
#include "model/recipe/ingredients/unitofmeasure.h"
using namespace std;
2018-02-12 15:27:24 +00:00
/**
* @brief The RecipeIngredient class represents both an ingredient and a unit of measure, to be used in a recipe object.
*/
class RecipeIngredient : public Ingredient
{
public:
RecipeIngredient(int id, string name, string foodGroup, int quantity, UnitOfMeasure unit);
RecipeIngredient(Ingredient i, int quantity, UnitOfMeasure unit);
int getQuantity();
UnitOfMeasure getUnit();
string getComment();
void setQuantity(int newQuantity);
void setUnit(UnitOfMeasure newUnit);
void setComment(string newComment);
private:
int quantity;
UnitOfMeasure unit;
string comment;
};
#endif // RECIPEINGREDIENT_H