StateConnection.hpp 1.5 KB

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