7#include <unordered_map>
25 std::unordered_map<int64_t, NodeStatus>
states;
29 explicit StateManager(std::shared_ptr<EmberCore::BehaviorTree> tree);
60 std::shared_ptr<EmberCore::BehaviorTree>
m_tree;
std::function< void(int64_t tick_number)> TickCallback
NodeStatus GetNodeStatus(int64_t node_id) const
void ApplyBlackboardUpdate(const Protocol::BlackboardUpdate *update)
bool IsHistoryEnabled() const
void ApplyTickUpdate(const Protocol::TickUpdate *update)
std::vector< int64_t > m_changedNodeIds
void SeekToTick(int64_t tick_number)
int64_t GetCurrentTick() const
const std::vector< TickSnapshot > & GetHistory() const
std::vector< int64_t > GetAndClearChangedNodes()
std::unordered_map< int64_t, NodeStatus > m_nodeStates
void AddTickCallback(TickCallback callback)
std::vector< TickCallback > m_tickCallbacks
std::function< void(int64_t node_id, NodeStatus old_status, NodeStatus new_status)> StateChangeCallback
void AddStateChangeCallback(StateChangeCallback callback)
void NotifyStateChange(int64_t node_id, NodeStatus old_status, NodeStatus new_status)
const std::vector< int64_t > & GetExecutionPath() const
void EnableHistory(size_t max_ticks=1000)
std::vector< int64_t > m_executionPath
std::vector< TickSnapshot > m_history
Protocol::NodeStatus NodeStatus
StateManager(std::shared_ptr< EmberCore::BehaviorTree > tree)
std::shared_ptr< EmberCore::BehaviorTree > m_tree
void NotifyTick(int64_t tick_number)
std::vector< StateChangeCallback > m_stateCallbacks
std::unordered_map< int64_t, NodeStatus > states
std::vector< int64_t > execution_path