lunch-rest/menu.hpp

35 lines
875 B
C++
Raw Permalink Normal View History

2020-09-14 22:55:03 +00:00
#ifndef LUNCH_REST_MENU_H
#define LUNCH_REST_MENU_H
#include "meal.hpp"
#include <string>
#include <vector>
namespace LunchRest {
class Menu {
public:
Menu() = default;
Menu(const std::vector<Meal> &meals) :
_meals(meals) {}
void addMeal(bool soup, const std::string &name, const std::string &desc, int price);
void addMeal(const Meal &meal);
bool hasSoup() const;
Meal getSoup() const;
std::vector<Meal> getNonSoupMeals();
const std::vector<Meal> &getMeals() const;
unsigned long int getSoupIndex() const;
2020-09-15 14:05:16 +00:00
void setInvalidMenu( bool invalid = true );
2020-09-14 22:55:03 +00:00
bool isValid() const;
2020-09-14 23:30:34 +00:00
std::string jsonify() const;
2020-09-15 19:28:41 +00:00
void setDay(const std::string &day);
const std::string &getDay() const;
2020-09-14 22:55:03 +00:00
private:
std::vector<Meal> _meals;
bool _valid = true;
2020-09-15 19:28:41 +00:00
std::string _day = "";
2020-09-14 22:55:03 +00:00
};
} // end of namespace LunchRest
#endif