22#include <unordered_map>
81 const std::vector<BlackboardVariablePreset>&
GetAllPresets()
const;
95 std::vector<BlackboardVariablePreset>
GetByCategory(
const std::string& category)
const;
107 bool HasPreset(
const std::string& name)
const;
Singleton registry for global blackboard variable presets.
const BlackboardVariablePreset * GetPreset(const std::string &name) const
Returns a pointer to the preset with the given name, or nullptr.
BlackboardVariablePresetRegistry()=default
std::mutex m_mutex
Guards m_presets during concurrent access.
std::vector< BlackboardVariablePreset > m_presets
size_t GetCount() const
Returns the number of loaded presets.
const std::vector< BlackboardVariablePreset > & GetAllPresets() const
Returns all loaded presets, sorted by name.
BlackboardVariablePresetRegistry(const BlackboardVariablePresetRegistry &)=delete
static BlackboardVariablePresetRegistry & Instance()
Returns the singleton instance.
std::unordered_map< std::string, size_t > m_nameIndex
name -> index in m_presets
bool LoadFromFile(const std::string &filePath)
Loads presets from a JSON file.
std::vector< BlackboardVariablePreset > GetByCategory(const std::string &category) const
Returns all presets belonging to a given category.
BlackboardVariablePresetRegistry & operator=(const BlackboardVariablePresetRegistry &)=delete
bool HasPreset(const std::string &name) const
Returns true if a preset with the given name exists.
void Clear()
Clears all loaded presets and resets the registry.
std::vector< std::string > GetAllCategories() const
Returns all unique category names present in the registry.
< Provides AssetID and INVALID_ASSET_ID
Metadata for a single blackboard variable preset entry.
std::string category
Category label (e.g. "Targeting", "Movement")
std::string type
Type string as declared in JSON (e.g. "Float")
std::string name
Variable key (e.g. "targetDistance")
std::string description
Human-readable description.
std::string defaultValue
Default value as string (e.g. "9999.0", "false")