IEventSubscriber.hpp 881 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-12
  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. class IEventSubscriber
  21. {
  22. public:
  23. IEventSubscriber() = default;
  24. ~IEventSubscriber() = default;
  25. virtual void subscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::IListener> &_listener) = 0;
  26. virtual void unsubscribe(const ls::std::core::type::event_id &_id, const ::std::shared_ptr<ls::std::core::IListener> &_listener) = 0;
  27. };
  28. }
  29. }
  30. }
  31. #endif