Added variables to unit of measure.
This commit is contained in:
parent
05a18d6a9a
commit
45db82f0d5
|
@ -6,7 +6,8 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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.
|
* @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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Ingredient
|
class Ingredient
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The RecipeIngredient class represents both an ingredient and a unit of measure, to be used in a recipe object.
|
||||||
|
*/
|
||||||
|
|
||||||
class RecipeIngredient : public Ingredient
|
class RecipeIngredient : public Ingredient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -14,9 +14,10 @@ class UnitOfMeasure
|
||||||
public:
|
public:
|
||||||
UnitOfMeasure();
|
UnitOfMeasure();
|
||||||
private:
|
private:
|
||||||
string name;
|
string name; //The name of the unit of measure.
|
||||||
string plural;
|
string plural; //The plural name.
|
||||||
string abbreviation;
|
string abbreviation; //A short version of the unit.
|
||||||
|
float siBaseUnitEquivalent; //The ratio when compared to the base SI unit for this unit. For example: 1 cup = 237mL.
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // UNITOFMEASURE_H
|
#endif // UNITOFMEASURE_H
|
||||||
|
|
Loading…
Reference in New Issue