// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Templates/NonNullPointer.h" #include "Widgets/IReflectionDataProvider.h" namespace UE::UndoHistory { /** Just uses LoadObject to look up class data. Works on editor builds but not on most programs, like MultiUserServer. */ class FClassLookupReflectionDataProvider : public IReflectionDataProvider { public: //~ Begin IReflectionDataProvider Interface virtual bool HasClassDisplayName(const FSoftClassPath& ClassPath) const override; virtual TOptional GetClassDisplayName(const FSoftClassPath& ClassPath) const override; virtual bool SupportsGetPropertyReflectionData() const override { return true; } virtual TOptional GetPropertyReflectionData(const FSoftClassPath& ClassPath, FName PropertyName) const override; //~ End IReflectionDataProvider Interface private: TOptional> LookUpClass(const FSoftClassPath& ClassPath) const; TOptional> LookUpProperty(const FSoftClassPath& ClassPath, FName PropertyName) const; EPropertyType GetPropertyType(const FProperty& Property) const; }; }