EventHandler.hpp 964 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-11-27
  6. * Changed: 2024-05-24
  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. /*
  19. * @class(name: 'EventHandler', package: 'event')
  20. * */
  21. namespace ls::std::event
  22. {
  23. class LS_STD_DYNAMIC_GOAL EventHandler : public ls::std::event::Narrator
  24. {
  25. public:
  26. explicit EventHandler(const ls::std::core::type::event_id &_id);
  27. ~EventHandler() noexcept override;
  28. [[nodiscard]] ls::std::core::type::event_id getId() const;
  29. private:
  30. ls::std::core::type::event_id id{};
  31. void _assignId(const ls::std::core::type::event_id &_id);
  32. };
  33. }
  34. #endif