Class UZagalaSpecTaggedDataHandler#

Inheritance Relationships#

Base Type#

  • public UBlueprintFunctionLibrary

Class Documentation#

class UZagalaSpecTaggedDataHandler : public UBlueprintFunctionLibrary#

Blueprint function library providing typed helpers to get, set, remove, and query UZagalaSpecTaggedData objects from any IZagalaSpecTaggedDataCacher (e.g.

a context or expectation). C++ callers should prefer the typed template methods (GetDataT, SetDataT, etc.); Blueprint callers use the _BP variants.

Cache utilities (low-level)

static const UZagalaSpecTaggedData *GetCDOFromDataClass(TSubclassOf<UZagalaSpecTaggedData> DataClass)#

Returns the class default object of DataClass.

Parameters:

DataClass – The tagged data class.

Returns:

The CDO, or nullptr when DataClass is invalid.

template<TaggedDataTypeConcept TaggedDataType>
static FGameplayTag GetTag()#

Returns the data tag assigned to the TaggedDataType class default object.

Returns:

The CDO’s assigned data tag.

static UZagalaSpecTaggedData *GetDataFromCache(const TMap<FGameplayTag, TObjectPtr<UZagalaSpecTaggedData>> &Cache, const FGameplayTag &Tag)#

Looks up Tag in Cache.

Parameters:
  • Cache – The tagged data cache to search.

  • Tag – The tag to look up.

Returns:

The valid cached data, or nullptr.

static void SetDataToCache(TMap<FGameplayTag, TObjectPtr<UZagalaSpecTaggedData>> &Cache, UZagalaSpecTaggedData *Data)#

Adds Data to Cache keyed by its assigned tag.

Ignores invalid data.

Parameters:
  • Cache – The tagged data cache to modify.

  • Data – The data to store.

Blueprint-accessible static methods

static UZagalaSpecTaggedData *GetData_BP(const UObject *Object, TSubclassOf<UZagalaSpecTaggedData> DataClass)#

Gets the data for DataClass from Object’s cache.

Parameters:
Returns:

The cached data, or nullptr.

static void SetData_BP(const UObject *Object, UZagalaSpecTaggedData *Data)#

Stores Data in Object’s cache.

Parameters:
static void RemoveData_BP(const UObject *Object, TSubclassOf<UZagalaSpecTaggedData> DataClass)#

Removes the data for DataClass from Object’s cache.

Parameters:
static bool HasData_BP(const UObject *Object, TSubclassOf<UZagalaSpecTaggedData> DataClass)#

Checks whether Object’s cache contains data for DataClass.

Parameters:
Returns:

True when the data exists.

static void CopyData_BP(const UObject *SourceObject, const UObject *DestinationObject, TSubclassOf<UZagalaSpecTaggedData> DataClass)#

Copies data from the source object to the destination object for the specified data class.

Parameters:

Blueprint-accessible static methods (TScriptInterface<IZagalaSpecTaggedDataCacher>)

static UZagalaSpecTaggedData *GetData_Cacher_BP(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Cacher, TSubclassOf<UZagalaSpecTaggedData> DataClass)#

Gets the data for DataClass from Cacher.

Parameters:
  • Cacher – The tagged data cache.

  • DataClass – The tagged data class whose tag is looked up.

Returns:

The cached data, or nullptr.

static void SetData_Cacher_BP(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Cacher, UZagalaSpecTaggedData *Data)#

Stores Data in Cacher.

Parameters:
  • Cacher – The tagged data cache.

  • Data – The data to store.

static void RemoveData_Cacher_BP(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Cacher, TSubclassOf<UZagalaSpecTaggedData> DataClass)#

Removes the data for DataClass from Cacher.

Parameters:
  • Cacher – The tagged data cache.

  • DataClass – The tagged data class whose tag is removed.

static bool HasData_Cacher_BP(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Cacher, TSubclassOf<UZagalaSpecTaggedData> DataClass)#

Checks whether Cacher contains data for DataClass.

Parameters:
  • Cacher – The tagged data cache.

  • DataClass – The tagged data class whose tag is checked.

Returns:

True when the data exists.

static void CopyData_Cacher_BP(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Source, const TScriptInterface<IZagalaSpecTaggedDataCacher> &Destination, TSubclassOf<UZagalaSpecTaggedData> DataClass)#

Copies the data for DataClass from Source to Destination.

Parameters:
  • Source – The cache to read from.

  • Destination – The cache to write to.

  • DataClass – The tagged data class to copy.

C++ typed static template methods

template<TaggedDataTypeConcept TaggedDataType>
static TaggedDataType *GetDataT(const UObject *Object)#

Gets the TaggedDataType data from Object’s cache.

Parameters:

Object – Object implementing IZagalaSpecTaggedDataCacher.

Returns:

The cached data, or nullptr.

template<TaggedDataTypeConcept TaggedDataType>
static void SetDataT(const UObject *Object, TaggedDataType *Data)#

Stores Data in Object’s cache.

Parameters:
template<TaggedDataTypeConcept TaggedDataType>
static void RemoveDataT(const UObject *Object)#

Removes the TaggedDataType data from Object’s cache.

Parameters:

Object – Object implementing IZagalaSpecTaggedDataCacher.

template<TaggedDataTypeConcept TaggedDataType>
static bool HasDataT(const UObject *Object)#

Checks whether Object’s cache contains TaggedDataType data.

Parameters:

Object – Object implementing IZagalaSpecTaggedDataCacher.

Returns:

True when the data exists.

template<TaggedDataTypeConcept TaggedDataType>
static bool CopyDataFromT(const UObject *SourceObject, const UObject *DestinationObject)#

Copies the TaggedDataType data from SourceObject to DestinationObject.

Parameters:
Returns:

True when source data existed and was copied.

C++ typed static template methods (TScriptInterface<IZagalaSpecTaggedDataCacher>)

template<TaggedDataTypeConcept TaggedDataType>
static TaggedDataType *GetDataT(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Cacher)#

Gets the TaggedDataType data from Cacher.

Parameters:

Cacher – The tagged data cache.

Returns:

The cached data, or nullptr.

template<TaggedDataTypeConcept TaggedDataType>
static void SetDataT(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Cacher, TaggedDataType *Data)#

Stores Data in Cacher.

Does nothing when Cacher is null.

Parameters:
  • Cacher – The tagged data cache.

  • Data – The data to store.

template<TaggedDataTypeConcept TaggedDataType>
static void RemoveDataT(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Cacher)#

Removes the TaggedDataType data from Cacher.

Does nothing when Cacher is null.

Parameters:

Cacher – The tagged data cache.

template<TaggedDataTypeConcept TaggedDataType>
static bool HasDataT(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Cacher)#

Checks whether Cacher contains TaggedDataType data.

Parameters:

Cacher – The tagged data cache.

Returns:

True when the data exists; false when Cacher is null.

template<TaggedDataTypeConcept TaggedDataType>
static bool CopyDataFromT(const TScriptInterface<IZagalaSpecTaggedDataCacher> &Source, const TScriptInterface<IZagalaSpecTaggedDataCacher> &Destination)#

Copies the TaggedDataType data from Source to Destination.

Parameters:
  • Source – The cache to read from.

  • Destination – The cache to write to.

Returns:

True when source data existed and was copied.

C++ typed static methods

static const TMap<FGameplayTag, TObjectPtr<UZagalaSpecTaggedData>> &GetCache(const UObject *Object)#

Returns Object’s tagged data cache.

Asserts when Object does not implement IZagalaSpecTaggedDataCacher.

Parameters:

Object – Object implementing IZagalaSpecTaggedDataCacher.

Returns:

The tagged data cache.

static UZagalaSpecTaggedData *GetData(const UObject *Object, const FGameplayTag &Tag)#

Gets the data stored under Tag in Object’s cache.

Parameters:
Returns:

The cached data, or nullptr.

static void SetData(const UObject *Object, UZagalaSpecTaggedData *Data)#

Stores Data in Object’s cache keyed by its assigned tag.

Parameters:
static void RemoveData(const UObject *Object, const FGameplayTag &Tag)#

Removes the data stored under Tag from Object’s cache.

Parameters:
static bool HasData(const UObject *Object, const FGameplayTag &Tag)#

Checks whether Object’s cache contains Tag.

Parameters:
Returns:

True when the data exists.