1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef LS_STD_STATE_CONNECTION_HPP
- #define LS_STD_STATE_CONNECTION_HPP
- #include <memory>
- #include <ls_std/base/Class.hpp>
- #include "StateMachineTypes.hpp"
- namespace ls_std
- {
- class StateConnection : public ls_std::Class
- {
- public:
- explicit StateConnection(const ls_std::StateConnectionId& _connectionId, const ls_std::StateId& _stateId);
- ~StateConnection() override = default;
- StateConnectionId getConnectionId();
- ls_std::StateId getStateId();
- bool isPassable() const;
- void setConnectionId(const ls_std::StateConnectionId& _connectionId);
- void setStateId(const ls_std::StateId& _stateId);
- void updatePassCondition(bool _condition);
- private:
- bool condition{};
- ls_std::StateConnectionId connectionId{};
- ls_std::StateId stateId{};
- void _assignConnectionId(const ls_std::StateConnectionId& _connectionId);
- void _assignStateId(const ls_std::StateId& _stateId);
- };
- }
- #endif
|