-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenuComponent.h
More file actions
29 lines (26 loc) · 1.17 KB
/
MenuComponent.h
File metadata and controls
29 lines (26 loc) · 1.17 KB
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
#ifndef MENU_COMPONENT_H
#define MENU_COMPONENT_H
#include <stdexcept>
#include <list>
class MenuComponent {
public:
using menu_component_t = MenuComponent *;
virtual ~MenuComponent() = default;
virtual void add([[maybe_unused]]menu_component_t menuComponent) {
throw std::invalid_argument("add(): Unsupported Operation"); }
virtual void remove([[maybe_unused]]menu_component_t menuComponent) {
throw std::invalid_argument("remove(): Unsupported Operation"); }
virtual MenuComponent* getChid([[maybe_unused]]int i) const {
throw std::invalid_argument("getChid(): Unsupported Operation"); }
virtual std::string getName() const {
throw std::invalid_argument("getName(): Unsupported Operation"); }
virtual std::string getDescription() const {
throw std::invalid_argument("getDescription(): Unsupported Operation"); }
virtual double getPrice() const {
throw std::invalid_argument("getPrice(): Unsupported Operation"); }
virtual bool isVegetarian() const {
throw std::invalid_argument("isVegetarian(): Unsupported Operation"); }
virtual void print() const {
throw std::invalid_argument("print(): Unsupported Operation"); }
};
#endif /* MENU_COMPONENT_H */