-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdonut.h
73 lines (70 loc) · 1.43 KB
/
donut.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef DONUT_H
#define DONUT_H
#include <string>
#include <sstream>
#include <map>
#include <algorithm>
enum icingType
{
CHOCOLATEICING,
CARAMELICING,
MAPLE,
VANILLA,
GLAZE,
SPECIALICE,
NOICE
};
enum toppingType
{
RAINBOWSPR,
CHOCOLATESPR,
PEANUTS,
COCONUT,
OREO,
BACON,
GRAHAM,
FRUITYPEBBLES,
REESESPIECES,
MMS,
CANDYBAR,
CHOCOLATECHIPS,
SEASALT,
CINSUGAR,
POWDSUGAR,
NOTOP
};
enum drizzleType
{
CARAMELDRIZZLE,
CHOCOLATEDRIZZLE,
PEANUTBUTTER,
RASPBERRY,
SPECIALDRIZZLE,
NODRIZZLE
};
class donut
{
public:
donut();
donut(std::string icing, std::string topping, std::string drizzle);
icingType getIcing();
toppingType getTopping();
drizzleType getDrizzle();
void setIcing(std::string);
void setTopping(std::string);
void setDrizzle(std::string);
friend std::ostream &operator<<(std::ostream &, const donut &);
static std::map<icingType, std::string> icingToStr;
static std::map<std::string, icingType> strToIcing;
static std::map<toppingType, std::string> toppingToStr;
static std::map<std::string, toppingType> strToTopping;
static std::map<drizzleType, std::string> drizzleToStr;
static std::map<std::string, drizzleType> strToDrizzle;
private:
icingType icing;
toppingType topping;
drizzleType drizzle;
static int nextProdNum;
std::string toString() const;
};
#endif