Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::SettingsRegistryOriginTracker Class Reference

Classes

struct  SettingsRegistryOrigin
 

Public Types

using TrackingFilterCallback = AZStd::function< bool(AZStd::string_view keyPath)>
 
using SettingsRegistryOriginStack = AZStd::deque< SettingsRegistryOrigin >
 
using OriginVisitorCallback = AZStd::function< bool(const SettingsRegistryOrigin &)>
 

Public Member Functions

 AZ_TYPE_INFO (SettingsRegistryOriginTracker, "{F6E3B4E5-F8CF-43D8-8609-BC322D9D08C5}")
 
 SettingsRegistryOriginTracker (AZ::SettingsRegistryInterface &registry)
 
void SetTrackingFilter (TrackingFilterCallback filterCallback)
 
AZ::SettingsRegistryInterfaceGetSettingsRegistry ()
 Gets setting registry being tracked.
 
const AZ::SettingsRegistryInterfaceGetSettingsRegistry () const
 
bool FindLastOrigin (AZ::IO::Path &originPath, AZStd::string_view key) const
 Returns the last origin associated with the given key.
 
void VisitOrigins (AZStd::string_view key, const OriginVisitorCallback &visitCallback) const
 

Member Typedef Documentation

◆ OriginVisitorCallback

Origin Visitor is callback is invoked for each setting key found during the VisitOrigins method

Parameters
settingsRegistryOriginentry being visited
Returns
True indicates to iterate to the next file origin at the specified settings key path that was updated before the current origin

i.e if there the key "/O3DE" was merged first from <build-dir>/bin/profile/Registry/a.setreg and then <engine-root>/Registry/b.setreg, there will will be two entries in the origin stack "/O3DE": ["<engine-root>/Registry/b.setreg", <build-dir>/bin/profile/Registry/a.setreg"] The most recently set origin will be visited first.

◆ TrackingFilterCallback

TrackingFilterCallback will be invoked with the JSON settings key being updated It should return true if the key at that JSON path should be tracked

Member Function Documentation

◆ SetTrackingFilter()

void AZ::SettingsRegistryOriginTracker::SetTrackingFilter ( TrackingFilterCallback  filterCallback)

Sets functions which will be used to filter which settings should be tracked If empty, all settings within the associated registry will be tracked

◆ VisitOrigins()

void AZ::SettingsRegistryOriginTracker::VisitOrigins ( AZStd::string_view  key,
const OriginVisitorCallback visitCallback 
) const

Visit all settings keys that are at specified key path and any children in the DomPrefixTree and invoke the supplied callback with the visit key and the SettingsRegistryOriginStack Visitation happens from the most recent origin for a setting key to least recent


The documentation for this class was generated from the following file: