working on big refactor
This commit is contained in:
@@ -13,30 +13,30 @@
|
||||
#include <chrono>
|
||||
|
||||
namespace flippR_driver {
|
||||
namespace input {
|
||||
namespace input {
|
||||
|
||||
class Event {
|
||||
public:
|
||||
Event(char address, int priority, std::string name);
|
||||
class Event {
|
||||
public:
|
||||
Event(uint8_t address, int priority, std::string name);
|
||||
|
||||
friend bool operator==(const Event &left, const Event &right);
|
||||
|
||||
friend bool operator<(const Event &left, const Event &right) {
|
||||
return left.priority < right.priority;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
std::string name;
|
||||
uint8_t address;
|
||||
int priority;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> last_activation;
|
||||
|
||||
};
|
||||
|
||||
bool operator==(const Event &left, const Event &right);
|
||||
friend bool operator==(const Event &left, const Event &right);
|
||||
|
||||
friend bool operator<(const Event &left, const Event &right) {
|
||||
return left.priority < right.priority;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
std::string name;
|
||||
uint8_t address;
|
||||
int priority;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> last_activation;
|
||||
|
||||
};
|
||||
|
||||
bool operator==(const Event &left, const Event &right);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endif /* INPUTEVENT_H_ */
|
||||
|
||||
Reference in New Issue
Block a user