There is no spoon
UE3:UIDataStore (UT3)
Object >> UIRoot >> UIDataProvider >> UIDataStore |
Contents
- Package:
- Engine
- Direct subclasses:
- UIDataStore_GameState, UTUIDataStore_StringList, UIDataStore_Registry, UIDataStore_GameResource, UIDataStore_Fonts, SceneDataStore, UIDataStore_Color, UIDataStore_Gamma, UIDataStore_Images, UIDataStore_Remote, UIDataStore_Settings, UIDataStore_StringAliasMap, UIDataStore_Strings, UISkin, UTUIDataStore_Content, UTUIDataStore_CustomChar, UTUIDataStore_2DStringList
- This class in other games:
- UDK
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Base for classes which provide data to the UI subsystem. A data store is how the UI references data in the game. Data stores allow the UI to reference game data in a safe manner, since they encapsulate lifetime management. A data store can be either persistent, in which case it is attached directly to the UIInteraction object and is available to all widgets, or it can be temporary, in which case it is attached to the current scene and is only accessible to the widgets contained by that scene.
Persistent data stores might track information such as UI data for all gametypes or characters. Temporary data stores might track stuff like the name that was entered into some UI value widget. Data stores can provide static information, such as the names of all gametypes, or dynamic information, such as the name of the current gametype.
Copyright 1998-2007 Epic Games, Inc. All Rights Reserved
Properties[edit]
RefreshSubscriberNotifies[edit]
Type: array<delegate<OnDataStoreValueUpdated> >
the list of delegates to call when data exposed by this data store has been updated
Tag[edit]
Type: name
The name used to access this datastore
Delegates[edit]
OnDataStoreValueUpdated[edit]
This delegate is called whenever the values exposed by this data store have been updated. Provides data stores with a way to notify subscribers when they should refresh their values from this data store.
Parameters:
- SourceDataStore - the data store that generated the refresh notification
- bValuesInvalidated - TRUE if the data values were completely invalidated; suggest a full refresh rather than an update (i.e. in lists)
- PropertyTag - the tag associated with the data field that was updated.
- SourceProvider - for data stores which contain nested providers, the provider that contains the data which changed.
- ArrayIndex - for collection fields, indicates which element was changed. value of INDEX_NONE indicates not an array or that the entire array was updated.
Functions[edit]
Native functions[edit]
OnCommit[edit]
Notifies the data store that all values bound to this data store in the current scene have been saved. Provides data stores which perform buffered or batched data transactions with a way to determine when the UI system has finished writing data to the data store.
Note: for now, this lives in UIDataStore, but it might make sense to move it up to UIDataProvider later on.
Events[edit]
RefreshSubscribers[edit]
Loops through the subscriber notify list and calls the delegate letting the subscriber know to refresh their value.
Parameters:
- PropertyTag - the tag associated with the data field that was updated.
- SourceProvider - for data stores which contain nested providers, the provider that contains the data which changed.
- ArrayIndex - for collection fields, indicates which element was changed. value of INDEX_NONE indicates not an array or that the entire array was updated.
Registered[edit]
Called when this data store is added to the data store manager's list of active data stores.
Parameters:
- PlayerOwner - the player that will be associated with this DataStore. Only relevant if this data store is associated with a particular player; NULL if this is a global data store.
SubscriberAttached[edit]
Notification that a subscriber is using a value from this data store. Adds the subscriber's RefreshSubscriberValue method to this data store's list of refresh notifies so that the subscriber can refresh its value when the data store's value changes.
Parameters:
- Subscriber - the subscriber that attached to the data store.
SubscriberDetached[edit]
Notification that a subscriber is no longer using any values from this data store. Removes the subscriber's RefreshSubscriberValue method from this data store's list of refresh notifies so that the subscriber no longer refreshes its value when the data store's value changes.
Parameters:
- Subscriber - the subscriber that detached from the data store.
Unregistered[edit]
Called when this data store is removed from the data store manager's list of active data stores.
Parameters:
- PlayerOwner - the player that will be associated with this DataStore. Only relevant if this data store is associated with a particular player; NULL if this is a global data store.
Other instance functions[edit]
GetDataStoreClient[edit]
Returns a reference to the global data store client, if it exists.
Returns:
- the global data store client for the game.
NotifyGameSessionEnded[edit]
Called when the current map is being unloaded. Cleans up any references which would prevent garbage collection.
Returns:
- TRUE indicates that this data store should be automatically unregistered when this game session ends.