StateConnection.hpp 995 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-09-10
  6. * Changed: 2021-04-23
  7. *
  8. * */
  9. #ifndef LS_STD_STATE_CONNECTION_HPP
  10. #define LS_STD_STATE_CONNECTION_HPP
  11. #include <memory>
  12. #include <ls_std/base/Class.hpp>
  13. #include "StateMachineTypes.hpp"
  14. namespace ls_std
  15. {
  16. class StateConnection : public Class
  17. {
  18. public:
  19. explicit StateConnection(ls_std::StateConnectionId _connectionId, ls_std::StateId _stateId);
  20. ~StateConnection() override = default;
  21. StateConnectionId getConnectionId();
  22. ls_std::StateId getStateId();
  23. bool isPassable() const;
  24. void setConnectionId(ls_std::StateConnectionId _connectionId);
  25. void setStateId(ls_std::StateId _stateId);
  26. void updatePassCondition(bool _condition);
  27. private:
  28. bool condition{};
  29. ls_std::StateConnectionId connectionId{};
  30. ls_std::StateId stateId{};
  31. };
  32. }
  33. #endif