|
@@ -0,0 +1,129 @@
|
|
|
+// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
+
|
|
|
+#pragma once
|
|
|
+
|
|
|
+#include "CoreMinimal.h"
|
|
|
+#include "UObject/Object.h"
|
|
|
+//#include "EzAbilityEditorPropertyBindings.generated.h"
|
|
|
+
|
|
|
+// /**
|
|
|
+// * Editor representation of a all property bindings in a StateTree
|
|
|
+// */
|
|
|
+// USTRUCT()
|
|
|
+// struct EZABILITYEDITOR_API FEzAbilityEditorPropertyBindings
|
|
|
+// {
|
|
|
+// GENERATED_BODY()
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Adds binding between source and destination paths. Removes any bindings to TargetPath before adding the new one.
|
|
|
+// * @param SourcePath Binding source property path.
|
|
|
+// * @param TargetPath Binding target property path.
|
|
|
+// */
|
|
|
+// void AddPropertyBinding(const FEzAbilityPropertyPath& SourcePath, const FEzAbilityPropertyPath& TargetPath);
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Removes all bindings to target path.
|
|
|
+// * @param TargetPath Target property path.
|
|
|
+// */
|
|
|
+// void RemovePropertyBindings(const FEzAbilityPropertyPath& TargetPath);
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * @param TargetPath Target property path.
|
|
|
+// * @return True of the target path has any bindings.
|
|
|
+// */
|
|
|
+// bool HasPropertyBinding(const FEzAbilityPropertyPath& TargetPath) const;
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Copies property bindings from an existing struct to another.
|
|
|
+// * Overrides a binding to a specific property if it already exists in ToStructID.
|
|
|
+// * @param FromStructID ID of the struct to copy from.
|
|
|
+// * @param ToStructID ID of the struct to copy to.
|
|
|
+// */
|
|
|
+// void CopyBindings(const FGuid FromStructID, const FGuid ToStructID);
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * @return Source path for given target path, or null if binding does not exists.
|
|
|
+// */
|
|
|
+// const FEzAbilityPropertyPath* GetPropertyBindingSource(const FEzAbilityPropertyPath& TargetPath) const;
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Returns all bindings for a specified structs based in struct ID.
|
|
|
+// * @param StructID ID of the struct to find bindings for.
|
|
|
+// * @param OutBindings Bindings for specified struct.
|
|
|
+// */
|
|
|
+// void GetPropertyBindingsFor(const FGuid StructID, TArray<FEzAbilityPropertyPathBinding>& OutBindings) const;
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Removes bindings which do not point to valid structs IDs.
|
|
|
+// * @param ValidStructs Set of struct IDs that are currently valid.
|
|
|
+// */
|
|
|
+// void RemoveUnusedBindings(const TMap<FGuid, const FStateTreeDataView>& ValidStructs);
|
|
|
+//
|
|
|
+// /** @return true if any of the bindings references any of the Structs. */
|
|
|
+// bool ContainsAnyStruct(const TSet<const UStruct*>& Structs);
|
|
|
+//
|
|
|
+// /** @return array view to all bindings. */
|
|
|
+// TConstArrayView<FEzAbilityPropertyPathBinding> GetBindings() const { return PropertyBindings; }
|
|
|
+//
|
|
|
+// TArrayView<FEzAbilityPropertyPathBinding> GetMutableBindings() { return PropertyBindings; }
|
|
|
+//
|
|
|
+// private:
|
|
|
+//
|
|
|
+// UPROPERTY()
|
|
|
+// TArray<FEzAbilityPropertyPathBinding> PropertyBindings;
|
|
|
+// };
|
|
|
+//
|
|
|
+//
|
|
|
+// UINTERFACE(MinimalAPI, meta = (CannotImplementInterfaceInBlueprint))
|
|
|
+// class UEzAbilityEditorPropertyBindingsOwner : public UInterface
|
|
|
+// {
|
|
|
+// GENERATED_UINTERFACE_BODY()
|
|
|
+// };
|
|
|
+//
|
|
|
+// class EZABILITYEDITOR_API IEzAbilityEditorPropertyBindingsOwner
|
|
|
+// {
|
|
|
+// GENERATED_IINTERFACE_BODY()
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Returns structs within the owner that are visible for target struct.
|
|
|
+// * @param TargetStructID Target struct ID
|
|
|
+// * @param OutStructDescs Result descriptors of the visible structs.
|
|
|
+// */
|
|
|
+// virtual void GetAccessibleStructs(const FGuid TargetStructID, TArray<FEzAbilityBindableStructDesc>& OutStructDescs) const PURE_VIRTUAL(IEzAbilityEditorPropertyBindingsOwner::GetAccessibleStructs, return; );
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Returns struct descriptor based on struct ID.
|
|
|
+// * @param StructID Target struct ID
|
|
|
+// * @param OutStructDesc Result descriptor.
|
|
|
+// * @return True if struct found.
|
|
|
+// */
|
|
|
+// virtual bool GetStructByID(const FGuid StructID, FEzAbilityBindableStructDesc& OutStructDesc) const PURE_VIRTUAL(IEzAbilityEditorPropertyBindingsOwner::GetStructByID, return false; );
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Returns data view based on struct ID.
|
|
|
+// * @param StructID Target struct ID
|
|
|
+// * @param OutDataView Result data view.
|
|
|
+// * @return True if struct found.
|
|
|
+// */
|
|
|
+// virtual bool GetDataViewByID(const FGuid StructID, FEzAbilityDataView& OutDataView) const PURE_VIRTUAL(IEzAbilityEditorPropertyBindingsOwner::GetDataViewByID, return false; );
|
|
|
+//
|
|
|
+// /** @return Pointer to editor property bindings. */
|
|
|
+// virtual FEzAbilityEditorPropertyBindings* GetPropertyEditorBindings() PURE_VIRTUAL(IEzAbilityEditorPropertyBindingsOwner::GetPropertyEditorBindings, return nullptr; );
|
|
|
+// };
|
|
|
+//
|
|
|
+// // TODO: We should merge this with IEzAbilityEditorPropertyBindingsOwner and FEzAbilityEditorPropertyBindings.
|
|
|
+// // Currently FStateTreeEditorPropertyBindings is meant to be used as a member for just to store things,
|
|
|
+// // IStateTreeEditorPropertyBindingsOwner is meant return model specific stuff,
|
|
|
+// // and IStateTreeBindingLookup is used in non-editor code and it cannot be in FStateTreeEditorPropertyBindings because bindings don't know about the owner.
|
|
|
+// struct EZABILITYEDITOR_API FEzAbilityBindingLookup : public IEzAbilityBindingLookup
|
|
|
+// {
|
|
|
+// FEzAbilityBindingLookup(IEzAbilityEditorPropertyBindingsOwner* InBindingOwner);
|
|
|
+//
|
|
|
+// IEzAbilityEditorPropertyBindingsOwner* BindingOwner = nullptr;
|
|
|
+//
|
|
|
+// protected:
|
|
|
+// virtual const FEzAbilityPropertyPath* GetPropertyBindingSource(const FEzAbilityPropertyPath& InTargetPath) const override;
|
|
|
+// virtual FText GetPropertyPathDisplayName(const FEzAbilityPropertyPath& InTargetPath) const override;
|
|
|
+// virtual const FProperty* GetPropertyPathLeafProperty(const FEzAbilityPropertyPath& InPath) const override;
|
|
|
+//
|
|
|
+// };
|