StateConnection.hpp 996 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-26
  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. class StateConnection : public Class {
  16. public:
  17. explicit StateConnection(ls_std::StateConnectionId _connectionId, ls_std::StateId _stateId);
  18. ~StateConnection() override = default;
  19. StateConnectionId getConnectionId();
  20. ls_std::StateId getStateId();
  21. bool isPassable() const;
  22. void setConnectionId(ls_std::StateConnectionId _connectionId);
  23. void setStateId(ls_std::StateId _stateId);
  24. void updatePassCondition(bool _condition);
  25. private:
  26. bool condition {};
  27. ls_std::StateConnectionId connectionId {};
  28. ls_std::StateId stateId {};
  29. };
  30. }
  31. #endif