StateConnection.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-09-10
  6. * Changed: 2022-05-12
  7. *
  8. * */
  9. #ifndef LS_STD_STATE_CONNECTION_HPP
  10. #define LS_STD_STATE_CONNECTION_HPP
  11. #include <memory>
  12. #include <ls_std/core/Class.hpp>
  13. #include <ls_std/core/types/StateMachineTypes.hpp>
  14. namespace ls
  15. {
  16. namespace std
  17. {
  18. namespace logic
  19. {
  20. class StateConnection : public ls::std::core::Class
  21. {
  22. public:
  23. explicit StateConnection(const ls::std::core::type::state_connection_id &_connectionId, const ls::std::core::type::state_id &_stateId);
  24. ~StateConnection() override = default;
  25. ls::std::core::type::state_connection_id getConnectionId();
  26. ls::std::core::type::state_id getStateId();
  27. bool isPassable() const;
  28. void setConnectionId(const ls::std::core::type::state_connection_id &_connectionId);
  29. void setStateId(const ls::std::core::type::state_id &_stateId);
  30. void updatePassCondition(bool _condition);
  31. private:
  32. bool condition{};
  33. ls::std::core::type::state_connection_id connectionId{};
  34. ls::std::core::type::state_id stateId{};
  35. void _assignConnectionId(const ls::std::core::type::state_connection_id &_connectionId);
  36. void _assignStateId(const ls::std::core::type::state_id &_stateId);
  37. };
  38. }
  39. }
  40. }
  41. #endif