-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbarista_getter.h
More file actions
45 lines (35 loc) · 1.05 KB
/
barista_getter.h
File metadata and controls
45 lines (35 loc) · 1.05 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef CAFE_BARISTA_GETTER_H_
#define CAFE_BARISTA_GETTER_H_
#include <string>
#include <vector>
namespace cafe {
struct BaristaDescription {
BaristaDescription(const std::string& n) : name(n) {}
BaristaDescription(const BaristaDescription& d) : name(d.name) {}
std::string name;
};
typedef std::vector<BaristaDescription> BaristaDescriptions;
/**
* Abstract class which allows for getting the required amound of barista's
* descriptions.
*/
class BaristaGetter {
protected:
BaristaGetter() {}
public:
virtual ~BaristaGetter() {}
/**
* Tries to return the required amound of barista's descriptions.
*
* @param barista_descriptions The vector into which is stored the barista's
*descriptions.
* @param required_baristas Required amound of baristas.
*
* @return The amound of barista's descriptions stored in barista_descriptions
*vector.
*/
virtual int getBaristas(BaristaDescriptions& barista_descriptions,
int required_baristas) = 0;
};
} // namespace cafe
#endif // CAFE_BARISTA_GETTER_H_