Class UZagalaSpecFeatureSettings#
Defined in File ZagalaSpecFeatureSettings.h
Inheritance Relationships#
Base Type#
public UDeveloperSettings
Class Documentation#
-
class UZagalaSpecFeatureSettings : public UDeveloperSettings#
Developer settings that control registry caching and scenario lookup for the ZagalaSpec plugin.
All registered regex registries are cached here at module load time via CDO auto-registration, making them visible in the editor and queryable at runtime.
Public Functions
-
UZagalaSpecFeatureSettings(const FObjectInitializer &ObjectInitializer)#
-
const TMap<TObjectPtr<UObject>, FZagalaSpecCachedRegistryEntry> &GetCachedRegistries() const#
Returns all registries that have been cached via CacheRegistry(), keyed by registry singleton.
- Returns:
The cached registry entries.
-
TArray<FZagalaSpecRegexRecord> GetRegexRecordsFor(const UClass *RegistryClass) const#
Returns the persisted regex records of the given registry class, in config order.
- Parameters:
RegistryClass – The registry class whose records are requested.
- Returns:
The matching records.
-
const TArray<FZagalaSpecRegexRecord> &GetRegexRecords() const#
Returns every persisted regex record.
-
void RebuildGlobalGroupDataIndexMap()#
Rebuilds GlobalGroupDataIndexMap from the current GlobalCaptureGroupClasses array.
Call after mutating it through GetGlobalCaptureGroupClassesMutable().
-
const TArray<FZagalaSpecGlobalGroupData> &GetGlobalCaptureGroupClasses() const#
Returns the global capture group entries.
- Returns:
The entries, each bundling the CaptureGroupValue key, GroupValueClass, and ConverterClass.
-
TArray<FZagalaSpecGlobalGroupData> &GetGlobalCaptureGroupClassesMutable()#
Returns the global capture group entries for modification.
Call RebuildGlobalGroupDataIndexMap() after changing the array.
- Returns:
The mutable entries.
-
float GetDebounceDelaySeconds() const#
Delay in seconds before a text step re-matches its definition after an edit.
- Returns:
The debounce delay in seconds value.
-
TArray<FString> GetNamesOfScenarios()#
Returns the names of all scenarios from all features.
Generates cache data if it does not exist.
- Returns:
The scenario tag names registered in the settings.
-
TArray<FString> GetNamesOfScenariosFiltered()#
Returns the names of the scenarios that pass the configured scenario filters.
Uses only the cached filter tags, so no scenario or feature is loaded. Scenarios without filter tags are always returned. Every scenario that is left out is logged to LogAutomationController.
- Returns:
The scenario tag names to list as tests.
-
FGameplayTagContainer GetScenarioFilterTags(const FGameplayTag &ScenarioTag) const#
Returns the cached filter tags of a scenario.
- Parameters:
ScenarioTag – The scenario gameplay tag.
- Returns:
The filter tags, empty when the scenario has none.
-
void SetScenarioFilterTags(const FGameplayTag &ScenarioTag, const FGameplayTagContainer &FilterTags)#
Caches the filter tags of a scenario.
An empty container removes the entry.
- Parameters:
ScenarioTag – The scenario gameplay tag.
FilterTags – The ZagalaSpec.ScenarioFilter tags of the scenario.
-
TArray<TSubclassOf<UObject>> &GetScenarioFilterClassesMutable()#
Returns the classes (implementing IZagalaSpecScenarioFilter) used to filter scenarios for modification.
- Returns:
The mutable filter classes.
-
void PruneScenarioFilterTags()#
Removes cached filter tags of scenarios that are no longer registered, tags that no longer exist and empty entries.
-
TObjectPtr<UObject> GetScenario(const FString &Identifier) const#
Finds a registered scenario by its tag name.
- Parameters:
Identifier – The scenario gameplay tag as a string.
- Returns:
The scenario object, or nullptr when not found.
-
TObjectPtr<UObject> GetScenario(const FGameplayTag &Identifier) const#
Finds a registered scenario by its tag.
- Parameters:
Identifier – The scenario gameplay tag.
- Returns:
The scenario object, or nullptr when not found.
-
TObjectPtr<UObject> GetFeatureForScenario(const FGameplayTag &ScenarioTag) const#
Resolves or loads the feature that owns the given scenario tag.
- Parameters:
ScenarioTag – The scenario gameplay tag.
- Returns:
The feature object, or nullptr when not registered.
-
TObjectPtr<UObject> GetFeatureForScenario(const FString &Identifier) const#
Resolves or loads the feature that owns the given scenario tag name.
- Parameters:
Identifier – The scenario gameplay tag as a string.
- Returns:
The feature object, or nullptr when not registered.
-
TObjectPtr<UObject> GetFeatureForScenario(TObjectPtr<UObject> Scenario) const#
Finds the feature for a scenario by its tag, falling back to the scenario’s typed outer.
- Parameters:
Scenario – Object implementing IZagalaSpecDescriptor.
- Returns:
The feature object, or nullptr when not found.
-
virtual void PostInitProperties() override#
-
virtual void BeginDestroy() override#
-
void UpdateScenariosFor(const TObjectPtr<UObject> Feature)#
Registers the feature’s scenarios that are included in tests and removes stale scenario entries.
- Parameters:
Feature – Object implementing IZagalaSpecFeature and IZagalaSpecTestabilityIndicator.
-
void OnAssetRemoved(const FAssetData &AssetData)#
Removes deleted features from the maps and unregisters the regex records of deleted entry assets.
- Parameters:
AssetData – The removed asset.
-
void OnAssetRenamed(const FAssetData &AssetData, const FString &OldObjectPath)#
Moves a renamed or moved feature to its new path in the maps, and moves the regex records of a renamed or moved entry asset to its new class default object path.
- Parameters:
AssetData – The asset at its new location.
OldObjectPath – The object path of the asset before the rename.
-
bool AddRegexRecord(const FZagalaSpecRegexRecord &Record)#
Persists a regex record.
The first record for a registry and pattern wins.
- Parameters:
Record – The record to add.
- Returns:
true if the pattern is recorded for Record.Entry after the call.
-
bool RemoveRegexRecord(const FSoftClassPath &Registry, const FString &Pattern)#
Removes the persisted record of a pattern.
- Parameters:
Registry – The registry class that holds the pattern.
Pattern – The pattern to remove.
- Returns:
true if a record was removed.
-
int32 RemoveRegexRecordsForEntry(const FSoftClassPath &Registry, const FSoftObjectPath &Entry)#
Removes every persisted record owned by an entry in the given registry.
- Parameters:
Registry – The registry class that holds the patterns.
Entry – The soft path of the entry.
- Returns:
The number of records removed.
-
void CleanDanglingRegexRecords()#
Removes records whose entry package no longer exists, for assets deleted outside the editor.
-
void CleanDanglingFeatures()#
Useful to remove features where their assets were deleted outside the editor.
-
void CleanDanglingScenarios()#
Useful to remove scenarios where their features were deleted outside the editor.
-
void RemoveInvalidFeature(FSoftObjectPath SoftFeature)#
Remove feature and its scenarios tags from maps.
- Parameters:
SoftFeature – Path of the feature asset to remove.
-
virtual void PostEditChangeProperty(FPropertyChangedEvent &PropertyChangedEvent) override#
Detects RegexText changes and triggers the search.
-
void FillBestMatchesForSearch()#
Adds every cached pattern that contains RegexText to AvailablePatterns.
-
void TryFillExactMatchForSearch()#
Adds the first cached registry pattern that matches RegexText to AvailablePatterns.
-
void BeginConfigWriteBatch()#
Opens a deferred config write batch.
Prefer FZagalaSpecConfigWriteBatch.
-
void EndConfigWriteBatch()#
Closes a batch; the outermost close writes the config file once if anything requested a write.
Public Static Functions
-
static UZagalaSpecFeatureSettings &GetFeatureSettingsMutable()#
Returns the mutable settings CDO.
- Returns:
The mutable settings default object.
-
static const UZagalaSpecFeatureSettings &GetFeatureSettings()#
Returns the read-only settings CDO.
- Returns:
The read-only settings default object.
-
static void CacheRegistry(const UObject *Registry)#
Caches a registry object so it appears in the editor and can be queried at runtime.
Called automatically from UZagalaSpecDefaultRegexRegistry::PostInitProperties() for each subclass CDO and from Register() after a successful registration to keep the snapshot in sync.
- Parameters:
Registry – The registry singleton to cache (TMap::Add overwrites any existing entry).
-
static void ClearCachedRegistries()#
Removes all cached registry entries from the settings CDO.
-
static const FZagalaSpecGlobalGroupData *FindGlobalGroupClass(const FString &Key)#
Looks up Key in GlobalCaptureGroupClasses and returns the matching entry, or nullptr if not found.
Called automatically from UZagalaSpecCaptureGroupData::OnCaptureGroupValueSet() when Scope is Global.
- Parameters:
Key – The capture group value to look up.
- Returns:
The matching global group data, or nullptr.
-
static UClass *GetDefaultStepClass()#
Returns the configured default step class.
- Returns:
The DefaultStepClass setting.
-
static UClass *GetDefaultScenarioClass()#
Returns the configured default scenario class.
- Returns:
The DefaultScenarioClass setting.
-
static UClass *GetDefaultFeatureClass()#
Returns the default feature class asset for the ZagalaSpec plugin.
Used by exporters/importers to create new feature assets when specified. Also used by ZagalaSpecEditor to resolve the feature asset it needs to display or edit.
- Returns:
The configured feature class, or nullptr when none is set.
-
static UClass *GetDefaultExecutionContextClass()#
Returns the default execution context class asset for the ZagalaSpec plugin.
- Returns:
The configured execution context class.
-
static UClass *GetDefaultCaptureGroupConverterClass()#
Returns the default capture group converter class asset for the ZagalaSpec plugin.
- Returns:
The configured converter class.
Protected Attributes
-
TArray<FZagalaSpecGlobalGroupData> GlobalCaptureGroupClasses#
Each entry bundles the CaptureGroupValue key, GroupValueClass, and ConverterClass.
Used by UZagalaSpecCaptureGroupData when Scope is set to Global.
-
UZagalaSpecFeatureSettings(const FObjectInitializer &ObjectInitializer)#