Event.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-11-26
  6. * Changed: 2021-07-14
  7. *
  8. * */
  9. #ifndef LS_STD_EVENT_HPP
  10. #define LS_STD_EVENT_HPP
  11. #include <ls_std/base/Class.hpp>
  12. #include <ls_std/serialization/ISerializable.hpp>
  13. #include <memory>
  14. #include "EventTypes.hpp"
  15. namespace ls_std
  16. {
  17. class Event : public ls_std::Class
  18. {
  19. public:
  20. explicit Event(const ls_std::event_id &_id);
  21. ~Event() override = default;
  22. // additional functionality
  23. bool addParameter(const ls_std::event_parameter &_eventParameter);
  24. void clearParameterList();
  25. ls_std::event_id getId();
  26. ls_std::event_parameter_list getParameterList();
  27. bool removeParameter(const ls_std::event_parameter_id &_id);
  28. void setId(const ls_std::event_id &_id);
  29. private:
  30. ls_std::event_id id{};
  31. ls_std::event_parameter_list parameterList{};
  32. void _assignId(const ls_std::event_id &_id);
  33. bool _hasParameter(const ls_std::event_id &_id);
  34. };
  35. }
  36. #endif