2018-02-02 12:27:57 +00:00
|
|
|
#ifndef RECIPE_H
|
|
|
|
#define RECIPE_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2018-02-12 14:15:04 +00:00
|
|
|
#include "model/recipe/ingredients/recipeingredient.h"
|
2018-02-12 13:24:11 +00:00
|
|
|
#include "model/recipe/instruction.h"
|
2018-02-02 12:27:57 +00:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2018-02-12 14:15:04 +00:00
|
|
|
/**
|
|
|
|
* @brief The Recipe class represents all the data of a recipe:
|
|
|
|
* - A name.
|
|
|
|
* - List of ingredients.
|
|
|
|
* - An instruction object, which represents a block of HTML text which forms the instructions.
|
|
|
|
* - An image, if possible.
|
|
|
|
* - Created Date
|
|
|
|
* - A list of tags.
|
|
|
|
* - Makes X Servings.
|
|
|
|
* - Prep time.
|
|
|
|
* - Cook time.
|
|
|
|
* The recipe object can be used to populate the window with a full recipe. Prep time, cook time, servings, will be displayed at the beginning of the instructions block.
|
|
|
|
*/
|
|
|
|
|
2018-02-02 12:27:57 +00:00
|
|
|
class Recipe
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Recipe();
|
2018-02-12 14:15:04 +00:00
|
|
|
Recipe(string name, vector<RecipeIngredient> ingredients, Instruction instruction);
|
2018-02-02 12:27:57 +00:00
|
|
|
|
|
|
|
string getName();
|
2018-02-12 14:15:04 +00:00
|
|
|
vector<RecipeIngredient> getIngredients();
|
|
|
|
Instruction getInstruction();
|
2018-02-02 12:27:57 +00:00
|
|
|
private:
|
|
|
|
string name;
|
|
|
|
vector<string> tags;
|
2018-02-12 14:15:04 +00:00
|
|
|
vector<RecipeIngredient> ingredients;
|
|
|
|
Instruction instruction;
|
2018-02-12 13:24:11 +00:00
|
|
|
|
2018-02-02 12:27:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RECIPE_H
|