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

@@ -18,25 +18,15 @@ 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;
}
Event(char address, char priority, std::string name);
bool operator==(const Event& other);
friend bool operator<(const Event& left, const Event& right);
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;
public:
char priority;
std::string name;