I'm a doctor, not a mechanic

UE3:UIDataProvider (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UIDataProvider
Package: 
Engine
Direct subclasses:
UIConfigProvider, UIDataStore, UTUIDataProvider_SimpleElementProvider, UIDataProvider_OnlinePlayerDataBase, UIDataProvider_OnlineProfileSettingsArray, UIDataProvider_SettingsArray, UIDynamicFieldProvider, UIPropertyDataProvider, UTUIDataProvider_CharacterFaction, UTUIDataProvider_CharacterPart, UTUIDataProvider_Character
This class in other games:
UDK

Base class for all classes which provide data stores with data about specific instances of a particular data type.

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved

Properties[edit]

ProviderChangedNotifies[edit]

Type: array<delegate<OnDataProviderPropertyChange> >

The list of delegates to call when data exposed by this provider has been updated.

Todo: change into a map of property name => delegate, so that when a property name is passed to NotifyPropertyChanged, only those delegates are called.

WriteAccessType[edit]

Type: EProviderAccessType

Determines whether/how subscribers to this data store are allowed to publish changes to property values.

Enums[edit]

EProviderAccessType[edit]

Types of write access that data providers can specify.

ACCESS_ReadOnly 
no fields are writeable - readonly
ACCESS_WriteAll 
all fields are writeable

Structs[edit]

UIDataProviderField[edit]

Modifiers: native, transient

Contains data about a single data field exposed by this data provider.

name FieldTag 
the tag used to access this field
UIRoot.EUIDataProviderFieldType FieldType 
the type of field this tag corresponds to
array<UIDataProvider> FieldProviders 
The list of providers associated with this field. Only relevant if FieldType is DATATYPE_Provider or

DATATYPE_ProviderCollection. If FieldType is DATATYPE_Provider, the list should contain only one element.

Delegates[edit]

OnDataProviderPropertyChange[edit]

delegate OnDataProviderPropertyChange (UIDataProvider SourceProvider, optional name PropTag)

Delegate that notifies that a property has changed Intended only for use between data providers and their owning data stores. For external notifications, use the callbacks in UIDataStore instead.

Parameters:

  • SourceProvider - the data provider that generated the notification
  • PropTag - the property that changed

Functions[edit]

Events[edit]

GenerateFillerData[edit]

event string GenerateFillerData (string DataTag)

Callback to allow script-only child classes to return filler data for their own data fields.

Parameters:

  • DataTag - the tag corresponding to the data field that we want filler data for

Returns:

a string of made-up data which is indicative of the typical values for the specified field.

GenerateScriptMarkupString[edit]

event string GenerateScriptMarkupString (name DataTag)

Callback to allow script-only child classes to generate a markup string for their own data fields. Called from the native implementation of GenerateDataMarkupString if the tag specified doesn't correspond to any tags in the data store.

Parameters:

  • DataTag - the data field tag to generate the markup string for

Returns:

a datastore markup string which resolves to the datastore field associated with DataTag, in the format: <DataStoreTag:DataFieldTag>

GetFieldValue[edit]

event bool GetFieldValue (string FieldName, out UIRoot.UIProviderScriptFieldValue FieldValue, optional int ArrayIndex)

Resolves the value of the data field specified and stores it in the output parameter.

Parameters:

  • FieldName - the data field to resolve the value for; guaranteed to correspond to a property that this provider can resolve the value for (i.e. not a tag corresponding to an internal provider, etc.)
  • out_FieldValue - receives the resolved value for the property specified.
  • ArrayIndex - optional array index for use with data collections

Returns:

TRUE to indicate that this value was processed by script.

See: ParseDataStoreReference for additional notes

GetSupportedScriptFields[edit]

event GetSupportedScriptFields (out array<UIDataProviderFieldout_Fields)

Callback to allow script-only child classes to add their own supported tags when GetSupportedDataFields is called.

Parameters:

  • out_Fields - the list of data tags supported by this data store.

NotifyPropertyChanged[edit]

event NotifyPropertyChanged (optional name PropTag)

Iterates over the list of subscribed delegates and fires off the event. Called whenever the value of a field managed by this data provider is modified.

Parameters:

  • PropTag - the name of the property that changed

SetFieldValue[edit]

event bool SetFieldValue (string FieldName, const out UIRoot.UIProviderScriptFieldValue FieldValue, optional int ArrayIndex)

Resolves the value of the data field specified and stores the value specified to the appropriate location for that field.

Parameters:

  • FieldName - the data field to resolve the value for; guaranteed to correspond to a property that this provider can resolve the value for (i.e. not a tag corresponding to an internal provider, etc.)
  • FieldValue - the value to store for the property specified.
  • ArrayIndex - optional array index for use with data collections

Returns:

TRUE to indicate that this value was processed by script.

Other instance functions[edit]

AddPropertyNotificationChangeRequest[edit]

protected final function AddPropertyNotificationChangeRequest (delegate<OnDataProviderPropertyChangeInDelegate)

Subscribes a function for receiving notifications that a property in this data provider has changed. Intended only for use between data providers and their owning data stores. For external notifications, use the callbacks in UIDataStore instead.

Parameters:

  • InDelegate - the delegate to add to the notification list

RemovePropertyNotificationChangeRequest[edit]

protected final function RemovePropertyNotificationChangeRequest (delegate<OnDataProviderPropertyChangeInDelegate)

Removes the delegate from the notification list

Parameters:

  • InDelegate - the delegate to remove from the list