Event.hpp 1.4 KB

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