EventHandler.hpp 911 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-11-27
  6. * Changed: 2022-05-12
  7. *
  8. * */
  9. #ifndef LS_STD_EVENT_HANDLER_HPP
  10. #define LS_STD_EVENT_HANDLER_HPP
  11. #include <ls_std/core/Class.hpp>
  12. #include <list>
  13. #include <memory>
  14. #include <ls_std/core/interface/IListener.hpp>
  15. #include "Event.hpp"
  16. #include "Narrator.hpp"
  17. namespace ls
  18. {
  19. namespace std
  20. {
  21. namespace event
  22. {
  23. class EventHandler : public ls::std::event::Narrator
  24. {
  25. public:
  26. explicit EventHandler(const ls::std::core::type::event_id &_id);
  27. ~EventHandler() override = default;
  28. ls::std::core::type::event_id getId();
  29. private:
  30. ls::std::core::type::event_id id{};
  31. void _assignId(const ls::std::core::type::event_id &_id);
  32. };
  33. }
  34. }
  35. }
  36. #endif