Navigation
API > API/Plugins > API/Plugins/ModelViewViewModel
Shared data to find or create a ViewModel at runtime.
| Name | FMVVMViewClass_Source |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/ModelViewViewModel/Source/ModelViewViewModel/Public/View/MVVMViewClass.h |
| Include Path | #include "View/MVVMViewClass.h" |
Syntax
USTRUCT ()
struct FMVVMViewClass_Source
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Bindings | TArray< FMVVMViewClass_SourceBinding > | All the bindings this source need to execute at initialization (OneTime) And the bindings that needs to execute when the FieldId matches (OneWay). | View/MVVMViewClass.h |
|
| Conditions | TArray< FMVVMViewClass_SourceCondition > | All the conditions that need to execute when Field value changes. | View/MVVMViewClass.h |
|
| ExpectedSourceType | TSubclassOf< UObject > | Class type to create a source at runtime. | View/MVVMViewClass.h |
|
| FieldPath | FMVVMVCompiledFieldPath | A resolvable path to retrieve the source instance at runtime. | View/MVVMViewClass.h |
|
| FieldToRegisterTo | TArray< FMVVMViewClass_FieldId > | All the fields that the view need to register to for this source. | View/MVVMViewClass.h |
|
| Flags | uint16 | View/MVVMViewClass.h |
|
|
| GlobalViewModelInstance | FMVVMViewModelContext | Info to find the ViewModel instance at runtime. | View/MVVMViewClass.h |
|
| PropertyName | FName | View/MVVMViewClass.h |
|
|
| Resolver | TObjectPtr< UMVVMViewModelContextResolver > | The resolver to fetch the source at runtime. | View/MVVMViewClass.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AlwaysExecuteBindingsOnSetSource() |
When a source is manually set, then always execute that source the bindings. | View/MVVMViewClass.h | |
bool CanBeEvaluated() |
The source "GetOrCreateInstance" can be reevaluated. | View/MVVMViewClass.h | |
bool CanBeSet() |
Can be set at runtime from SetViewModel. | View/MVVMViewClass.h | |
const TArrayView< const FMVVMViewClass_SourceBinding > GetBindings() |
The list of bindings owns by the source. A binding can be owns by more than one source. | View/MVVMViewClass.h | |
const TArrayView< const FMVVMViewClass_SourceCondition > GetConditions() |
View/MVVMViewClass.h | ||
const TArrayView< const FMVVMViewClass_FieldId > GetFieldIds () |
FieldId owns by the source that we need to register to. | View/MVVMViewClass.h | |
TScriptInterface< INotifyFieldValueChanged > GetGlobalCollectionViewModel
(
UUserWidget* UserWidget |
Returns the viewmodel inside the global viewmodel collection. | View/MVVMViewClass.h | |
FName GetName() |
The name of the source. | View/MVVMViewClass.h | |
UObject * GetOrCreateInstance
(
const UMVVMViewClass* ViewClass, |
Get or create the instance used to register the bindings. | View/MVVMViewClass.h | |
UClass * GetSourceClass() |
The expected class of the source. | View/MVVMViewClass.h | |
FName GetUserWidgetPropertyName() |
The name of the UserWidget's property. | View/MVVMViewClass.h | |
bool HasEvaluateBindings() |
The source has at least one evaluate binding. | View/MVVMViewClass.h | |
bool HasTickBindings() |
The source has at least one binding that need to be tick every frame. | View/MVVMViewClass.h | |
bool IsOptional () |
The source GetOrCreateInstance can fail. | View/MVVMViewClass.h | |
bool IsUserWidget() |
The source is the UserWidget. | View/MVVMViewClass.h | |
bool IsUserWidgetProperty() |
The source is UserWidget's property. | View/MVVMViewClass.h | |
bool IsViewModel() |
The source is a viewmodel added in the editor. | View/MVVMViewClass.h | |
| The source is not needed anymore. | View/MVVMViewClass.h | ||
bool RequireGlobalViewModelCollectionUpdate() |
The source has at least one evaluate binding. | View/MVVMViewClass.h | |
bool RequireSettingUserWidgetProperty() |
The UserWidget's property need to be set/reset when the Source is created/release. | View/MVVMViewClass.h |