| TNiagaraViewModelManager
|
Module |
|
Header |
/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Public/ViewModels/TNiagaraViewModelManager.h |
Include |
#include "ViewModels/TNiagaraViewModelManager.h" |
template<class ObjectType, class ViewModelType>
class TNiagaraViewModelManager
A helper class to allow us to hook up Niagara view model types with the source models that they are currently observing. The assumption is that a ViewModel class will register and unregister the correct the model during its lifetime. Since it is possible that the ViewModel will hold onto the Model with a weak object pointer, we keep track of the registered pair using a separate data structure (aka Handle). You can only unregister with a valid handle. It is possible for a Model to be pointed to by multiple simultaneous ViewModels (like say event handler scripts). If this happens, you can query the additional ViewModels in the GetExistingViewModelForObject method.
Name | Description | ||
---|---|---|---|
|
CleanAll() |
Called by a module manager to ensure that all known references have been cleared out before module shutdown. |
|
|
GetAllViewModelsForObject ( |
||
|
TSharedPtr< ... |
GetExistingViewModelForObject ( |
Query to determine if any ViewModel is currently pointing at this Model. |
|
RegisterViewModelWithMap ( |
Called to register a specific Model/ViewModel pair. |
|
|
UnregisterViewModelWithMap ( |
Called to forget about a specific Model/ViewModel pair. |
Name |
Description |
|
---|---|---|
|
Handle |
Name |
Description |
---|---|
ObjectsToViewModels |