EventHandler.hpp 763 B

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