finished detector
This commit is contained in:
44
FlippR-Driver/src/input/InputEvent.h
Normal file
44
FlippR-Driver/src/input/InputEvent.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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>
|
||||
|
||||
namespace Input
|
||||
{
|
||||
|
||||
class InputEvent
|
||||
{
|
||||
public:
|
||||
InputEvent(char address, std::string name) : address(address), name(name){}
|
||||
|
||||
bool operator==(const char other)
|
||||
{
|
||||
return this->address == other;
|
||||
}
|
||||
|
||||
bool operator==(const std::string other)
|
||||
{
|
||||
return this->name == other;
|
||||
}
|
||||
|
||||
bool operator<(const InputEvent& other)
|
||||
{
|
||||
return this->address < other.address;
|
||||
}
|
||||
private:
|
||||
const char address;
|
||||
const std::string name;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif /* INPUTEVENT_H_ */
|
||||
Reference in New Issue
Block a user