UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MassEntityTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
9#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_6
11#endif // UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_6
14#include "MassEntityConcepts.h"
15#include "MassTestableEnsures.h"
16#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_6
18#include "MassEntityHandle.h"
19#endif // UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_6
20#include "MassEntityTypes.generated.h"
21
22
24
27
34
36struct FMassEntityQuery;
37
38namespace UE::Mass
39{
40 template<typename T>
41 static constexpr bool TAlwaysFalse = false;
42
47 {
48 friend struct ::FMassArchetypeData;
49 friend struct ::FMassEntityQuery;
50
53 , ChunkIndex(INDEX_NONE)
54 , ArchetypeIndex(INDEX_NONE)
55 , MaxChunkIndex(INDEX_NONE)
56 , EntityCountRemaining(0)
57 {
58 }
59
61
62 private:
63 int32 ChunkIndex;
64 int32 ArchetypeIndex;
65 int32 MaxChunkIndex;
66 int32 EntityCountRemaining;
67 };
68}
69
74{
87
95
103
115
119
123
124 void Reset()
125 {
126 Fragments.Reset();
127 Tags.Reset();
128 ChunkFragments.Reset();
129 SharedFragments.Reset();
130 ConstSharedFragments.Reset();
131 }
132
137 {
138 return Fragments.IsEquivalent(OtherDescriptor.Fragments)
139 && Tags.IsEquivalent(OtherDescriptor.Tags)
140 && ChunkFragments.IsEquivalent(OtherDescriptor.ChunkFragments)
141 && SharedFragments.IsEquivalent(OtherDescriptor.SharedFragments)
142 && ConstSharedFragments.IsEquivalent(OtherDescriptor.ConstSharedFragments);
143 }
144
149 {
150 return Fragments == OtherDescriptor.Fragments
151 && Tags == OtherDescriptor.Tags
152 && ChunkFragments == OtherDescriptor.ChunkFragments
153 && SharedFragments == OtherDescriptor.SharedFragments
154 && ConstSharedFragments == OtherDescriptor.ConstSharedFragments;
155 }
156
157 bool IsEmpty() const
158 {
159 return Fragments.IsEmpty()
160 && Tags.IsEmpty()
161 && ChunkFragments.IsEmpty()
162 && SharedFragments.IsEmpty()
163 && ConstSharedFragments.IsEmpty();
164 }
165
167 {
168 return Fragments.HasAll(OtherDescriptor.Fragments)
169 && Tags.HasAll(OtherDescriptor.Tags)
170 && ChunkFragments.HasAll(OtherDescriptor.ChunkFragments)
171 && SharedFragments.HasAll(OtherDescriptor.SharedFragments)
172 && ConstSharedFragments.HasAll(OtherDescriptor.ConstSharedFragments);
173 }
174
176 {
177 Fragments += OtherDescriptor.Fragments;
178 Tags += OtherDescriptor.Tags;
179 ChunkFragments += OtherDescriptor.ChunkFragments;
180 SharedFragments += OtherDescriptor.SharedFragments;
181 ConstSharedFragments += OtherDescriptor.ConstSharedFragments;
182 }
183
185 {
186 Fragments -= OtherDescriptor.Fragments;
187 Tags -= OtherDescriptor.Tags;
188 ChunkFragments -= OtherDescriptor.ChunkFragments;
189 SharedFragments -= OtherDescriptor.SharedFragments;
190 ConstSharedFragments -= OtherDescriptor.ConstSharedFragments;
191 }
192
209
213
218
220
222
223 template<typename T>
224 auto& GetContainer() const;
225
226 template<typename T>
227 auto& GetContainer();
228
229 template<typename T>
230 bool Contains() const;
231
232 template<typename T>
233 void Add();
234
235 const FMassFragmentBitSet& GetFragments() const;
236 const FMassTagBitSet& GetTags() const;
240
246
248 void SetTags(const FMassTagBitSet& InBitSet);
252
253 UE_DEPRECATED(5.7, "Direct access to FMassArchetypeCompositionDescriptor's bitsets is deprecated. Use any of the newly added getters instead.")
255
256 UE_DEPRECATED(5.7, "Direct access to FMassArchetypeCompositionDescriptor's bitsets is deprecated. Use any of the newly added getters instead.")
258
259 UE_DEPRECATED(5.7, "Direct access to FMassArchetypeCompositionDescriptor's bitsets is deprecated. Use any of the newly added getters instead.")
261
262 UE_DEPRECATED(5.7, "Direct access to FMassArchetypeCompositionDescriptor's bitsets is deprecated. Use any of the newly added getters instead.")
264
265 UE_DEPRECATED(5.7, "Direct access to FMassArchetypeCompositionDescriptor's bitsets is deprecated. Use any of the newly added getters instead.")
267
272
273 UE_DEPRECATED(5.5, "This FMassArchetypeCompositionDescriptor constructor is deprecated. Please explicitly provide FConstSharedFragmentBitSet.")
277
278 UE_DEPRECATED(5.5, "This FMassArchetypeCompositionDescriptor constructor is deprecated. Please explicitly provide FConstSharedFragmentBitSet.")
282
283 UE_DEPRECATED(5.5, "This FMassArchetypeCompositionDescriptor constructor is deprecated. Please explicitly provide FConstSharedFragmentBitSet.")
285 {
286 ensureMsgf(false, TEXT("This constructor is defunct. Please update your implementation based on deprecation warning."));
287 }
288};
290
297{
303
309
314
319
324
329
338
343
351
352 inline bool ContainsType(const UScriptStruct* FragmentType) const
353 {
354 if (UE::Mass::IsA<FMassSharedFragment>(FragmentType))
355 {
356 return SharedFragmentBitSet.Contains(*FragmentType);
357 }
358
360 {
361 return ConstSharedFragmentBitSet.Contains(*FragmentType);
362 }
363
364 return false;
365 }
366
367 template<typename T>
368 inline bool ContainsType() const
369 {
371 {
372 return ConstSharedFragmentBitSet.Contains(*T::StaticStruct());
373 }
374 else if constexpr (UE::Mass::CSharedFragment<T>)
375 {
376 return SharedFragmentBitSet.Contains(*T::StaticStruct());
377 }
378 else
379 {
380 return false;
381 }
382 }
383
388 void Add(const FConstSharedStruct& Fragment)
389 {
390 (void)Add_GetRef(Fragment);
391 }
392
400
401 UE_DEPRECATED(5.6, "Use Add or Add_GetRef instead depending on whether you need the return value.")
403 {
404 return Add_GetRef(Fragment);
405 }
406
411 void Add(const FSharedStruct& Fragment)
412 {
413 (void)Add_GetRef(Fragment);
414 }
415
423
424 UE_DEPRECATED(5.6, "Use Add or Add_GetRef instead depending on whether you need the return value.")
426 {
427 return Add_GetRef(Fragment);
428 }
429
437
445
451
457
463 {
464 return Remove(InDescriptor.GetSharedFragments()) + Remove(InDescriptor.GetConstSharedFragments());
465 }
466
468 {
470 }
471
476
478 {
479 return SharedFragments;
480 }
481
483 {
485 return FragmentIndex != INDEX_NONE ? ConstSharedFragments[FragmentIndex] : FConstSharedStruct();
486 }
487
489 {
490 const int32 FragmentIndex = SharedFragments.IndexOfByPredicate(FStructTypeEqualOperator(StructType));
491 return FragmentIndex != INDEX_NONE ? SharedFragments[FragmentIndex] : FSharedStruct();
492 }
493
495 {
496 const int32 FragmentIndex = SharedFragments.IndexOfByPredicate(FStructTypeEqualOperator(StructType));
497 return FragmentIndex != INDEX_NONE ? SharedFragments[FragmentIndex] : FSharedStruct();
498 }
499
504
509
510 inline void DirtyHashCache()
511 {
513 // we consider a single shared fragment as being "sorted"
515 }
516
517 inline void CacheHash() const
518 {
519 if (HashCache == UINT32_MAX)
520 {
522 }
523 }
524
525 friend inline uint32 GetTypeHash(const FMassArchetypeSharedFragmentValues& SharedFragmentValues)
526 {
527 SharedFragmentValues.CacheHash();
528 return SharedFragmentValues.HashCache;
529 }
530
532 SIZE_T GetAllocatedSize() const;
533
534 void Sort()
535 {
536 if(!bSorted)
537 {
540 bSorted = true;
541 }
542 }
543
544 bool IsSorted() const;
545
546 bool IsEmpty() const;
547
548 void Reset();
549
550protected:
556 mutable bool bSorted = true;
557
562
563public:
564 //-----------------------------------------------------------------------------
565 // DEPRECATED
566 //-----------------------------------------------------------------------------
567 UE_DEPRECATED(5.5, "HasExactFragmentTypesMatch is deprecated. Use HasExactSharedFragmentTypesMatch or the two-parameter version of HasExactFragmentTypesMatch.")
572};
573
577UENUM()
579{
580 AddElement, // when an element (a fragment, tag...) is added to an existing entity
581 RemoveElement, // when an element (a fragment, tag...) is removed from an existing entity
582 DestroyEntity, // when an entity is destroyed, which is a special case of RemoveElement, because the entity gets all of its elements removed
583 CreateEntity, // when an entity is created, which is a special case of AddElement, because the entity gets all of its elements added
584
585 // @todo another planned supported operation type
586 // Touch,
587 // -- new operations above this line -- //
588
589 MAX,
590
591 // the following values are deprecated. Use one of the values above
592 Add UMETA(Deprecated, DisplayName="DEPRECATED_Add"),
593 Remove UMETA(Deprecated, DisplayName="DEPRECATED_Remove")
594};
595
610
612{
613 Local,
614 Processor,
615 MAX
616};
617
623{
626 : Content(SourceData)
627 {}
631
632 int32 Num() const { return Content.Num(); }
633
634 void Reset()
635 {
637 }
638
639 inline void Swap(const int32 A, const int32 B)
640 {
641 for (FStructArrayView& View : Content)
642 {
643 View.Swap(A, B);
644 }
645 }
646
648 void SwapElementsToEnd(int32 StartIndex, int32 NumToMove);
649
651};
652
658{
661 : Source(InSource), StartIndex(InStartIndex), Count(InCount)
662 {
663 }
664
666 {
667 return Source.Content[Index].Slice(StartIndex, Count);
668 }
669
671 int32 Num() const
672 {
673 return Source.Num();
674 }
675
676 bool IsEmpty() const
677 {
678 return !(Source.Num() > 0 && Count > 0);
679 }
680
681private:
683 const int32 StartIndex = 0;
684 const int32 Count = 0;
685};
686
687namespace UE::Mass
688{
693 template<typename T, typename... TOthers>
694 struct TMultiTypeList : TMultiTypeList<TOthers...>
695 {
696 using Super = TMultiTypeList<TOthers...>;
697 using FType = std::remove_const_t<typename TRemoveReference<T>::Type>;
698 enum
699 {
700 Ordinal = Super::Ordinal + 1
701 };
702
703 template<typename TBitSetType>
704 constexpr static void PopulateBitSet(TBitSetType& OutBitSet)
705 {
706 Super::PopulateBitSet(OutBitSet);
707 OutBitSet += TBitSetType::template GetTypeBitSet<FType>();
708 }
709 };
710
712 template<typename T>
713 struct TMultiTypeList<T>
714 {
715 using FType = std::remove_const_t<typename TRemoveReference<T>::Type>;
716 enum
717 {
718 Ordinal = 0
719 };
720
721 template<typename TBitSetType>
722 constexpr static void PopulateBitSet(TBitSetType& OutBitSet)
723 {
724 OutBitSet += TBitSetType::template GetTypeBitSet<FType>();
725 }
726 };
727
733 template<typename T, typename... TOthers>
734 struct TMultiArray : TMultiArray<TOthers...>
735 {
736 using FType = std::remove_const_t<typename TRemoveReference<T>::Type>;
737 using Super = TMultiArray<TOthers...>;
738
739 enum
740 {
741 Ordinal = Super::Ordinal + 1
742 };
743
745 {
746 return FragmentInstances.GetAllocatedSize() + Super::GetAllocatedSize();
747 }
748
749 int GetNumArrays() const { return Ordinal + 1; }
750
751 void Add(const FType& Item, TOthers... Rest)
752 {
753 FragmentInstances.Add(Item);
754 Super::Add(Rest...);
755 }
756
757 void GetAsGenericMultiArray(TArray<FStructArrayView>& A) /*const*/
758 {
759 Super::GetAsGenericMultiArray(A);
760 A.Add(FStructArrayView(FragmentInstances));
761 }
762
763 void GetheredAffectedFragments(FMassFragmentBitSet& OutBitSet) const
764 {
765 Super::GetheredAffectedFragments(OutBitSet);
766 OutBitSet += FMassFragmentBitSet::GetTypeBitSet<FType>();
767 }
768
769 void Reset()
770 {
771 Super::Reset();
772 FragmentInstances.Reset();
773 }
774
775 TArray<FType> FragmentInstances;
776 };
777
779 template<typename T>
780 struct TMultiArray<T>
781 {
782 using FType = std::remove_const_t<typename TRemoveReference<T>::Type>;
783 enum { Ordinal = 0 };
784
786 {
787 return FragmentInstances.GetAllocatedSize();
788 }
789
790 int GetNumArrays() const { return Ordinal + 1; }
791
792 void Add(const FType& Item) { FragmentInstances.Add(Item); }
793
794 void GetAsGenericMultiArray(TArray<FStructArrayView>& A) /*const*/
795 {
796 A.Add(FStructArrayView(FragmentInstances));
797 }
798
799 void GetheredAffectedFragments(FMassFragmentBitSet& OutBitSet) const
800 {
801 OutBitSet += FMassFragmentBitSet::GetTypeBitSet<FType>();
802 }
803
804 void Reset()
805 {
806 FragmentInstances.Reset();
807 }
808
809 TArray<FType> FragmentInstances;
810 };
811
812} // UE::Mass
813
814
816{
818 explicit FMassArchetypeCreationParams(const struct FMassArchetypeData& Archetype);
819
822
825
826#if WITH_MASSENTITY_DEBUG
827 FColor DebugColor{0};
828#endif // WITH_MASSENTITY_DEBUG
829};
830
831//-----------------------------------------------------------------------------
832// INLINES
833//-----------------------------------------------------------------------------
835template<typename T>
837{
838 if constexpr (std::is_same_v<FMassFragment, T>)
839 {
840 return Fragments;
841 }
842 else if constexpr (std::is_same_v<FMassTag, T>)
843 {
844 return Tags;
845 }
846 else if constexpr (std::is_same_v<FMassChunkFragment, T>)
847 {
848 return ChunkFragments;
849 }
850 else if constexpr (std::is_same_v<FMassSharedFragment, T>)
851 {
852 return SharedFragments;
853 }
854 else if constexpr (std::is_same_v<FMassConstSharedFragment, T>)
855 {
857 }
858 else
859 {
860 static_assert(UE::Mass::TAlwaysFalse<T>, "Unknown element type passed to GetContainer.");
861 }
862}
863
864template<typename T>
866{
867 if constexpr (std::is_same_v<FMassFragment, T>)
868 {
869 return Fragments;
870 }
871 else if constexpr (std::is_same_v<FMassTag, T>)
872 {
873 return Tags;
874 }
875 else if constexpr (std::is_same_v<FMassChunkFragment, T>)
876 {
877 return ChunkFragments;
878 }
879 else if constexpr (std::is_same_v<FMassSharedFragment, T>)
880 {
881 return SharedFragments;
882 }
883 else if constexpr (std::is_same_v<FMassConstSharedFragment, T>)
884 {
886 }
887 else
888 {
889 static_assert(UE::Mass::TAlwaysFalse<T>, "Unknown element type passed to GetContainer.");
890 }
891}
892
893template<typename T>
895{
896 using FElementType = UE::Mass::TElementType<T>;
897 return GetContainer<FElementType>().template Contains<T>();
898}
899
900template<typename T>
906
911
913{
914 return Tags;
915}
916
921
926
931
936
941
946
951
956
961
966
971
976
982
990
992{
993 return bSorted;
994}
995
1000
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define DECLARE_CYCLE_STAT_EXTERN(CounterName, StatId, GroupId, API)
Definition Stats.h:679
#define DECLARE_STATS_GROUP(GroupDesc, GroupId, GroupCat)
Definition Stats.h:689
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
EMassObservedOperation
Definition MassEntityTypes.h:579
EMassExecutionContextType
Definition MassEntityTypes.h:612
EMassObservedOperationFlags
Definition MassEntityTypes.h:597
MASSENTITY_API FString LexToString(const EMassObservedOperationFlags Value)
Definition MassEntityTypes.cpp:19
#define UENUM(...)
Definition ObjectMacros.h:749
#define DECLARE_CLASSTYPEBITSET_EXPORTED(EXPORTED_API, ContainerTypeName, BaseStructType)
Definition StructTypeBitSet.h:1222
#define DECLARE_STRUCTTYPEBITSET_EXPORTED(EXPORTED_API, ContainerTypeName, BaseStructType)
Definition StructTypeBitSet.h:1220
TConstArrayView< const UScriptStruct * > TConstArrayView< const UScriptStruct * >
Definition TypedElementQueryCapabilities.inl:16
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NameTypes.h:617
Definition UnrealType.h:3087
Definition OutputDevice.h:133
Definition ArrayView.h:139
UE_FORCEINLINE_HINT constexpr SizeType Num() const
Definition ArrayView.h:380
constexpr TArrayView Slice(SizeType Index, SizeType InNum) const
Definition ArrayView.h:426
Definition Array.h:670
UE_REWRITE SizeType Num() const
Definition Array.h:1144
void Reset(SizeType NewSize=0)
Definition Array.h:2246
UE_REWRITE bool IsEmpty() const
Definition Array.h:1133
UE_NODEBUG UE_FORCEINLINE_HINT SIZE_T GetAllocatedSize(void) const
Definition Array.h:1059
SizeType IndexOfByPredicate(Predicate Pred) const
Definition Array.h:1423
UE_NODEBUG void Sort()
Definition Array.h:3418
Definition Class.h:1720
Definition Subsystem.h:48
Definition MassEntityConcepts.h:32
Definition MassEntityConcepts.h:29
SIZE_T GetAllocatedSize(const T &Value)
Definition ManagedArray.h:93
Definition MassArchetypeData.h:21
typename Private::TElementTypeHelper< T >::Type TElementType
Definition MassEntityConcepts.h:58
bool IsA< FMassSharedFragment >(const UStruct *Struct)
Definition MassEntityElementTypes.h:73
bool IsA< FMassConstSharedFragment >(const UStruct *Struct)
Definition MassEntityElementTypes.h:79
U16 Index
Definition radfft.cpp:71
Definition Color.h:486
Definition SharedStruct.h:538
Definition InstancedStruct.h:32
Definition MassEntityTypes.h:74
bool IsIdentical(const FMassArchetypeCompositionDescriptor &OtherDescriptor) const
Definition MassEntityTypes.h:148
void Add()
Definition MassEntityTypes.h:901
const FMassFragmentBitSet & GetFragments() const
Definition MassEntityTypes.h:907
void SetFragments(const FMassFragmentBitSet &InBitSet)
Definition MassEntityTypes.h:957
FMassTagBitSet Tags
Definition MassEntityTypes.h:257
FMassArchetypeCompositionDescriptor(TConstArrayView< const UScriptStruct * > InFragments, const FMassTagBitSet &InTags, const FMassChunkFragmentBitSet &InChunkFragments, const FMassSharedFragmentBitSet &InSharedFragments, const FMassConstSharedFragmentBitSet &InConstSharedFragments)
Definition MassEntityTypes.h:88
FMassArchetypeCompositionDescriptor(TConstArrayView< FInstancedStruct > InFragmentInstances, const FMassTagBitSet &InTags, const FMassChunkFragmentBitSet &InChunkFragments, const FMassSharedFragmentBitSet &InSharedFragments, const FMassConstSharedFragmentBitSet &InConstSharedFragments)
Definition MassEntityTypes.h:96
FMassArchetypeCompositionDescriptor CalculateDifference(const FMassArchetypeCompositionDescriptor &OtherDescriptor) const
Definition MassEntityTypes.h:197
MASSENTITY_API int32 CountStoredTypes() const
Definition MassEntityTypes.cpp:65
bool IsEquivalent(const FMassArchetypeCompositionDescriptor &OtherDescriptor) const
Definition MassEntityTypes.h:136
bool Contains() const
Definition MassEntityTypes.h:894
FMassArchetypeCompositionDescriptor(const FMassFragmentBitSet &InFragments, const FMassTagBitSet &InTags, const FMassChunkFragmentBitSet &InChunkFragments, const FMassSharedFragmentBitSet &InSharedFragments, const FMassConstSharedFragmentBitSet &InConstSharedFragments)
Definition MassEntityTypes.h:76
const FMassTagBitSet & GetTags() const
Definition MassEntityTypes.h:912
FMassArchetypeCompositionDescriptor(FMassFragmentBitSet &&InFragments)
Definition MassEntityTypes.h:116
FMassChunkFragmentBitSet ChunkFragments
Definition MassEntityTypes.h:260
void Remove(const FMassArchetypeCompositionDescriptor &OtherDescriptor)
Definition MassEntityTypes.h:184
void SetConstSharedFragments(const FMassConstSharedFragmentBitSet &InBitSet)
Definition MassEntityTypes.h:977
bool IsEmpty() const
Definition MassEntityTypes.h:157
FMassFragmentBitSet Fragments
Definition MassEntityTypes.h:254
void SetTags(const FMassTagBitSet &InBitSet)
Definition MassEntityTypes.h:962
FMassConstSharedFragmentBitSet ConstSharedFragments
Definition MassEntityTypes.h:266
FMassArchetypeCompositionDescriptor(FMassTagBitSet &&InTags)
Definition MassEntityTypes.h:120
const FMassSharedFragmentBitSet & GetSharedFragments() const
Definition MassEntityTypes.h:922
const FMassConstSharedFragmentBitSet & GetConstSharedFragments() const
Definition MassEntityTypes.h:927
const FMassChunkFragmentBitSet & GetChunkFragments() const
Definition MassEntityTypes.h:917
void SetSharedFragments(const FMassSharedFragmentBitSet &InBitSet)
Definition MassEntityTypes.h:972
void Append(const FMassArchetypeCompositionDescriptor &OtherDescriptor)
Definition MassEntityTypes.h:175
void SetChunkFragments(const FMassChunkFragmentBitSet &InBitSet)
Definition MassEntityTypes.h:967
FMassArchetypeCompositionDescriptor(FMassFragmentBitSet &&InFragments, FMassTagBitSet &&InTags, FMassChunkFragmentBitSet &&InChunkFragments, FMassSharedFragmentBitSet &&InSharedFragments, FMassConstSharedFragmentBitSet &&InConstSharedFragments)
Definition MassEntityTypes.h:104
FMassSharedFragmentBitSet SharedFragments
Definition MassEntityTypes.h:263
uint32 CalculateHash() const
Definition MassEntityTypes.h:214
void Reset()
Definition MassEntityTypes.h:124
MASSENTITY_API void DebugOutputDescription(FOutputDevice &Ar) const
Definition MassEntityTypes.cpp:74
bool HasAll(const FMassArchetypeCompositionDescriptor &OtherDescriptor) const
Definition MassEntityTypes.h:166
Definition MassEntityTypes.h:816
int32 ChunkMemorySize
Definition MassEntityTypes.h:821
FMassArchetypeCreationParams(const struct FMassArchetypeData &Archetype)
FName DebugName
Definition MassEntityTypes.h:824
Definition MassArchetypeData.h:172
Definition MassEntityTypes.h:297
const TArray< FConstSharedStruct > & GetConstSharedFragments() const
Definition MassEntityTypes.h:467
const FMassConstSharedFragmentBitSet & GetConstSharedFragmentBitSet() const
Definition MassEntityTypes.h:505
FMassConstSharedFragmentBitSet ConstSharedFragmentBitSet
Definition MassEntityTypes.h:559
uint32 HashCache
Definition MassEntityTypes.h:551
bool HasAllRequiredSharedFragmentTypes(const FMassSharedFragmentBitSet &InSharedFragmentBitSet) const
Definition MassEntityTypes.h:315
bool HasExactFragmentTypesMatch(const FMassSharedFragmentBitSet &InSharedFragmentBitSet, const FMassConstSharedFragmentBitSet &InConstSharedFragmentBitSet) const
Definition MassEntityTypes.h:304
FSharedStruct AddSharedFragment(const FSharedStruct &Fragment)
Definition MassEntityTypes.h:425
FConstSharedStruct AddConstSharedFragment(const FConstSharedStruct &Fragment)
Definition MassEntityTypes.h:402
FConstSharedStruct GetSharedFragmentStruct(const UScriptStruct *StructType) const
Definition MassEntityTypes.h:494
MASSENTITY_API void ReplaceSharedFragments(TConstArrayView< FSharedStruct > Fragments)
Definition MassEntityTypes.cpp:166
TArray< FConstSharedStruct > ConstSharedFragments
Definition MassEntityTypes.h:560
bool IsSorted() const
Definition MassEntityTypes.h:991
FMassArchetypeSharedFragmentValues & operator=(const FMassArchetypeSharedFragmentValues &OtherFragmentValues)=default
bool HasAllRequiredConstSharedFragmentTypes(const FMassConstSharedFragmentBitSet &InConstSharedFragmentBitSet) const
Definition MassEntityTypes.h:325
MASSENTITY_API bool HasSameValues(const FMassArchetypeSharedFragmentValues &Other) const
Definition MassEntityTypes.cpp:267
FMassArchetypeSharedFragmentValues(FMassArchetypeSharedFragmentValues &&OtherFragmentValues)=default
int32 Remove(const FMassArchetypeCompositionDescriptor &InDescriptor)
Definition MassEntityTypes.h:462
bool bSorted
Definition MassEntityTypes.h:556
FMassSharedFragmentBitSet SharedFragmentBitSet
Definition MassEntityTypes.h:558
const TArray< FSharedStruct > & GetSharedFragments() const
Definition MassEntityTypes.h:477
FSharedStruct GetSharedFragmentStruct(const UScriptStruct *StructType)
Definition MassEntityTypes.h:488
bool HasExactSharedFragmentTypesMatch(const FMassSharedFragmentBitSet &InSharedFragmentBitSet) const
Definition MassEntityTypes.h:310
void DirtyHashCache()
Definition MassEntityTypes.h:510
TArray< FSharedStruct > & GetMutableSharedFragments()
Definition MassEntityTypes.h:472
friend uint32 GetTypeHash(const FMassArchetypeSharedFragmentValues &SharedFragmentValues)
Definition MassEntityTypes.h:525
TArray< FSharedStruct > SharedFragments
Definition MassEntityTypes.h:561
bool HasExactConstSharedFragmentTypesMatch(const FMassConstSharedFragmentBitSet &InConstSharedFragmentBitSet) const
Definition MassEntityTypes.h:320
void CacheHash() const
Definition MassEntityTypes.h:517
void Sort()
Definition MassEntityTypes.h:534
const FMassSharedFragmentBitSet & GetSharedFragmentBitSet() const
Definition MassEntityTypes.h:500
FConstSharedStruct GetConstSharedFragmentStruct(const UScriptStruct *StructType) const
Definition MassEntityTypes.h:482
void Reset()
Definition MassEntityTypes.h:1001
FMassArchetypeSharedFragmentValues & operator=(FMassArchetypeSharedFragmentValues &&OtherFragmentValues)=default
MASSENTITY_API FConstSharedStruct Add_GetRef(const FConstSharedStruct &Fragment)
Definition MassEntityTypes.cpp:126
MASSENTITY_API uint32 CalculateHash() const
Definition MassEntityTypes.cpp:188
FMassArchetypeSharedFragmentValues(const FMassArchetypeSharedFragmentValues &OtherFragmentValues)=default
bool IsEquivalent(const FMassArchetypeSharedFragmentValues &OtherSharedFragmentValues) const
Definition MassEntityTypes.h:339
void Add(const FSharedStruct &Fragment)
Definition MassEntityTypes.h:411
void Add(const FConstSharedStruct &Fragment)
Definition MassEntityTypes.h:388
SIZE_T GetAllocatedSize() const
Definition MassEntityTypes.h:983
bool ContainsType(const UScriptStruct *FragmentType) const
Definition MassEntityTypes.h:352
bool ContainsType() const
Definition MassEntityTypes.h:368
bool DoesMatchComposition(const FMassArchetypeCompositionDescriptor &InDescriptor) const
Definition MassEntityTypes.h:333
bool IsEmpty() const
Definition MassEntityTypes.h:996
Definition MassEntityElementTypes.h:30
Definition MassEntityElementTypes.h:42
Definition MassEntityQuery.h:51
Definition MassEntityElementTypes.h:10
Definition MassEntityTypes.h:658
int32 Num() const
Definition MassEntityTypes.h:671
FStructArrayView operator[](const int32 Index) const
Definition MassEntityTypes.h:665
FMassGenericPayloadViewSlice(const FMassGenericPayloadView &InSource, const int32 InStartIndex, const int32 InCount)
Definition MassEntityTypes.h:660
bool IsEmpty() const
Definition MassEntityTypes.h:676
Definition MassEntityTypes.h:623
int32 Num() const
Definition MassEntityTypes.h:632
void Swap(const int32 A, const int32 B)
Definition MassEntityTypes.h:639
TArrayView< FStructArrayView > Content
Definition MassEntityTypes.h:650
FMassGenericPayloadView(TArray< FStructArrayView > &SourceData)
Definition MassEntityTypes.h:625
FMassGenericPayloadView(TArrayView< FStructArrayView > SourceData)
Definition MassEntityTypes.h:628
FMassGenericPayloadView()=default
void Reset()
Definition MassEntityTypes.h:634
void SwapElementsToEnd(int32 StartIndex, int32 NumToMove)
Definition MassEntityTypes.cpp:387
Definition MassEntityElementTypes.h:36
Definition MassEntityElementTypes.h:24
Definition SharedStruct.h:161
Definition StructArrayView.h:19
Definition StructUtilsTypes.h:75
Definition StructUtilsTypes.h:109
Definition MassEntityTypes.h:47
int32 EntityLimit
Definition MassEntityTypes.h:60
FExecutionLimiter(int32 InEntityLimit)
Definition MassEntityTypes.h:51