19#include <unordered_map>
181 std::unordered_map<std::string, VariableType>
m_types;
ComponentTypeID GetComponentTypeID_Static()
Immutable asset structure shared by all task graph runners.
Core enumerations and TaskValue type-safe variant for the Atomic Task System.
Simple map-based blackboard for task graph runtime state.
void Serialize(std::vector< uint8_t > &outBytes) const
Serializes all variable names and typed values into a byte buffer.
std::unordered_map< std::string, VariableType > m_types
Declared type of each variable (used for type validation in SetValue).
TaskValue GetValueScoped(const std::string &scopedKey) const
Gets a value using a scoped key (prefix "local:" is stripped).
void Deserialize(const std::vector< uint8_t > &inBytes)
Restores variable values from a byte buffer produced by Serialize().
void Reset()
Resets all variables to their default values.
void Initialize(const TaskGraphTemplate &tmpl)
Initialises the blackboard from a template.
std::unordered_map< std::string, TaskValue > m_defaults
Default (initial) values used by Reset().
bool HasVariable(const std::string &varName) const
Returns true if a variable with the given name is registered.
void SetValue(const std::string &varName, const TaskValue &value)
Sets the value of a variable.
TaskValue GetValue(const std::string &varName) const
Returns the current value of a variable.
void SetValueScoped(const std::string &scopedKey, const TaskValue &value)
Sets a value using a scoped key (prefix "local:" is stripped).
std::unordered_map< std::string, TaskValue > m_variables
Current values for each registered variable.
std::vector< std::string > GetVariableNames() const
Returns all registered variable names (useful for debugging / editor).
LocalBlackboard()
Default constructor.
void InitializeFromEntries(const std::vector< BlackboardEntry > &entries)
Initializes the blackboard from a vector of BlackboardEntry (ATS VS schema v4).
Immutable, shareable task graph asset.
C++14-compliant type-safe value container for task parameters.
< Provides AssetID and INVALID_ASSET_ID