/ Source / ReasonablePlanningAIEditor / Public / ComposerStateQueryCustom.h
ComposerStateQueryCustom.h
 1  // Copyright (C) 2025 Radaway Software LLC. All Rights Reserved.
 2  
 3  #pragma once
 4  
 5  #include "CoreMinimal.h"
 6  
 7  /**
 8   * When using an abstract base class within a collection, resolve the most child class declaration of the implementation
 9   * and use that property customization instead.
10   */
11  class REASONABLEPLANNINGAIEDITOR_API ComposerStateQueryCustom : public IPropertyTypeCustomization
12  {
13  public:
14  
15     /** IPropertyTypeCustomization **/
16     virtual void CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
17     virtual void CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
18  
19     static TSharedRef<IPropertyTypeCustomization> MakeInstance();
20  
21     /**
22     * Cannot utilize property module becuase the necessary methods are not exported.
23     **/
24     static void AddChildCustomization(const FName Name, TSharedRef<IPropertyTypeCustomization> Customization);
25  
26  private:
27     static TMap<FName, TSharedRef<IPropertyTypeCustomization>> Customizations;
28  };