refactored namespaaaces suckz
This commit is contained in:
@@ -12,32 +12,29 @@
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace FlippR_Driver
|
||||
{
|
||||
namespace Input
|
||||
{
|
||||
namespace FlippR_Driver {
|
||||
namespace Input {
|
||||
|
||||
class Event
|
||||
{
|
||||
public:
|
||||
Event(char address, int priority, std::string name);
|
||||
class Event {
|
||||
public:
|
||||
Event(char address, int priority, std::string name);
|
||||
|
||||
friend bool operator==(const Event &left, const Event &right);
|
||||
|
||||
friend bool operator<(const Event &left, const Event &right) {
|
||||
return left.priority < right.priority;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
std::string name;
|
||||
char address;
|
||||
int priority;
|
||||
};
|
||||
|
||||
bool operator==(const Event &left, const Event &right);
|
||||
|
||||
friend bool operator==(const Event& left, const Event& right);
|
||||
friend bool operator<(const Event& left, const Event& right)
|
||||
{
|
||||
return left.priority < right.priority;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
std::string name;
|
||||
char address;
|
||||
int priority;
|
||||
};
|
||||
|
||||
bool operator==(const Event& left, const Event& right);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif /* INPUTEVENT_H_ */
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
#include "IEventHandler.h"
|
||||
#include <memory>
|
||||
|
||||
namespace FlippR_Driver
|
||||
{
|
||||
namespace Input {
|
||||
namespace FlippR_Driver {
|
||||
namespace Input {
|
||||
|
||||
class IInputDriver
|
||||
{
|
||||
public:
|
||||
virtual ~IInputDriver(){};
|
||||
virtual void register_event_handler(IEventHandler* handler) = 0;
|
||||
virtual void unregister_event_handler(IEventHandler* handler) = 0;
|
||||
class IInputDriver {
|
||||
public:
|
||||
virtual ~IInputDriver() {};
|
||||
|
||||
virtual std::shared_ptr<Event> get_event(std::string name) = 0;
|
||||
};
|
||||
virtual void register_event_handler(IEventHandler *handler) = 0;
|
||||
|
||||
virtual void unregister_event_handler(IEventHandler *handler) = 0;
|
||||
|
||||
virtual std::shared_ptr<Event> get_event(std::string name) = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* SRC_INPUT_IINPUTDRIVER_H_ */
|
||||
|
||||
Reference in New Issue
Block a user