// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #pragma once #include "SharedPointer.h" class FNiagaraConvertNodeViewModel; class FNiagaraConvertPinSocketViewModel; class UEdGraphPin; /** A view model for a pin in a convert node. */ class FNiagaraConvertPinViewModel : public TSharedFromThis { public: FNiagaraConvertPinViewModel(TSharedRef InOwnerConvertNodeViewModel, UEdGraphPin& InGraphPin); /** Gets the id for the pin. */ FGuid GetPinId() const; /** Gets the graph pin which is represented by this view model. */ UEdGraphPin& GetGraphPin(); /** Gets the root socket view models for the socket tree which represents the properties on the type this pin represents. */ const TArray>& GetSocketViewModels(); /** Gets the convert node view model which owns this pin view model. */ TSharedPtr GetOwnerConvertNodeViewModel(); private: /** Rebuilds the socket view models. */ void RefreshSocketViewModels(); private: /** The convert node view model which owns this view model. */ TWeakPtr OwnerConvertNodeViewModel; /** The graph pin which this view model represents. */ UEdGraphPin& GraphPin; /** When true the socket view models need to be rebuilt. */ bool bSocketViewModelsNeedRefresh; /** The root socket view models for the socket tree which represents the properties on the type this pin represents. */ TArray> SocketViewModels; };