Event.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2024-05-16
  6. * Changed: 2024-09-11
  7. *
  8. * */
  9. #ifndef LS_STD_EVENT_HPP
  10. #define LS_STD_EVENT_HPP
  11. #include <ls-std/core/Class.hpp>
  12. #include <ls-std/os/dynamic-goal.hpp>
  13. #include <memory>
  14. #include <string>
  15. /*
  16. * @doc: class(name: 'Event', package: 'event')
  17. * @doc: event.Event.description('This class represents an event that can be invoked.')
  18. * */
  19. namespace ls::std::event
  20. {
  21. class LS_STD_DYNAMIC_GOAL Event : public ls::std::core::Class
  22. {
  23. public:
  24. explicit Event(const ::std::string &_name);
  25. ~Event() noexcept override;
  26. [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getManager() const;
  27. void setManager(const ::std::shared_ptr<ls::std::core::Class> &_manager);
  28. [[nodiscard]] ls::std::event::Event supervisedBy(const ::std::shared_ptr<ls::std::core::Class> &_manager) const;
  29. private:
  30. ::std::shared_ptr<ls::std::core::Class> manager{};
  31. };
  32. }
  33. #endif