refactoring to h and cpp
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user