Navigation
API > API/Runtime > API/Runtime/MassEntity
TTypeBitSetBuilder is a template class for building and managing type-specific bitsets. It extends TTypeBitSetBase to provide functionalities specific to bitset building.
| Name | TTypeBitSetBuilder |
| Type | struct |
| Header File | /Engine/Source/Runtime/MassEntity/Public/TypeBitSetBuilder.h |
| Include Path | #include "TypeBitSetBuilder.h" |
Syntax
template<typename TBaseStruct, typename TUStructType, bool bTestInheritanceAtRuntime, typename TContainer>
struct TTypeBitSetBuilder : public TTypeBitSetBase< TTypeBitSetBuilder< TBaseStruct, UScriptStruct, &&1) >, TBaseStruct, UScriptStruct, FStructTypeBitSet::FBitSetContainer &, &&1) >
Inheritance Hierarchy
- TTypeBitSetBase → TTypeBitSetBuilder
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TTypeBitSetBuilder
(
FStructTracker& InStructTracker, |
Constructor that initializes the builder with a struct tracker and a source bitset. | TypeBitSetBuilder.h | |
TTypeBitSetBuilder
(
FStructTracker& InStructTracker, |
Private constructor used internally to initialize with a specific bit index. | TypeBitSetBuilder.h |
Structs
| Name | Remarks |
|---|---|
| FBitSet | Internal bitset class extending TContainer. Used to ensure proper comparison of bitsets. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FBaseStruct | TBaseStruct | Alias for the base struct type | TypeBitSetBuilder.h |
| FConstBitSet | const FBitSet | Alias for a const bitset, this is the type to use to represent the stored bit set | TypeBitSetBuilder.h |
| FTraits | TTypeBitSetTraits< TBaseStruct > | Traits for compile-time checks | TypeBitSetBuilder.h |
| FUStructType | TUStructType | Alias for Unreal's struct type | TypeBitSetBuilder.h |
| Super | TTypeBitSetBase< TTypeBitSetBuilder, TBaseStruct, TUStructType, TContainer &, bTestInheritanceAtRuntime > | Define the base class for easier reference | TypeBitSetBuilder.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| StructTypesBitArray | FContainer | Bring base class methods into scope | TypeBitSetBuilder.h | |
| Super | friend | Friend declaration to allow base class access | TypeBitSetBuilder.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| StructTracker | FStructTracker & | Reference to the struct tracker used. | TypeBitSetBuilder.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Add
(
const FUStructType& InStructType |
TypeBitSetBuilder.h | ||
int32 Add () |
Template method to add a struct type to the bitset. | TypeBitSetBuilder.h | |
bool Contains
(
const FUStructType& InStructType |
TypeBitSetBuilder.h | ||
bool Contains () |
Template method to check if a struct type is contained in the bitset. | TypeBitSetBuilder.h | |
int32 CountStoredTypes() |
Counts the number of set bits in the bitset. | TypeBitSetBuilder.h | |
TConstArrayView< TWeakObjectPtr< const TUStructType > > DebugGetAllStructTypes () |
Retrieves all registered struct types as a view. | TypeBitSetBuilder.h | |
| Gets the names of individual struct types in the bitset. | TypeBitSetBuilder.h | ||
void DebugGetStringDesc
(
FOutputDevice& Ar |
Provides a debug string description of the bitset contents, via the provided FOutputDevice. | TypeBitSetBuilder.h | |
| Provides a debug string description of the bitset contents. | TypeBitSetBuilder.h | ||
FName DebugGetStructTypeName
(
const int32 StructTypeIndex |
Retrieves the name of a struct type at a given index. | TypeBitSetBuilder.h | |
void ExportTypes
(
TFunctionRef< bool(const TUStructType*)> Callback |
Lists all types used by this bitset, calling the provided callback for each one. | TypeBitSetBuilder.h | |
void ExportTypes
(
TArray< const TOutStructType*, Allocator >& OutTypes |
Exports the types stored in the bitset to an output array. | TypeBitSetBuilder.h | |
SIZE_T GetAllocatedSize() |
Retrieves the allocated size of the bitset. | TypeBitSetBuilder.h | |
int32 GetMaxNum () |
Retrieves the maximum number of types tracked by the struct tracker. | TypeBitSetBuilder.h | |
TTypeBitSetBuilder GetOverlap
(
const TTypeBitSetBuilder& Other |
Gets the overlap between this builder's bitset and another's. | TypeBitSetBuilder.h | |
const TUStructType * GetTypeAtIndex
(
const int32 Index |
Retrieves the struct type at a given index from the struct tracker. | TypeBitSetBuilder.h | |
int32 GetTypeIndex
(
const TUStructType& InStructType |
Retrieves the index of a struct type within the struct tracker. | TypeBitSetBuilder.h | |
int32 GetTypeIndex () |
Template method to get the type index for a specific C++ type. | TypeBitSetBuilder.h | |
bool HasAll
(
const TTypeBitSetBuilder& Other |
Checks if this builder's bitset has all bits set in another's. | TypeBitSetBuilder.h | |
bool HasAny
(
const TTypeBitSetBuilder& Other |
Checks if this builder's bitset has any bits set in another's. | TypeBitSetBuilder.h | |
bool HasNone
(
const TTypeBitSetBuilder& Other |
Checks if this builder's bitset has none of the bits set in another's. | TypeBitSetBuilder.h | |
bool IsBitSet
(
const int32 BitIndex |
Checks if a specific bit is set in the bitset. | TypeBitSetBuilder.h | |
bool IsEmpty() |
Checks if the bitset is empty. | TypeBitSetBuilder.h | |
bool IsEquivalent
(
const TTypeBitSetBuilder& Other |
Checks if this builder's bitset is equivalent to another's. | TypeBitSetBuilder.h | |
int32 Remove () |
Template method to remove a struct type from the bitset. | TypeBitSetBuilder.h | |
void Remove
(
const TTypeBitSetBuilder& Other |
Removes all bits set in another builder's bitset from this builder's bitset. | TypeBitSetBuilder.h | |
void Remove
(
const FUStructType& InStructType |
TypeBitSetBuilder.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TBitArray & DebugGetMutableStructTypesBitArray() |
TypeBitSetBuilder.h | ||
const TBitArray & DebugGetStructTypesBitArray() |
For unit testing purposes only | TypeBitSetBuilder.h | |
FStructTracker & GetStructTracker() |
Retrieves the struct tracker used by this builder. | TypeBitSetBuilder.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TConstArrayView< TWeakObjectPtr< const TUStructType > > DebugGetAllStructTypes
(
const FStructTracker& StructTracker |
Static method to retrieve all registered struct types from a struct tracker. | TypeBitSetBuilder.h | |
static FName DebugGetStructTypeName
(
const FStructTracker& StructTracker, |
Static method to retrieve the name of a struct type at a given index from a struct tracker. | TypeBitSetBuilder.h | |
static const UStruct * GetBaseUStruct() |
TypeBitSetBuilder.h | ||
static int32 GetMaxNum
(
const FStructTracker& StructTracker |
Static method to get the maximum number of types from a struct tracker. | TypeBitSetBuilder.h | |
static TTypeBitSetBuilder GetTypeBitSet
(
const TUStructType& InStructType |
Template method to create a bitset for a specific C++ type. | TypeBitSetBuilder.h | |
static int32 GetTypeIndex
(
FStructTracker& InStructTracker |
Template method to get the type index for a specific C++ type. | TypeBitSetBuilder.h | |
static int32 GetTypeIndex
(
const FStructTracker& InStructTracker, |
Static method to get the type index for a given struct type. | TypeBitSetBuilder.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TTypeBitSetBuilder operator-
(
const TTypeBitSetBuilder& Other |
Subtracts another builder's bitset from this builder's bitset. | TypeBitSetBuilder.h | |
TImplementation operator-
(
const FUStructType& NewElement |
TypeBitSetBuilder.h | ||
operator FConstBitSet() |
Conversion operator to a const bitset. | TypeBitSetBuilder.h | |
bool operator!=
(
const TTypeBitSetBuilder& Other |
Inequality operator to compare two builders. | TypeBitSetBuilder.h | |
TTypeBitSetBuilder operator&
(
const TTypeBitSetBuilder& Other |
Performs a bitwise AND with another builder's bitset. | TypeBitSetBuilder.h | |
TTypeBitSetBuilder operator|
(
const TTypeBitSetBuilder& Other |
Performs a bitwise OR with another builder's bitset. | TypeBitSetBuilder.h | |
TTypeBitSetBuilder operator+
(
const TTypeBitSetBuilder& Other |
Adds another builder's bitset to this builder's bitset. | TypeBitSetBuilder.h | |
TImplementation operator+
(
const FUStructType& NewElement |
TypeBitSetBuilder.h | ||
void operator+=
(
const TImplementation& Other |
TypeBitSetBuilder.h | ||
TTypeBitSetBuilder & operator=
(
const TTypeBitSetBuilder& Source |
Assignment operator to copy the bitset from another builder. | TypeBitSetBuilder.h | |
void operator-=
(
const TImplementation& Other |
TypeBitSetBuilder.h | ||
bool operator==
(
const TTypeBitSetBuilder& Other |
Equality operator to compare two builders. | TypeBitSetBuilder.h |