diff --git a/source/shoh/src/threads/common/Event.h b/source/shoh/src/threads/common/Event.h index 35b347d..3186d3c 100644 --- a/source/shoh/src/threads/common/Event.h +++ b/source/shoh/src/threads/common/Event.h @@ -8,11 +8,7 @@ #ifndef THREADS_COMMON_EVENT_H_ #define THREADS_COMMON_EVENT_H_ -#include -#include - typedef short int EventRawData; -const EventRawData ERROR_RETURN = -999; // Soon to be depercated class Event { @@ -27,42 +23,11 @@ public: NotifyUI }; - typedef struct _EventPair - { - EventRawData rd; - EventType et; - } EventPair; // Soon to be depercated - Event(Event::EventType type, EventRawData data) // Soon to be depercated - { - events.insert({type, data}); - } - - void inline addData(Event::EventType type, EventRawData data) // Soon to be depercated - { - const auto pos = events.find(type); - // No duplicates - if (pos == events.end()) - events.insert({type, data}); - } - - EventRawData getDataOf(Event::EventType e) const // Soon to be depercated - { - const auto pos = events.find(e); - if (pos == events.end()) - return ERROR_RETURN; - return pos->second; - } - - void inline setDataOf(Event::EventType e, EventRawData data) // Soon to be depercated - { - events[e] = data; - } - -/* Event(Event::EventType type, EventRawData data) + Event(Event::EventType type, EventRawData data) { setEvent(type, data); - } */ + } void setEvent(Event::EventType type, EventRawData data) { @@ -81,7 +46,6 @@ public: } private: - std::map events; Event::EventType _type; EventRawData _data; };