Event.hpp 981 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2024-05-16
  6. * Changed: 2024-05-16
  7. *
  8. * */
  9. #ifndef LS_STD_EVENT_REWORKED_HPP
  10. #define LS_STD_EVENT_REWORKED_HPP
  11. #include <ls-std/core/Class.hpp>
  12. #include <memory>
  13. #include <string>
  14. namespace ls::std::event::reworked
  15. {
  16. class Event : public ls::std::core::Class // TODO: put EventManager behind abstract or base class rather than using ls::std::core::Class
  17. {
  18. public:
  19. explicit Event(const ::std::string &_name);
  20. ~Event() noexcept override;
  21. [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getManager() const;
  22. [[nodiscard]] ls::std::event::reworked::Event of(const ::std::shared_ptr<ls::std::core::Class> &_manager) const;
  23. void setManager(const ::std::shared_ptr<ls::std::core::Class> &_manager);
  24. private:
  25. ::std::shared_ptr<ls::std::core::Class> manager{};
  26. };
  27. }
  28. #endif