StateConnection.hpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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-15
  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::std::logic
  16. {
  17. class [[deprecated("consider using ls_game_tool_kit dependency instead!")]] LS_STD_DYNAMIC_GOAL StateConnection : public ls::std::core::Class
  18. {
  19. public:
  20. explicit StateConnection(const ls::std::core::type::state_connection_id &_connectionId, const ls::std::core::type::state_id &_stateId);
  21. ~StateConnection() override = default;
  22. ls::std::core::type::state_connection_id getConnectionId();
  23. ls::std::core::type::state_id getStateId();
  24. [[nodiscard]] bool isPassable() const;
  25. void setConnectionId(const ls::std::core::type::state_connection_id &_connectionId);
  26. void setStateId(const ls::std::core::type::state_id &_stateId);
  27. void updatePassCondition(bool _condition);
  28. private:
  29. bool condition{};
  30. ls::std::core::type::state_connection_id connectionId{};
  31. ls::std::core::type::state_id stateId{};
  32. void _assignConnectionId(const ls::std::core::type::state_connection_id &_connectionId);
  33. void _assignStateId(const ls::std::core::type::state_id &_stateId);
  34. };
  35. }
  36. #endif