Event.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-11-26
  6. * Changed: 2022-05-12
  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/core/interface/ISerializable.hpp>
  13. #include <memory>
  14. #include <ls_std/core/types/EventTypes.hpp>
  15. namespace ls
  16. {
  17. namespace std
  18. {
  19. namespace event
  20. {
  21. class Event : public ls::std::core::Class
  22. {
  23. public:
  24. explicit Event(const ls::std::core::type::event_id &_id);
  25. ~Event() override = default;
  26. // additional functionality
  27. bool addParameter(const ls::std::core::type::event_parameter &_eventParameter);
  28. void clearParameterList();
  29. ls::std::core::type::event_id getId();
  30. ls::std::core::type::event_parameter_list getParameterList();
  31. bool removeParameter(const ls::std::core::type::event_parameter_id &_id);
  32. void setId(const ls::std::core::type::event_id &_id);
  33. private:
  34. ls::std::core::type::event_id id{};
  35. ls::std::core::type::event_parameter_list parameterList{};
  36. void _assignId(const ls::std::core::type::event_id &_id);
  37. bool _hasParameter(const ls::std::core::type::event_id &_id);
  38. };
  39. }
  40. }
  41. }
  42. #endif