17 struct FContextCacheElementBase;
18 struct FContextCacheElementNull;
21 struct TContextCacheElementUObjectArray;
34 template <
typename T,
typename =
void>
177 if (Data.IsValidIndex(
Index))
208 const FDataType Data;
250 UE_DEPRECATED(5.6,
"Use the other constructor that does not pass a DataKey (the key is not needed)")
282 , ObjectPtr(
Other.ObjectPtr)
292 return (
void*)ObjectPtr;
334 template<
typename ArrayT>
343 , ObjectPtrArray(
Other.ObjectPtrArray)
353 return ObjectPtrArray;
358 return &ObjectPtrArray;
363 return ObjectPtrArray.
Num();
370 FDataType Element = ObjectPtrArray[
Index];
412 return InstancedStruct.
Get<T>();
466 return InstancedStructArray.Get<T>();
487 struct FInstancedStructArray final :
private TArray<uint8>
492 ~FInstancedStructArray();
500 const int32 GetStructureSize()
const;
506 const void* GetMemory()
const;
514 return reinterpret_cast<const TArray<T>&
>(*this);
521 return reinterpret_cast<TArray<T>&
>(*this);
524 void InitFromRawData(
const void* Data,
const int32 Num);
529 FInstancedStructArray InstancedStructArray;
#define check(expr)
Definition AssertionMacros.h:314
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_FORCEINLINE_HINT TUniquePtr< T > MakeUnique(TArgs &&... Args)
Definition UniquePtr.h:918
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition Archive.h:1208
Definition GCObject.h:128
Definition UnrealType.h:174
Definition UObjectGlobals.h:2492
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT ElementType * GetData() UE_LIFETIMEBOUND
Definition Array.h:1027
UE_NODEBUG UE_FORCEINLINE_HINT bool IsValidIndex(SizeType Index) const
Definition Array.h:1122
Definition UnrealString.h.inl:34
Definition UniquePtr.h:107
Definition DataflowAnyType.cpp:10
uint32 FContextCacheKey
Definition DataflowContextCache.h:23
FStringBuilderBase & operator<<(FStringBuilderBase &Builder, const FDerivedData &Data)
Definition DerivedData.cpp:255
U16 Index
Definition radfft.cpp:71
Definition StructArrayView.h:398
Definition StructView.h:217
Definition InstancedStruct.h:32
UE_API void InitializeAs(const UScriptStruct *InScriptStruct, const uint8 *InStructMemory=nullptr)
Definition InstancedStruct.cpp:69
const T & Get() const
Definition InstancedStruct.h:185
UE::Core::Private::Decay::TDecayNonReference< typenameTRemoveReference< T >::Type >::Type Type
Definition Decay.h:45
Definition DataflowContextCache.h:65
virtual ~FContextCacheElementBase()
Definition DataflowContextCache.h:84
virtual bool IsArray(const IContextCacheStore &Context) const =0
void UpdatePropertyAndNodeData(const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp)
Definition DataflowContextCache.h:115
const T & GetTypedData(const IContextCacheStore &Context, const FProperty *PropertyIn, const T &Default) const
Definition DataflowContextCache.h:534
virtual const void * GetUntypedData(const IContextCacheStore &Context, const FProperty *PropertyIn) const =0
const uint32 GetNodeHash() const
Definition DataflowContextCache.h:109
virtual TUniquePtr< FContextCacheElementBase > CreateFromArrayElement(const IContextCacheStore &Context, int32 Index, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const =0
TUniquePtr< FContextCacheElementBase > CreateReference(FContextCacheKey InReferenceDataKey) const
Definition DataflowContextCache.h:598
const FGuid & GetNodeGuid() const
Definition DataflowContextCache.h:108
EType
Definition DataflowContextCache.h:67
@ CacheElementNull
Definition DataflowContextCache.h:70
@ CacheElementUObjectArray
Definition DataflowContextCache.h:72
@ CacheElementUStructArray
Definition DataflowContextCache.h:74
@ CacheElementUStruct
Definition DataflowContextCache.h:73
@ CacheElementUObject
Definition DataflowContextCache.h:71
@ CacheElementTyped
Definition DataflowContextCache.h:68
@ CacheElementReference
Definition DataflowContextCache.h:69
FContextCacheElementBase(EType CacheElementType, FGuid InNodeGuid=FGuid(), const FProperty *InProperty=nullptr, uint32 InNodeHash=0, FTimestamp InTimestamp=FTimestamp::Invalid)
Definition DataflowContextCache.h:77
EType GetType() const
Definition DataflowContextCache.h:102
virtual int32 GetNumArrayElements(const IContextCacheStore &Context) const =0
void SetProperty(const FProperty *NewProperty)
Definition DataflowContextCache.h:112
virtual TUniquePtr< FContextCacheElementBase > Clone(const IContextCacheStore &Context) const =0
const FTimestamp & GetTimestamp() const
Definition DataflowContextCache.h:105
void SetTimestamp(const FTimestamp &InTimestamp)
Definition DataflowContextCache.h:106
const FProperty * GetProperty() const
Definition DataflowContextCache.h:104
virtual TUniquePtr< FContextCacheElementBase > CreateArrayFromElement(const IContextCacheStore &Context, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const =0
Definition DataflowContextCache.h:245
virtual TUniquePtr< FContextCacheElementBase > Clone(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:94
virtual bool IsArray(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:74
virtual TUniquePtr< FContextCacheElementBase > CreateArrayFromElement(const IContextCacheStore &Context, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.cpp:89
virtual TUniquePtr< FContextCacheElementBase > CreateFromArrayElement(const IContextCacheStore &Context, int32 Index, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.cpp:84
virtual int32 GetNumArrayElements(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:79
virtual const void * GetUntypedData(const IContextCacheStore &Context, const FProperty *PropertyIn) const override
Definition DataflowContextCache.cpp:69
FContextCacheElementNull(FGuid InNodeGuid, const FProperty *InProperty, uint32 InNodeHash, FTimestamp Timestamp)
Definition DataflowContextCache.h:255
Definition DataflowContextCache.h:215
virtual TUniquePtr< FContextCacheElementBase > CreateArrayFromElement(const IContextCacheStore &Context, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.cpp:46
FContextCacheElementReference(FGuid InNodeGuid, const FProperty *InProperty, FContextCacheKey InDataKey, uint32 InNodeHash, FTimestamp Timestamp)
Definition DataflowContextCache.h:216
virtual TUniquePtr< FContextCacheElementBase > Clone(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:55
virtual TUniquePtr< FContextCacheElementBase > CreateFromArrayElement(const IContextCacheStore &Context, int32 Index, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.cpp:37
virtual const void * GetUntypedData(const IContextCacheStore &Context, const FProperty *PropertyIn) const override
Definition DataflowContextCache.cpp:10
virtual bool IsArray(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:19
const T & GetData(const IContextCacheStore &Context, const FProperty *PropertyIn, const T &Default) const
Definition DataflowContextCache.h:616
virtual int32 GetNumArrayElements(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:28
Definition DataflowContextCache.h:437
FContextCacheElementUStructArray(FGuid InNodeGuid, const FProperty *InProperty, const FConstStructArrayView &InStructArrayView, uint32 InNodeHash, FTimestamp Timestamp)
Definition DataflowContextCache.h:438
virtual TUniquePtr< FContextCacheElementBase > CreateArrayFromElement(const IContextCacheStore &Context, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.cpp:178
virtual bool IsArray(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:158
virtual ~FContextCacheElementUStructArray() override=default
const TArray< T > & GetData(const IContextCacheStore &, const FProperty *, const TArray< T > &) const
Definition DataflowContextCache.h:464
FContextCacheElementUStructArray(FGuid InNodeGuid, const FProperty *InProperty, TArray< T > &&InStructArray, uint32 InNodeHash, FTimestamp Timestamp)
Definition DataflowContextCache.h:450
DATAFLOWCORE_API void AddReferencedObjects(FReferenceCollector &Collector) override
Definition DataflowContextCache.cpp:188
virtual const void * GetUntypedData(const IContextCacheStore &, const FProperty *) const override
Definition DataflowContextCache.cpp:153
virtual int32 GetNumArrayElements(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:163
virtual TUniquePtr< FContextCacheElementBase > CreateFromArrayElement(const IContextCacheStore &Context, int32 Index, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.cpp:168
virtual TUniquePtr< FContextCacheElementBase > Clone(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:183
DATAFLOWCORE_API FString GetReferencerName() const override
Definition DataflowContextCache.cpp:193
FContextCacheElementUStructArray(FGuid InNodeGuid, const FProperty *InProperty, const FConstStructView &InStructView, uint32 InNodeHash, FTimestamp Timestamp)
Definition DataflowContextCache.h:444
FContextCacheElementUStructArray(const FContextCacheElementUStructArray &Other)
Definition DataflowContextCache.h:457
Definition DataflowContextCache.h:397
const T & GetData(const IContextCacheStore &, const FProperty *, const T &) const
Definition DataflowContextCache.h:410
virtual DATAFLOWCORE_API int32 GetNumArrayElements(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:121
virtual DATAFLOWCORE_API bool IsArray(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:116
virtual DATAFLOWCORE_API TUniquePtr< FContextCacheElementBase > CreateFromArrayElement(const IContextCacheStore &Context, int32 Index, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.cpp:126
FContextCacheElementUStruct(FGuid InNodeGuid, const FProperty *InProperty, T &&InStruct, uint32 InNodeHash, FTimestamp Timestamp)
Definition DataflowContextCache.h:401
DATAFLOWCORE_API FString GetReferencerName() const override
Definition DataflowContextCache.cpp:146
virtual DATAFLOWCORE_API const void * GetUntypedData(const IContextCacheStore &, const FProperty *) const override
Definition DataflowContextCache.cpp:111
virtual DATAFLOWCORE_API TUniquePtr< FContextCacheElementBase > Clone(const IContextCacheStore &Context) const override
Definition DataflowContextCache.cpp:136
virtual DATAFLOWCORE_API TUniquePtr< FContextCacheElementBase > CreateArrayFromElement(const IContextCacheStore &Context, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.cpp:131
DATAFLOWCORE_API void AddReferencedObjects(FReferenceCollector &Collector) override
Definition DataflowContextCache.cpp:141
Definition DataflowContextCache.h:591
Definition DataflowContextCache.h:640
DATAFLOWCORE_API int32 Num() const
Definition DataflowContextCache.cpp:290
DATAFLOWCORE_API FContextValue ToArray() const
Definition DataflowContextCache.cpp:309
DATAFLOWCORE_API FContextValue GetAt(int32 Index) const
Definition DataflowContextCache.cpp:299
DATAFLOWCORE_API const FContextCacheElementBase * GetCacheEntry() const
Definition DataflowContextCache.cpp:331
Definition DataflowContextCache.h:40
static DATAFLOWCORE_API Type Current()
Definition DataflowNodeParameters.cpp:105
bool operator<(const FTimestamp &InTimestamp) const
Definition DataflowContextCache.h:46
uint64 Type
Definition DataflowContextCache.h:41
bool operator>=(const FTimestamp &InTimestamp) const
Definition DataflowContextCache.h:45
bool IsInvalid()
Definition DataflowContextCache.h:48
static DATAFLOWCORE_API Type Invalid
Definition DataflowContextCache.h:52
Type Value
Definition DataflowContextCache.h:42
bool operator==(const FTimestamp &InTimestamp) const
Definition DataflowContextCache.h:47
bool IsInvalid() const
Definition DataflowContextCache.h:49
FTimestamp(Type InValue)
Definition DataflowContextCache.h:44
Definition DataflowContextCache.h:56
virtual const TUniquePtr< FContextCacheElementBase > * FindCacheElement(FContextCacheKey Key) const =0
virtual bool HasCacheElement(FContextCacheKey Key, FTimestamp InTimestamp=FTimestamp::Invalid) const =0
Definition DataflowContextCache.h:333
virtual int32 GetNumArrayElements(const IContextCacheStore &Context) const override
Definition DataflowContextCache.h:361
virtual TUniquePtr< FContextCacheElementBase > CreateArrayFromElement(const IContextCacheStore &Context, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.h:376
const TArray< T > & GetData(const IContextCacheStore &, const FProperty *, const TArray< T > &) const
Definition DataflowContextCache.h:351
virtual FString GetReferencerName() const override
Definition DataflowContextCache.h:385
virtual void AddReferencedObjects(FReferenceCollector &Collector) override
Definition DataflowContextCache.h:384
TContextCacheElementUObjectArray(FGuid InNodeGuid, const FProperty *InProperty, ArrayT &&InObjectPtrArray, uint32 InNodeHash, FTimestamp Timestamp)
Definition DataflowContextCache.h:335
TContextCacheElementUObjectArray(const TContextCacheElementUObjectArray< T > &Other)
Definition DataflowContextCache.h:341
virtual TUniquePtr< FContextCacheElementBase > Clone(const IContextCacheStore &Context) const override
Definition DataflowContextCache.h:632
virtual bool IsArray(const IContextCacheStore &Context) const override
Definition DataflowContextCache.h:346
virtual TUniquePtr< FContextCacheElementBase > CreateFromArrayElement(const IContextCacheStore &Context, int32 Index, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.h:366
virtual const void * GetUntypedData(const IContextCacheStore &, const FProperty *) const override
Definition DataflowContextCache.h:356
Definition DataflowContextCache.h:274
virtual TUniquePtr< FContextCacheElementBase > Clone(const IContextCacheStore &Context) const override
Definition DataflowContextCache.h:626
virtual void AddReferencedObjects(FReferenceCollector &Collector) override
Definition DataflowContextCache.h:319
virtual TUniquePtr< FContextCacheElementBase > CreateArrayFromElement(const IContextCacheStore &Context, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.h:310
virtual const void * GetUntypedData(const IContextCacheStore &, const FProperty *) const override
Definition DataflowContextCache.h:290
virtual int32 GetNumArrayElements(const IContextCacheStore &Context) const override
Definition DataflowContextCache.h:300
virtual bool IsArray(const IContextCacheStore &Context) const override
Definition DataflowContextCache.h:295
const T & GetData(const IContextCacheStore &, const FProperty *, const T &) const
Definition DataflowContextCache.h:285
TContextCacheElementUObject(FGuid InNodeGuid, const FProperty *InProperty, T &&InObjectPtr, uint32 InNodeHash, FTimestamp Timestamp)
Definition DataflowContextCache.h:275
virtual TUniquePtr< FContextCacheElementBase > CreateFromArrayElement(const IContextCacheStore &Context, int32 Index, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.h:305
TContextCacheElementUObject(const TContextCacheElementUObject< T > &Other)
Definition DataflowContextCache.h:280
virtual FString GetReferencerName() const override
Definition DataflowContextCache.h:320
Definition DataflowContextCache.h:138
virtual TUniquePtr< FContextCacheElementBase > CreateFromArrayElement(const IContextCacheStore &Context, int32 Index, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.h:173
TContextCacheElement(FGuid InNodeGuid, const FProperty *InProperty, T &&InData, uint32 InNodeHash, FTimestamp Timestamp)
Definition DataflowContextCache.h:139
TContextCacheElement(const TContextCacheElement< T > &Other)
Definition DataflowContextCache.h:144
const T & GetData(const IContextCacheStore &Context, const FProperty *PropertyIn, const T &Default) const
Definition DataflowContextCache.h:604
virtual bool IsArray(const IContextCacheStore &Context) const override
Definition DataflowContextCache.h:156
const T & GetDataDirect() const
Definition DataflowContextCache.h:202
virtual TUniquePtr< FContextCacheElementBase > Clone(const IContextCacheStore &Context) const override
Definition DataflowContextCache.h:610
virtual TUniquePtr< FContextCacheElementBase > CreateArrayFromElement(const IContextCacheStore &Context, const FProperty *InProperty, const FGuid &InNodeGuid, uint32 InNodeHash, const FTimestamp &InTimestamp) const override
Definition DataflowContextCache.h:189
virtual const void * GetUntypedData(const IContextCacheStore &Context, const FProperty *PropertyIn) const
Definition DataflowContextCache.h:151
virtual int32 GetNumArrayElements(const IContextCacheStore &Context) const override
Definition DataflowContextCache.h:161
Definition DataflowContextCache.h:35
static constexpr bool Value
Definition DataflowContextCache.h:35
Definition DataflowContextCache.h:28
static constexpr bool Value
Definition DataflowContextCache.h:30
TDecay< T >::Type Type
Definition DataflowContextCache.h:29