IEventSubscriber.hpp 853 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-11-27
  6. * Changed: 2022-07-02
  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::std::core::interface_type
  15. {
  16. class IEventSubscriber
  17. {
  18. public:
  19. IEventSubscriber() = default;
  20. ~IEventSubscriber() = default;
  21. virtual void subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener) = 0;
  22. virtual void unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::interface_type::IListener> &_listener) = 0;
  23. };
  24. }
  25. #endif