UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
StructTypeBitSet.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
10
11#define UE_API COREUOBJECT_API
12
13class FArchive;
14
16{
17
23{
25
27
32 inline bool HasAll(const TBitArray<>& Other) const
33 {
34 FConstWordIterator ThisIterator(*this);
35 FConstWordIterator OtherIterator(Other);
36
38 {
39 const uint32 A = ThisIterator ? ThisIterator.GetWord() : 0;
40 const uint32 B = OtherIterator ? OtherIterator.GetWord() : 0;
41 if ((A & B) != B)
42 {
43 return false;
44 }
45
48 }
49
50 return true;
51 }
52
57 inline bool HasAny(const TBitArray<>& Other) const
58 {
59 FConstWordIterator ThisIterator(*this);
60 FConstWordIterator OtherIterator(Other);
61
63 {
64 const uint32 A = ThisIterator ? ThisIterator.GetWord() : 0;
65 const uint32 B = OtherIterator ? OtherIterator.GetWord() : 0;
66 if ((A & B) != 0)
67 {
68 return true;
69 }
70
73 }
74
75 return false;
76 }
77
81 inline bool IsEmpty() const
82 {
83 FConstWordIterator Iterator(*this);
84
85 while (Iterator && Iterator.GetWord() == 0)
86 {
87 ++Iterator;
88 }
89
90 return !Iterator;
91 }
92
98 {
99 return (IsEmpty() && Other.IsEmpty()) || Super::operator==(Other);
100 }
101
107 {
108 FConstWordIterator Iterator(Instance);
109 uint32 Hash = 0;
111 while (Iterator)
112 {
113 const uint32 Word = Iterator.GetWord();
114 if (Word)
115 {
118 }
119 else // potentially a trailing 0-word
120 {
122 }
123 ++Iterator;
124 }
125 return Hash;
126 }
127
133 bool Contains(const int32 Index) const
134 {
135 check(Index >= 0);
136 return (Index < Num()) && (*this)[Index];
137 }
138
144 {
145 return CountSetBits();
146 }
147
148protected:
153 explicit FConstBitSetContainer(const TBitArray<>& Source)
154 : Super(Source)
155 {
156 }
157
163 : Super(Forward<TBitArray<>>(Source))
164 {
165 }
166};
167
172{
174
175 FBitSetContainer() = default;
176
177 explicit FBitSetContainer(const TBitArray<>& Source)
178 : FConstBitSetContainer(Source)
179 {
180 }
181 explicit FBitSetContainer(TBitArray<>&& Source)
183 {
184 }
185
187 {
188 static_assert(sizeof(FBitSetContainer) == sizeof(TBitArray<>)
189 , "This operator requires FBitSetContainer and TBitArray<> sizes to match (i.e. FBitSetContainer cannot have member variables nor virtual funtions)");
190 *((TBitArray<>*)this) = Other;
191 return *this;
192 }
193
194
200 void SetAll(const bool bValue, const int32 Count)
201 {
202 Init(bValue, Count);
203 }
204
209 inline void operator-=(const TBitArray<>& Other)
210 {
211 FWordIterator ThisIterator(*this);
212 FConstWordIterator OtherIterator(Other);
213
214 while (ThisIterator && OtherIterator)
215 {
216 ThisIterator.SetWord(ThisIterator.GetWord() & ~OtherIterator.GetWord());
217
218 ++ThisIterator;
220 }
221 }
222
228 {
229 check(Index >= 0);
230 PadToNum(Index + 1, false);
231 SetBitNoCheck(Index, true);
232 }
233
239 {
240 check(Index >= 0);
241 if (Index < Num())
242 {
243 SetBitNoCheck(Index, false);
244 }
245 // else, it's already not present
246 }
247
248protected:
254 void SetBitNoCheck(const int32 Index, const bool Value)
255 {
257 const uint32 BitOffset = (Index % NumBitsPerDWORD);
258 Word = (Word & ~(1 << BitOffset)) | (((uint32)Value) << BitOffset);
259 }
260};
261
262// Ensure that FBitSetContainer does not add any new member variables compared to FConstBitSetContainer.
263static_assert(sizeof(FBitSetContainer) == sizeof(FConstBitSetContainer), "FBitSetContainer as a functional extension of FConstBitSetContainer is not allowed add new member variables.");
264
265} // namespace FStructTypeBitSet
266
275{
278
288
290
295
301
307 {
308 return RegisterImplementation(InStructType, /*bCheckPrevious=*/true);
309 }
310
317 {
318 return StructTypesList.IsValidIndex(StructTypeIndex) ? StructTypesList[StructTypeIndex].Get() : nullptr;
319 }
320
325 UE_API const UStruct* GetBaseType() const;
326
331 int32 Num() const { return StructTypeToIndexSet.Num(); }
332
338 UE_API void Serialize(FArchive& Ar, FStructTypeBitSet::FBitSetContainer& StructTypesBitArray);
339
340#if WITH_STRUCTUTILS_DEBUG
345 {
347 }
348
349 template<typename T>
351 {
352 return MakeArrayView(reinterpret_cast<const TWeakObjectPtr<const T>*>(StructTypesList.GetData()), StructTypesList.Num());
353 }
354
359 {
360 StructTypeToIndexSet.Reset();
361 StructTypesList.Reset();
363 }
364
365 [[nodiscard]] UE_API const UStruct* DebugFindTypeByPartialName(const FString& PartialName) const;
366
367protected:
369#endif // WITH_STRUCTUTILS_DEBUG
370
371protected:
373
386
387private:
388 mutable const UStruct* BaseType;
389};
390
401template<typename TImplementation, typename TBaseStruct, typename TStructType, typename TBitSetContainer, bool bTestInheritanceAtRuntime=WITH_STRUCTUTILS_DEBUG>
403{
407
412 {
413 explicit FIndexIterator(const FStructTypeBitSet::FBitSetContainer& BitArray, const bool bInValueToCheck = true)
414 : It(BitArray), bValueToCheck(bInValueToCheck)
415 {
416 if (It && It.GetValue() != bInValueToCheck)
417 {
418 // Will result in either setting It to the first bit with bInValueToCheck, or making bool(It) == false
419 ++(*this);
420 }
421 }
422
423 operator bool() const
424 {
425 return bool(It);
426 }
427
430 {
431 while (++It)
432 {
433 if (It.GetValue() == bValueToCheck)
434 {
435 break;
436 }
437 }
438 return *this;
439 }
440
443 {
444 return It.GetIndex();
445 }
446
447 private:
449 const bool bValueToCheck;
450 };
451
457 FIndexIterator GetIndexIterator(const bool bValueToCheck = true) const
458 {
459 return FIndexIterator(StructTypesBitArray, bValueToCheck);
460 }
461
467 {
468 return *reinterpret_cast<TImplementation*>(this);
469 }
470
476 {
477 return *reinterpret_cast<const TImplementation*>(this);
478 }
479
484 inline static const UStruct* GetBaseUStruct()
485 {
486 if constexpr (bTestInheritanceAtRuntime)
487 {
488 static const UStruct* Instance = UE::StructUtils::GetAsUStruct<FBaseStruct>();
489 return Instance;
490 }
491 else
492 {
493 return nullptr;
494 }
495 }
496
501 void SetAll(const bool bValue = true)
502 {
503 StructTypesBitArray.SetAll(bValue, GetImplementation().GetStructTracker().Num());
504 }
505
511 {
512 if constexpr (bTestInheritanceAtRuntime)
513 {
515 TEXT("Registering '%s' with FStructTracker while it doesn't derive from the expected struct type %s"),
516 *InStructType.GetPathName(), *GetBaseUStruct()->GetName())))
517 {
518 return;
519 }
520 }
521
522 const int32 StructTypeIndex = GetImplementation().GetStructTracker().FindOrAddStructTypeIndex(InStructType);
524 }
525
528 {
530 }
531
537 {
538 if constexpr (bTestInheritanceAtRuntime)
539 {
541 TEXT("Registering '%s' with FStructTracker while it doesn't derive from the expected struct type %s"),
542 *InStructType.GetPathName(), *GetBaseUStruct()->GetName())))
543 {
544 return;
545 }
546 }
547
548 const int32 StructTypeIndex = GetImplementation().GetStructTracker().FindOrAddStructTypeIndex(InStructType);
550 }
551
554 {
556 }
557
561 void Reset()
562 {
563 StructTypesBitArray.Reset();
564 }
565
572 {
573 if constexpr (bTestInheritanceAtRuntime)
574 {
576 TEXT("Registering '%s' with FStructTracker while it doesn't derive from the expected struct type %s"),
577 *InStructType.GetPathName(), *GetBaseUStruct()->GetName())))
578 {
579 return false;
580 }
581 }
582
583 const int32 StructTypeIndex = GetImplementation().GetStructTracker().FindStructTypeIndex(InStructType);
585 }
586
596
606
611
619 {
620 return StructTypesBitArray.CompareSetBits(Other.StructTypesBitArray, /*bMissingBitValue=*/false);
621 }
622
624 {
625 return StructTypesBitArray.HasAll(Other.StructTypesBitArray);
626 }
627
629 {
630 return StructTypesBitArray.HasAny(Other.StructTypesBitArray);
631 }
632
634 {
635 return !StructTypesBitArray.HasAny(Other.StructTypesBitArray);
636 }
637
642 bool IsEmpty() const
643 {
644 return StructTypesBitArray.IsEmpty();
645 }
646
652 UE_FORCEINLINE_HINT bool IsBitSet(const int32 BitIndex) const
653 {
654 return StructTypesBitArray.Contains(BitIndex);
655 }
656
665
671 {
672 StructTypesBitArray -= Other.StructTypesBitArray;
673 }
674
681 {
683 Result.Add(NewElement);
684 return MoveTemp(Result);
685 }
686
693 {
695 Result.Remove(NewElement);
696 return MoveTemp(Result);
697 }
698
704 {
705 return StructTypesBitArray.CountSetBits();
706 }
707
714 template<typename TOutStructType, typename Allocator>
716 {
718 while (It)
719 {
720 if (It.GetValue())
721 {
722 OutTypes.Add(Cast<TOutStructType>(GetImplementation().GetStructTracker().GetStructType(It.GetIndex())));
723 }
724 ++It;
725 }
726 }
727
728#if WITH_STRUCTUTILS_DEBUG
732 void DebugGetStringDesc(FOutputDevice& Ar) const
733 {
734 for (int32 Index = 0; Index < StructTypesBitArray.Num(); ++Index)
735 {
737 {
738 Ar.Logf(TEXT("%s, "), *GetImplementation().GetStructTracker().DebugGetStructTypeName(Index).ToString());
739 }
740 }
741 }
742
748 {
749 for (int32 Index = 0; Index < StructTypesBitArray.Num(); ++Index)
750 {
752 {
753 OutFNames.Add(GetImplementation().GetStructTracker().DebugGetStructTypeName(Index));
754 }
755 }
756 }
757#endif // WITH_STRUCTUTILS_DEBUG
758
764 {
765 return StructTypesBitArray.GetAllocatedSize();
766 }
767
768protected:
772 TTypeBitSetBase() = default;
773
782
783#if WITH_STRUCTUTILS_DEBUG
784 // For unit testing purposes only
787#endif // WITH_STRUCTUTILS_DEBUG
788
791};
792
793
820template<typename TBaseStruct, typename TStructTrackerWrapper, typename TUStructType = UScriptStruct>
821struct TStructTypeBitSet : TTypeBitSetBase<TStructTypeBitSet<TBaseStruct, TStructTrackerWrapper, TUStructType>, TBaseStruct, TUStructType, FStructTypeBitSet::FBitSetContainer>
822{
827
828 friend Super;
831 using Super::Add;
832 using Super::Remove;
833 using Super::Contains;
834 using Super::operator+=;
835 using Super::operator-=;
836 using Super::operator+;
837 using Super::operator-;
838 using Super::ExportTypes;
839
840 TStructTypeBitSet() = default;
841
846 explicit TStructTypeBitSet(const FUStructType& StructType)
847 {
848 Add(StructType);
849 }
850
855 explicit TStructTypeBitSet(std::initializer_list<const FUStructType*> InitList)
856 {
857 for (const FUStructType* StructType : InitList)
858 {
859 if (StructType)
860 {
861 Add(*StructType);
862 }
863 }
864 }
865
871 {
872 for (const FUStructType* StructType : InitList)
873 {
874 if (StructType)
875 {
876 Add(*StructType);
877 }
878 }
879 }
880
888 {
889 for (const FInstancedStruct& StructInstance : InitList)
890 {
891 if (StructInstance.GetScriptStruct())
892 {
893 Add(*StructInstance.GetScriptStruct());
894 }
895 }
896 }
897
898private:
905 {
907 }
908
909 TStructTypeBitSet(const TBitArray<>& Source)
910 {
912 }
913
915 {
916 StructTypesBitArray.AddAtIndex(BitToSet);
917 }
918
919public:
920
926 {
927 return TStructTrackerWrapper::StructTracker;
928 }
929
935 {
936 return TStructTrackerWrapper::StructTracker;
937 }
938
945 {
946#if WITH_STRUCTUTILS_DEBUG
948 , TEXT("Creating index for '%s' while it doesn't derive from the expected struct type %s")
949 , *InStructType.GetPathName(), *GetBaseUStruct()->GetName());
950#endif // WITH_STRUCTUTILS_DEBUG
951
952 return TStructTrackerWrapper::StructTracker.FindOrAddStructTypeIndex(InStructType);
953 }
954
960 template<typename T>
962 {
963 static_assert(TIsDerivedFrom<T, TBaseStruct>::IsDerived, "Given struct type doesn't match the expected base struct type.");
964 static const int32 TypeIndex = GetTypeIndex(*UE::StructUtils::GetAsUStruct<T>());
965 return TypeIndex;
966 }
967
973 template<typename T>
975 {
976 static_assert(TIsDerivedFrom<T, TBaseStruct>::IsDerived, "Given struct type doesn't match the expected base struct type.");
978 return TypeBitSet;
979 }
980
987 {
988 return Cast<const FUStructType>(TStructTrackerWrapper::StructTracker.GetStructType(Index));
989 }
990
995 template<typename T>
996 inline void Add()
997 {
998 static_assert(TIsDerivedFrom<T, TBaseStruct>::IsDerived, "Given struct type doesn't match the expected base struct type.");
1001 }
1002
1007 template<typename T>
1008 inline void Remove()
1009 {
1010 static_assert(TIsDerivedFrom<T, TBaseStruct>::IsDerived, "Given struct type doesn't match the expected base struct type.");
1012 StructTypesBitArray.RemoveAtIndex(StructTypeIndex);
1013 }
1014
1020 {
1021 StructTypesBitArray -= Other.StructTypesBitArray;
1022 }
1023
1029 template<typename T>
1030 inline bool Contains() const
1031 {
1032 static_assert(TIsDerivedFrom<T, TBaseStruct>::IsDerived, "Given struct type doesn't match the expected base struct type.");
1034 return StructTypesBitArray.Contains(StructTypeIndex);
1035 }
1036
1043 {
1044 TStructTypeBitSet Result;
1045 Result.StructTypesBitArray = TBitArray<>::BitwiseOR(StructTypesBitArray, Other.StructTypesBitArray, EBitwiseOperatorFlags::MaxSize);
1046 return MoveTemp(Result);
1047 }
1048
1054 {
1055 return TStructTrackerWrapper::StructTracker.Num();
1056 }
1057
1064 {
1065 return Super::StructTypesBitArray == Other.StructTypesBitArray;
1066 }
1067
1074 {
1075 return !(*this == Other);
1076 }
1077
1084 {
1085 TStructTypeBitSet Result = *this;
1086 Result -= Other;
1087 return MoveTemp(Result);
1088 }
1089
1098 void ExportTypes(TFunctionRef<bool(const FUStructType*)> Callback) const
1099 {
1101 bool bKeepGoing = true;
1102 while (bKeepGoing && It)
1103 {
1104 if (It.GetValue())
1105 {
1106 bKeepGoing = Callback(GetTypeAtIndex(It.GetIndex()));
1107 }
1108 ++It;
1109 }
1110 }
1111
1112#if WITH_STRUCTUTILS_DEBUG
1113 using Super::DebugGetStringDesc;
1118 FString DebugGetStringDesc() const
1119 {
1122 return static_cast<FString>(Ar);
1123 }
1124#else
1129 FString DebugGetStringDesc() const
1130 {
1131 return TEXT("DEBUG INFO COMPILED OUT");
1132 }
1133#endif //WITH_STRUCTUTILS_DEBUG
1134
1135#if WITH_STRUCTUTILS_DEBUG
1142 {
1143 return TStructTrackerWrapper::StructTracker.DebugGetStructTypeName(StructTypeIndex);
1144 }
1145
1151 {
1152 return TStructTrackerWrapper::StructTracker.template DebugGetAllStructTypes<TUStructType>();
1153 }
1154
1161 {
1162 TStructTrackerWrapper::StructTracker.DebugResetStructTypeMappingInfo();
1163 }
1164
1165 [[nodiscard]] static const TUStructType* DebugFindTypeByPartialName(const FString& PartialName)
1166 {
1167 return reinterpret_cast<const TUStructType*>(TStructTrackerWrapper::StructTracker.DebugFindTypeByPartialName(PartialName));
1168 }
1169#endif // WITH_STRUCTUTILS_DEBUG
1170
1171public:
1178 {
1180 const uint32 BitArrayHash = GetTypeHash(Instance.StructTypesBitArray);
1182 }
1183
1189 {
1190 TStructTrackerWrapper::StructTracker.Serialize(Ar, Super::StructTypesBitArray);
1191 }
1192
1200 {
1201 Instance.Serialize(Ar);
1202 return Ar;
1203 }
1204};
1205
1212#define _DECLARE_TYPEBITSET_IMPL(EXPORTED_API, ContainerTypeName, BaseType, BaseUStructType) struct ContainerTypeName##StructTrackerWrapper \
1213 { \
1214 using FBaseStructType = BaseType; \
1215 EXPORTED_API static FStructTracker StructTracker; \
1216 }; \
1217 using ContainerTypeName = TStructTypeBitSet<BaseType, ContainerTypeName##StructTrackerWrapper, BaseUStructType>; \
1218 static_assert(std::is_move_constructible_v<ContainerTypeName> && std::is_move_assignable_v<ContainerTypeName>)
1219
1220#define DECLARE_STRUCTTYPEBITSET_EXPORTED(EXPORTED_API, ContainerTypeName, BaseStructType) _DECLARE_TYPEBITSET_IMPL(EXPORTED_API, ContainerTypeName, BaseStructType, UScriptStruct)
1221#define DECLARE_STRUCTTYPEBITSET(ContainerTypeName, BaseStructType) _DECLARE_TYPEBITSET_IMPL(, ContainerTypeName, BaseStructType, UScriptStruct)
1222#define DECLARE_CLASSTYPEBITSET_EXPORTED(EXPORTED_API, ContainerTypeName, BaseStructType) _DECLARE_TYPEBITSET_IMPL(EXPORTED_API, ContainerTypeName, BaseStructType, UClass)
1223#define DECLARE_CLASSTYPEBITSET(ContainerTypeName, BaseStructType) _DECLARE_TYPEBITSET_IMPL(, ContainerTypeName, BaseStructType, UClass)
1224
1225#define DEFINE_TYPEBITSET(ContainerTypeName) \
1226 FStructTracker ContainerTypeName##StructTrackerWrapper::StructTracker([](){ return UE::StructUtils::GetAsUStruct<ContainerTypeName##StructTrackerWrapper::FBaseStructType>();});
1227
1228#undef UE_API
constexpr auto MakeArrayView(OtherRangeType &&Other)
Definition ArrayView.h:873
#define check(expr)
Definition AssertionMacros.h:314
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
#define NumBitsPerDWORD
Definition ContainerAllocationPolicies.h:1371
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#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 UE_FORCEINLINE_HINT
Definition Platform.h:723
#define UNLIKELY(x)
Definition Platform.h:857
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
void Init()
Definition LockFreeList.h:4
@ Num
Definition MetalRHIPrivate.h:234
const bool
Definition NetworkReplayStreaming.h:178
#define UE_API
Definition StructTypeBitSet.h:11
uint32 PointerHash(const void *Key)
Definition TypeHash.h:91
constexpr uint32 HashCombine(uint32 A, uint32 C)
Definition TypeHash.h:36
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
virtual void Serialize(void *V, int64 Length)
Definition Archive.h:1689
Definition NameTypes.h:617
Definition OutputDevice.h:133
void Logf(const FmtType &Fmt)
Definition OutputDevice.h:234
Definition StringOutputDevice.h:21
Definition Array.h:670
Definition BitArray.h:350
UE_FORCEINLINE_HINT int32 Num() const
Definition BitArray.h:1466
static TBitArray BitwiseOR(const TBitArray< AllocatorA > &A, const TBitArray< AllocatorB > &B, EBitwiseOperatorFlags InFlags)
Definition BitArray.h:1321
UE_FORCEINLINE_HINT bool operator==(const TBitArray< Allocator > &Other) const
Definition BitArray.h:460
int32 CountSetBits(int32 FromIndex=0, int32 ToIndex=INDEX_NONE) const
Definition BitArray.h:1378
int32 PadToNum(int32 DesiredNum, bool bPadValue)
Definition BitArray.h:1438
UE_FORCEINLINE_HINT const uint32 * GetData() const
Definition BitArray.h:1705
Definition AssetRegistryState.h:50
Definition AndroidPlatformMisc.h:14
Definition ContainerAllocationPolicies.h:894
Definition Class.h:480
Definition StructTypeBitSet.h:16
U16 Index
Definition radfft.cpp:71
Definition InstancedStruct.h:32
Definition StructTypeBitSet.h:275
UE_API int32 FindStructTypeIndex(const UStruct &InStructType) const
Definition StructTypeBitSet.cpp:154
const UStruct * GetStructType(const int32 StructTypeIndex) const
Definition StructTypeBitSet.h:316
UE_NONCOPYABLE(FStructTracker)
UE_API const UStruct * GetBaseType() const
Definition StructTypeBitSet.cpp:83
UE_API ~FStructTracker()
Definition StructTypeBitSet.cpp:78
uint32 SerializationHash
Definition StructTypeBitSet.h:379
uint32 bIsSerializable
Definition StructTypeBitSet.h:381
TArray< TWeakObjectPtr< const UStruct >, TInlineAllocator< 64 > > StructTypesList
Definition StructTypeBitSet.h:377
UE_API int32 RegisterImplementation(const UStruct &InStructType, const bool bCheckPrevious)
Definition StructTypeBitSet.cpp:101
const FTypeValidation TypeVerification
Definition StructTypeBitSet.h:385
TSet< uint32 > StructTypeToIndexSet
Definition StructTypeBitSet.h:375
int32 Register(const UStruct &InStructType)
Definition StructTypeBitSet.h:306
const FBaseStructGetter BaseStructGetter
Definition StructTypeBitSet.h:383
UE_API int32 FindOrAddStructTypeIndex(const UStruct &InStructType)
Definition StructTypeBitSet.cpp:88
TFunction< bool(const UStruct *)> FTypeValidation
Definition StructTypeBitSet.h:277
int32 Num() const
Definition StructTypeBitSet.h:331
Definition StructTypeBitSet.h:172
void AddAtIndex(const int32 Index)
Definition StructTypeBitSet.h:227
FBitSetContainer(const TBitArray<> &Source)
Definition StructTypeBitSet.h:177
void SetBitNoCheck(const int32 Index, const bool Value)
Definition StructTypeBitSet.h:254
void operator-=(const TBitArray<> &Other)
Definition StructTypeBitSet.h:209
FBitSetContainer & operator=(const TBitArray<> &Other)
Definition StructTypeBitSet.h:186
void RemoveAtIndex(const int32 Index)
Definition StructTypeBitSet.h:238
void SetAll(const bool bValue, const int32 Count)
Definition StructTypeBitSet.h:200
FBitSetContainer(TBitArray<> &&Source)
Definition StructTypeBitSet.h:181
Definition StructTypeBitSet.h:23
bool HasAll(const TBitArray<> &Other) const
Definition StructTypeBitSet.h:32
FConstBitSetContainer(TBitArray<> &&Source)
Definition StructTypeBitSet.h:162
bool IsEmpty() const
Definition StructTypeBitSet.h:81
FConstBitSetContainer(const TBitArray<> &Source)
Definition StructTypeBitSet.h:153
friend uint32 GetTypeHash(const FConstBitSetContainer &Instance)
Definition StructTypeBitSet.h:106
bool Contains(const int32 Index) const
Definition StructTypeBitSet.h:133
bool operator==(const FConstBitSetContainer &Other) const
Definition StructTypeBitSet.h:97
bool HasAny(const TBitArray<> &Other) const
Definition StructTypeBitSet.h:57
int32 CountStoredTypes() const
Definition StructTypeBitSet.h:143
Definition UnrealTypeTraits.h:40
Definition StructTypeBitSet.h:822
FStructTracker & GetStructTracker()
Definition StructTypeBitSet.h:925
UE_FORCEINLINE_HINT void Remove(const TStructTypeBitSet &Other)
Definition StructTypeBitSet.h:1019
friend uint32 GetTypeHash(const TStructTypeBitSet &Instance)
Definition StructTypeBitSet.h:1177
friend Super
Definition StructTypeBitSet.h:828
TStructTypeBitSet(TConstArrayView< const FUStructType * > InitList)
Definition StructTypeBitSet.h:870
TStructTypeBitSet(std::initializer_list< const FUStructType * > InitList)
Definition StructTypeBitSet.h:855
TStructTypeBitSet operator-(const TStructTypeBitSet &Other) const
Definition StructTypeBitSet.h:1083
static const FUStructType * GetTypeAtIndex(const int32 Index)
Definition StructTypeBitSet.h:986
void ExportTypes(TFunctionRef< bool(const FUStructType *)> Callback) const
Definition StructTypeBitSet.h:1098
static const UStruct * GetBaseUStruct()
Definition StructTypeBitSet.h:484
TStructTypeBitSet()=default
void Serialize(FArchive &Ar)
Definition StructTypeBitSet.h:1188
TStructTypeBitSet(const FUStructType &StructType)
Definition StructTypeBitSet.h:846
UE_FORCEINLINE_HINT bool operator==(const TStructTypeBitSet &Other) const
Definition StructTypeBitSet.h:1063
void Add()
Definition StructTypeBitSet.h:996
void Remove()
Definition StructTypeBitSet.h:1008
TUStructType FUStructType
Definition StructTypeBitSet.h:825
FContainer StructTypesBitArray
Definition StructTypeBitSet.h:790
static int32 GetTypeIndex(const FUStructType &InStructType)
Definition StructTypeBitSet.h:944
TStructTrackerWrapper FStructTrackerWrapper
Definition StructTypeBitSet.h:824
friend FArchive & operator<<(FArchive &Ar, TStructTypeBitSet &Instance)
Definition StructTypeBitSet.h:1199
static int32 GetMaxNum()
Definition StructTypeBitSet.h:1053
bool Contains() const
Definition StructTypeBitSet.h:1030
UE_FORCEINLINE_HINT bool operator!=(const TStructTypeBitSet &Other) const
Definition StructTypeBitSet.h:1073
static const TStructTypeBitSet & GetTypeBitSet()
Definition StructTypeBitSet.h:974
TStructTypeBitSet operator+(const TStructTypeBitSet &Other) const
Definition StructTypeBitSet.h:1042
const FStructTracker & GetStructTracker() const
Definition StructTypeBitSet.h:934
FString DebugGetStringDesc() const
Definition StructTypeBitSet.h:1129
TBaseStruct FBaseStruct
Definition StructTypeBitSet.h:826
TStructTypeBitSet(TConstArrayView< FInstancedStruct > InitList)
Definition StructTypeBitSet.h:887
static int32 GetTypeIndex()
Definition StructTypeBitSet.h:961
Definition StructTypeBitSet.h:412
FIndexIterator & operator++()
Definition StructTypeBitSet.h:429
FIndexIterator(const FStructTypeBitSet::FBitSetContainer &BitArray, const bool bInValueToCheck=true)
Definition StructTypeBitSet.h:413
int32 operator*() const
Definition StructTypeBitSet.h:442
Definition StructTypeBitSet.h:403
UE_FORCEINLINE_HINT bool HasNone(const TImplementation &Other) const
Definition StructTypeBitSet.h:633
UE_FORCEINLINE_HINT bool IsEquivalent(const TImplementation &Other) const
Definition StructTypeBitSet.h:618
static const UStruct * GetBaseUStruct()
Definition StructTypeBitSet.h:484
TImplementation operator+(const FUStructType &NewElement) const
Definition StructTypeBitSet.h:680
const TImplementation & GetImplementation() const
Definition StructTypeBitSet.h:475
UE_FORCEINLINE_HINT TImplementation operator|(const TImplementation &Other) const
Definition StructTypeBitSet.h:602
UE_FORCEINLINE_HINT bool IsBitSet(const int32 BitIndex) const
Definition StructTypeBitSet.h:652
TTypeBitSetBase()=default
TImplementation operator-(const FUStructType &NewElement) const
Definition StructTypeBitSet.h:692
TBaseStruct FBaseStruct
Definition StructTypeBitSet.h:405
void Reset()
Definition StructTypeBitSet.h:561
bool IsEmpty() const
Definition StructTypeBitSet.h:642
SIZE_T GetAllocatedSize() const
Definition StructTypeBitSet.h:763
FContainer StructTypesBitArray
Definition StructTypeBitSet.h:790
UE_FORCEINLINE_HINT TImplementation GetOverlap(const TImplementation &Other) const
Definition StructTypeBitSet.h:607
TImplementation & GetImplementation()
Definition StructTypeBitSet.h:466
UE_FORCEINLINE_HINT bool HasAny(const TImplementation &Other) const
Definition StructTypeBitSet.h:628
TTypeBitSetBase(FContainer &InContainer)
Definition StructTypeBitSet.h:778
void AddAtIndex(const int32 StructTypeIndex)
Definition StructTypeBitSet.h:527
UE_FORCEINLINE_HINT void operator+=(const TImplementation &Other)
Definition StructTypeBitSet.h:661
bool Contains(const FUStructType &InStructType) const
Definition StructTypeBitSet.h:571
UE_FORCEINLINE_HINT void operator-=(const TImplementation &Other)
Definition StructTypeBitSet.h:670
void Add(const FUStructType &InStructType)
Definition StructTypeBitSet.h:510
void SetAll(const bool bValue=true)
Definition StructTypeBitSet.h:501
UE_FORCEINLINE_HINT bool HasAll(const TImplementation &Other) const
Definition StructTypeBitSet.h:623
FIndexIterator GetIndexIterator(const bool bValueToCheck=true) const
Definition StructTypeBitSet.h:457
UE_FORCEINLINE_HINT TImplementation operator&(const TImplementation &Other) const
Definition StructTypeBitSet.h:592
void RemoveAtIndex(const int32 StructTypeIndex)
Definition StructTypeBitSet.h:553
TStructType FUStructType
Definition StructTypeBitSet.h:404
void Remove(const FUStructType &InStructType)
Definition StructTypeBitSet.h:536
int32 CountStoredTypes() const
Definition StructTypeBitSet.h:703
TBitSetContainer FContainer
Definition StructTypeBitSet.h:406
void ExportTypes(TArray< const TOutStructType *, Allocator > &OutTypes) const
Definition StructTypeBitSet.h:715
Definition WeakObjectPtrTemplates.h:25