-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfoodgroup.h
More file actions
30 lines (24 loc) · 710 Bytes
/
Copy pathfoodgroup.h
File metadata and controls
30 lines (24 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// foodgroup.h
#ifndef _FOODGROUP_H
#define _FOODGROUP_H
#include <string>
#include <vector>
//#include <iostream>
#include "ingredient.h"
class FoodGroup
{
public:
FoodGroup(std::string type);
virtual ~FoodGroup() {}
std::string getType() const;
void addFood(const std::string name, const double cost);
bool contains( const std::string& s) const;
const Ingredient& operator[](const size_t pos) const;
const Ingredient& getIngred(const std::string& name) const;
const Ingredient& getRandomIngred() const;
const Ingredient& getRandomIngredButNot( const std::vector< std::string >& noList) const;
private:
std::string m_type;
std::vector<Ingredient> m_foodGroupVector;
};
#endif