This commit is contained in:
Jonas Zeunert
2018-06-15 00:02:03 +02:00
parent ec41e9e314
commit d027d32e2f
19 changed files with 79 additions and 20 deletions

View File

@@ -0,0 +1,49 @@
/*
* InputEvent.h
*
* Created on: Apr 5, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
*/
#ifndef INPUTEVENT_H_
#define INPUTEVENT_H_
#include <set>
#include <string>
#include "../utilities/config.h"
namespace Input
{
class Event
{
public:
Event(char address, char priority, std::string name) :
address(address), priority(priority), name(name)
{
CLOG_IF(VLOG_IS_ON(HIGH_VERBOSITY), INFO, INPUT_LOGGER) << "Created event: " << name << ", address: " << address;
}
bool operator==(const Event& other)
{
return this->name == other.name;
}
friend bool operator<(const Event& left, const Event& right)
{
return left.priority < right.priority;
}
private:
char address;
char priority;
std::string name;
};
}
#endif /* INPUTEVENT_H_ */