EventThrower.h 512 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include "EventListener.h"
  3. #include <Trie.h>
  4. class EventThrower : public virtual Framework::ReferenceCounter
  5. {
  6. private:
  7. Framework::Trie<EventListener> *listeners;
  8. protected:
  9. void throwEvent( Event *event );
  10. public:
  11. EventThrower();
  12. ~EventThrower();
  13. void registerEventListener( Framework::Text eventName, EventListener *listener );
  14. void removeEventListener( Framework::Text eventName, EventListener *listener );
  15. void removeEventListener( EventListener *listener );
  16. };