IEventSubscriber.hpp 976 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: 2022-05-19
  7. *
  8. * */
  9. #ifndef LS_STD_I_EVENT_SUBSCRIBER_HPP
  10. #define LS_STD_I_EVENT_SUBSCRIBER_HPP
  11. #include <ls_std/core/types/EventTypes.hpp>
  12. #include <memory>
  13. #include "IListener.hpp"
  14. namespace ls
  15. {
  16. namespace std
  17. {
  18. namespace core
  19. {
  20. namespace interface_type
  21. {
  22. class IEventSubscriber
  23. {
  24. public:
  25. IEventSubscriber() = default;
  26. ~IEventSubscriber() = default;
  27. virtual void subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener) = 0;
  28. virtual void unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener) = 0;
  29. };
  30. }
  31. }
  32. }
  33. }
  34. #endif