refactoring to h and cpp

This commit is contained in:
Jonas Zeunert
2018-06-15 00:16:29 +02:00
parent d027d32e2f
commit bacf59ba71
9 changed files with 156 additions and 134 deletions

View File

@@ -4,7 +4,22 @@
* Created on: Jun 15, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
*/
#include "Event.h"
using namespace Input;
Event::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 Event::operator==(const Event& other)
{
return this->name == other.name;
}
friend bool operator<(const Event& left, const Event& right)
{
return left.priority < right.priority;
}