IEventSubscriber.hpp 869 B

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