EventHandler.hpp 904 B

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