Class UZagalaSpecDefaultCaptureGroupConverter#

Inheritance Relationships#

Base Types#

Class Documentation#

class UZagalaSpecDefaultCaptureGroupConverter : public UObject, public IZagalaSpecCaptureGroupConverter#

Default implementation of a capture group converter.

Converts capture group data into tagged data instances (UZagalaSpecTaggedData). ValueTaggedDataType is used if no ObjectTaggedDataType is specified. It stores the string value of the capture group into a tagged data instance via IZagalaSpecValueStore. ObjectTaggedDataType injects an object into a tagged data instance via IZagalaSpecObjectInjector. The conversion is as follows (in order):

  1. The object evaluation is as follows if ObjectTaggedDataType is specified (in order):

  • If the capture group has a valid GroupValueObject, then GroupValueObject is the injected object. If GroupValueObject is a blueprint, we store the CDO of the generated class.

  • If the capture group is in Local scope with bModifyCachedObject set to true, a duplicate of the CachedObject is created and injected.

  • If the capture group has a valid GroupValueClass, a new object of that class is created and injected.

  • If none of the above conditions are met, the object is not injected and the conversion falls back to ValueTaggedDataType if available.

  1. The value evaluation is as follows if ValueTaggedDataType is specified (in order):

  1. If both object and value evaluation fail, a fallback approach is used (in order):

  • If GroupValueClass derives from UZagalaSpecTaggedData, a new instance of that class is created and used as the fallback tagged data instance.

  • If none of the above conditions are met, the fallback tagged data instance is not created, and the conversion returns nullptr.

Public Functions

virtual UZagalaSpecTaggedData *ConvertCaptureGroupData_Implementation(const FZagalaSpecCaptureGroupSnapshot &Snapshot, UObject *Owner) const override#

Converts a capture group snapshot into a new tagged data object.

Parameters:
  • Snapshot – The capture group snapshot to convert.

  • Owner – The outer used for any objects created during the conversion.

Returns:

The generated tagged data, or nullptr if the snapshot could not be converted.

void SetValueTaggedDataType(TSoftClassPtr<UZagalaSpecTaggedData> NewType)#

Sets ValueTaggedDataType; clears it when the class does not implement IZagalaSpecValueStore.

Parameters:

NewType – The tagged data class used to store the capture group string value.

void SetObjectTaggedDataType(TSoftClassPtr<UZagalaSpecTaggedData> NewType)#

Sets ObjectTaggedDataType; clears it when the class does not implement IZagalaSpecObjectInjector.

Parameters:

NewType – The tagged data class used to inject the capture group object.

Protected Functions

UZagalaSpecTaggedData *TryConvertToObjectTaggedData(const FZagalaSpecCaptureGroupSnapshot &Snapshot, UObject *Owner) const#

Creates tagged data from ObjectTaggedDataType and injects the resolved capture group object, or instantiates GroupValueClass directly when it implements IZagalaSpecObjectInjector.

Parameters:
  • Snapshot – The capture group data to convert.

  • Owner – Outer for the created objects.

Returns:

The created tagged data, or nullptr when neither class applies.

UZagalaSpecTaggedData *TryConvertToValueTaggedData(const FZagalaSpecCaptureGroupSnapshot &Snapshot, UObject *Owner) const#

Creates tagged data from ValueTaggedDataType, or from GroupValueClass when it implements IZagalaSpecValueStore, and stores the capture group string value in it.

Parameters:
  • Snapshot – The capture group data to convert.

  • Owner – Outer for the created object.

Returns:

The created tagged data, or nullptr when neither class applies.

UZagalaSpecTaggedData *TryConvertToTaggedData(const FZagalaSpecCaptureGroupSnapshot &Snapshot, UObject *Owner) const#

Instantiates GroupValueClass when it is a UZagalaSpecTaggedData subclass.

Parameters:
  • Snapshot – The capture group data to convert.

  • Owner – Outer for the created object.

Returns:

The created tagged data, or nullptr when GroupValueClass is null or not tagged data.

Protected Attributes

TSoftClassPtr<UZagalaSpecTaggedData> ObjectTaggedDataType#

The class type of tagged data that will be used to store the capture group value as an object.

Takes precedence over ValueTaggedDataType if both are specified. Needs to implement IZagalaSpecObjectInjector to inject the object into the tagged data instance.

TSoftClassPtr<UZagalaSpecTaggedData> ValueTaggedDataType#

The class type of tagged data that will be used to store the capture group value as a string.

Used if ObjectTaggedDataType is not specified. Needs to implement IZagalaSpecValueStore to store the string value into the tagged data instance.