StateConnection.hpp 948 B

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