-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sensor.h
50 lines (37 loc) · 1.15 KB
/
Sensor.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
#ifndef SENSOR_H
#define SENSOR_H
#include "Component.h"
#include "Action.h"
#include <vector>
#include <string>
using namespace std;
class Sensor : public Component {
private:
std::vector<std::shared_ptr<Action>> actions;
bool activated;
std::string vendor;
std::string type;
public:
Sensor(const std::string & type);
void removeComponent() override;
void test() override;
void activate() override;
void deactivate() override;
void setId(int id) override;
void setListActions(std::vector<std::shared_ptr<Action>> extraActions);
void setExtraAction (std::shared_ptr<Action> action);
void setVendor(std::string vendor);
void setParent(Component *parent) override;
std::vector<std::shared_ptr<Action>> getActions();
int getId() override;
std::string getVendor();
void getInfo() override;
Component * getParent() override;
std::string getType() override;
std::string getSensorType();
std::vector<std::shared_ptr<Component>> getAllChildren() override;
friend ostream& operator<<(ostream &os, const Sensor & component);
void operator++();
void operator--();
};
#endif