/* * Author: Patrick-Christopher Mattulat * Company: Lynar Studios * E-Mail: webmaster@lynarstudios.com * Created: 2020-09-05 * Changed: 2022-07-15 * * */ #ifndef LS_STD_STATE_HPP #define LS_STD_STATE_HPP #include #include #include #include #include "StateConnection.hpp" #include #include namespace ls::std::logic { class [[deprecated("consider using ls_game_tool_kit dependency instead!")]] LS_STD_DYNAMIC_GOAL State : public ls::std::core::Class { public: explicit State(const ls::std::core::type::state_id &_id); ~State() override = default; // additional functionality bool addStateConnection(const ls::std::core::type::state_connection_id &_connectionId, const ::std::shared_ptr &_connectedState); bool addStateConnection(const ::std::shared_ptr &_connection); void clearConnections(); ::std::unordered_map> getConnectedStates(); ls::std::core::type::state_id getId(); bool hasConnection(const ls::std::core::type::state_connection_id &_connectionId); void setId(const ls::std::core::type::state_id &_id); private: ::std::unordered_map> connectedStates{}; ls::std::core::type::state_id id{}; void _assignStateId(const ls::std::core::type::state_id &_id); void _clearConnections(); bool _hasConnection(const ls::std::core::type::state_connection_id &_connectionId); }; } #endif