14#include "../json_helper.h"
44 BlackboardType
type = BlackboardType::Int;
71 bool HasEntry(
const std::string& name)
const;
87 bool CreateEntry(
const std::string& name, BlackboardType type,
117 const std::map<std::string, BlackboardValue>&
GetAll()
const;
ComponentTypeID GetComponentTypeID_Static()
Manages named blackboard variables for a graph.
bool CreateEntry(const std::string &name, BlackboardType type, const BlackboardValue &initialValue)
Create a new entry.
bool RenameEntry(const std::string &oldName, const std::string &newName)
Rename an entry.
BlackboardSystem()=default
bool RemoveEntry(const std::string &name)
Remove an entry.
const std::map< std::string, BlackboardValue > & GetAll() const
Get all entries (for UI / serialization)
bool SetValue(const std::string &name, const BlackboardValue &value)
Update the value of an existing entry.
std::map< std::string, BlackboardValue > m_entries
const BlackboardValue * GetEntry(const std::string &name) const
Get a const pointer to an entry.
static BlackboardType StringToType(const std::string &s)
Convert a string to BlackboardType (returns Int on unknown)
json ToJson() const
Serialize blackboard to JSON.
void FromJson(const json &j)
Deserialize blackboard from JSON.
bool HasEntry(const std::string &name) const
Check if an entry exists.
~BlackboardSystem()=default
static std::string TypeToString(BlackboardType t)
Convert a BlackboardType to its string representation.
BlackboardType
Supported variable types in the blackboard.
< Provides AssetID and INVALID_ASSET_ID
@ Int
32-bit signed integer
Stores a typed value for a blackboard entry.