UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
StructTypeBitSet.h File Reference

Go to the source code of this file.

Classes

struct  FStructTypeBitSet::FConstBitSetContainer
 
struct  FStructTypeBitSet::FBitSetContainer
 
struct  FStructTracker
 
struct  TTypeBitSetBase< TImplementation, TBaseStruct, TStructType, TBitSetContainer, bTestInheritanceAtRuntime >
 
struct  TTypeBitSetBase< TImplementation, TBaseStruct, TStructType, TBitSetContainer, bTestInheritanceAtRuntime >::FIndexIterator
 
struct  TStructTypeBitSet< TBaseStruct, TStructTrackerWrapper, TUStructType >
 

Namespaces

namespace  FStructTypeBitSet
 

Macros

#define UE_API   COREUOBJECT_API
 
#define _DECLARE_TYPEBITSET_IMPL(EXPORTED_API, ContainerTypeName, BaseType, BaseUStructType)
 
#define DECLARE_STRUCTTYPEBITSET_EXPORTED(EXPORTED_API, ContainerTypeName, BaseStructType)   _DECLARE_TYPEBITSET_IMPL(EXPORTED_API, ContainerTypeName, BaseStructType, UScriptStruct)
 
#define DECLARE_STRUCTTYPEBITSET(ContainerTypeName, BaseStructType)   _DECLARE_TYPEBITSET_IMPL(, ContainerTypeName, BaseStructType, UScriptStruct)
 
#define DECLARE_CLASSTYPEBITSET_EXPORTED(EXPORTED_API, ContainerTypeName, BaseStructType)   _DECLARE_TYPEBITSET_IMPL(EXPORTED_API, ContainerTypeName, BaseStructType, UClass)
 
#define DECLARE_CLASSTYPEBITSET(ContainerTypeName, BaseStructType)   _DECLARE_TYPEBITSET_IMPL(, ContainerTypeName, BaseStructType, UClass)
 
#define DEFINE_TYPEBITSET(ContainerTypeName)    FStructTracker ContainerTypeName##StructTrackerWrapper::StructTracker([](){ return UE::StructUtils::GetAsUStruct<ContainerTypeName##StructTrackerWrapper::FBaseStructType>();});
 

Macro Definition Documentation

◆ _DECLARE_TYPEBITSET_IMPL

#define _DECLARE_TYPEBITSET_IMPL (   EXPORTED_API,
  ContainerTypeName,
  BaseType,
  BaseUStructType 
)
Value:
{ \
using FBaseStructType = BaseType; \
EXPORTED_API static FStructTracker StructTracker; \
}; \
static_assert(std::is_move_constructible_v<ContainerTypeName> && std::is_move_assignable_v<ContainerTypeName>)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition StructTypeBitSet.h:275
Definition StructTypeBitSet.h:822

We're declaring StructTracker this way rather than being a static member variable of TStructTypeBitSet to avoid linking issues. We've run into all sorts of issues depending on compiler and whether strict mode was on, and this is the best way we could come up with to solve it. Thankfully the user doesn't need to even know about this class's existence as long as they are using the macros below.

◆ DECLARE_CLASSTYPEBITSET

◆ DECLARE_CLASSTYPEBITSET_EXPORTED

◆ DECLARE_STRUCTTYPEBITSET

◆ DECLARE_STRUCTTYPEBITSET_EXPORTED

◆ DEFINE_TYPEBITSET

#define DEFINE_TYPEBITSET (   ContainerTypeName)     FStructTracker ContainerTypeName##StructTrackerWrapper::StructTracker([](){ return UE::StructUtils::GetAsUStruct<ContainerTypeName##StructTrackerWrapper::FBaseStructType>();});

◆ UE_API

#define UE_API   COREUOBJECT_API