UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Mass::FConcurrentEntityStorage Class Referencefinal

#include <MassEntityManagerStorage.h>

+ Inheritance diagram for UE::Mass::FConcurrentEntityStorage:

Public Member Functions

void Initialize (const FMassEntityManager_InitParams_Concurrent &InInitializationParams)
 
virtual ~FConcurrentEntityStorage () override
 
virtual FMassArchetypeDataGetArchetype (int32 Index) override
 
virtual const FMassArchetypeDataGetArchetype (int32 Index) const override
 
virtual TSharedPtr< FMassArchetypeData > & GetArchetypeAsShared (int32 Index) override
 
virtual const TSharedPtr< FMassArchetypeData > & GetArchetypeAsShared (int32 Index) const override
 
virtual void SetArchetypeFromShared (int32 Index, TSharedPtr< FMassArchetypeData > &Archetype) override
 
virtual void SetArchetypeFromShared (int32 Index, const TSharedPtr< FMassArchetypeData > &Archetype) override
 
virtual EEntityState GetEntityState (int32 Index) const override
 
virtual int32 GetSerialNumber (int32 Index) const override
 
virtual bool IsValidIndex (int32 Index) const override
 
virtual bool IsValidHandle (FMassEntityHandle EntityHandle) const override
 
virtual bool IsEntityActive (FMassEntityHandle EntityHandle) const override
 
virtual SIZE_T GetAllocatedSize () const override
 
virtual bool IsValid (int32 Index) const override
 
virtual FMassEntityHandle AcquireOne () override
 
virtual int32 Acquire (TArrayView< FMassEntityHandle > OutEntityHandles) override
 
virtual int32 Release (TConstArrayView< FMassEntityHandle > Handles) override
 
virtual int32 ReleaseOne (FMassEntityHandle Handle) override
 
virtual int32 ForceRelease (TConstArrayView< FMassEntityHandle > Handles) override
 
virtual int32 ForceReleaseOne (FMassEntityHandle Handle) override
 
virtual int32 Num () const override
 
virtual int32 ComputeFreeSize () const override
 
int32 Acquire (const int32 Count, TArray< FMassEntityHandle > &OutEntityHandles)
 
virtual int32 Acquire (TArrayView< FMassEntityHandle > OutEntityHandles)=0
 
- Public Member Functions inherited from UE::Mass::IEntityStorageInterface
virtual ~IEntityStorageInterface ()=default
 
int32 Acquire (const int32 Count, TArray< FMassEntityHandle > &OutEntityHandles)
 

Additional Inherited Members

- Public Types inherited from UE::Mass::IEntityStorageInterface
enum class  EEntityState { Free , Reserved , Created }
 

Detailed Description

This storage backend allows for entities to be concurrently reserved. Reserved entities can also be concurrently freed. Creation of entities (i.e. assignment of an archetype and addition of data into chunks) cannot be done concurrently with this implementation.

Constructor & Destructor Documentation

◆ ~FConcurrentEntityStorage()

UE::Mass::FConcurrentEntityStorage::~FConcurrentEntityStorage ( )
overridevirtual

Member Function Documentation

◆ Acquire() [1/3]

int32 UE::Mass::IEntityStorageInterface::Acquire ( const int32  Count,
TArray< FMassEntityHandle > &  OutEntityHandles 
)
Returns
number of entities actually added

◆ Acquire() [2/3]

int32 UE::Mass::FConcurrentEntityStorage::Acquire ( TArrayView< FMassEntityHandle OutEntityHandles)
overridevirtual

◆ Acquire() [3/3]

virtual int32 UE::Mass::IEntityStorageInterface::Acquire ( TArrayView< FMassEntityHandle OutEntityHandles)
virtual

◆ AcquireOne()

FMassEntityHandle UE::Mass::FConcurrentEntityStorage::AcquireOne ( )
overridevirtual

Produce a single entity handle

Implements UE::Mass::IEntityStorageInterface.

◆ ComputeFreeSize()

int32 UE::Mass::FConcurrentEntityStorage::ComputeFreeSize ( ) const
overridevirtual

Returns the number of entities that are free For debug purposes only. In multi-threaded environments, the result is going to be out of date

Implements UE::Mass::IEntityStorageInterface.

◆ ForceRelease()

int32 UE::Mass::FConcurrentEntityStorage::ForceRelease ( TConstArrayView< FMassEntityHandle Handles)
overridevirtual

Bypasses Serial Number Check Only use if caller has ensured serial number matches or for debug purposes

Implements UE::Mass::IEntityStorageInterface.

◆ ForceReleaseOne()

int32 UE::Mass::FConcurrentEntityStorage::ForceReleaseOne ( FMassEntityHandle  Handle)
overridevirtual

◆ GetAllocatedSize()

SIZE_T UE::Mass::FConcurrentEntityStorage::GetAllocatedSize ( ) const
overridevirtual

◆ GetArchetype() [1/2]

const FMassArchetypeData * UE::Mass::FConcurrentEntityStorage::GetArchetype ( int32  Index) const
overridevirtual

◆ GetArchetype() [2/2]

FMassArchetypeData * UE::Mass::FConcurrentEntityStorage::GetArchetype ( int32  Index)
overridevirtual

◆ GetArchetypeAsShared() [1/2]

const TSharedPtr< FMassArchetypeData > & UE::Mass::FConcurrentEntityStorage::GetArchetypeAsShared ( int32  Index) const
overridevirtual

◆ GetArchetypeAsShared() [2/2]

TSharedPtr< FMassArchetypeData > & UE::Mass::FConcurrentEntityStorage::GetArchetypeAsShared ( int32  Index)
overridevirtual

◆ GetEntityState()

IEntityStorageInterface::EEntityState UE::Mass::FConcurrentEntityStorage::GetEntityState ( int32  Index) const
overridevirtual

Returns true if the given entity at index is currently reserved False if free or assigned an archetype

Implements UE::Mass::IEntityStorageInterface.

◆ GetSerialNumber()

int32 UE::Mass::FConcurrentEntityStorage::GetSerialNumber ( int32  Index) const
overridevirtual

◆ Initialize()

void UE::Mass::FConcurrentEntityStorage::Initialize ( const FMassEntityManager_InitParams_Concurrent InInitializationParams)

◆ IsEntityActive()

bool UE::Mass::FConcurrentEntityStorage::IsEntityActive ( FMassEntityHandle  EntityHandle) const
overridevirtual

◆ IsValid()

bool UE::Mass::FConcurrentEntityStorage::IsValid ( int32  Index) const
overridevirtual

Checks if entity at Index is built

Implements UE::Mass::IEntityStorageInterface.

◆ IsValidHandle()

bool UE::Mass::FConcurrentEntityStorage::IsValidHandle ( FMassEntityHandle  EntityHandle) const
overridevirtual

Checks if the given handle is valid in the context od this storage, i.e. whether the index is valid and the serial number associated with it matches the handle's

Implements UE::Mass::IEntityStorageInterface.

◆ IsValidIndex()

bool UE::Mass::FConcurrentEntityStorage::IsValidIndex ( int32  Index) const
overridevirtual

Checks if index can be used to access entity data

Implements UE::Mass::IEntityStorageInterface.

◆ Num()

int32 UE::Mass::FConcurrentEntityStorage::Num ( ) const
overridevirtual

Returns the number of entities that are not free For debug purposes only. In multi-threaded environments, the result is going to be out of date

Implements UE::Mass::IEntityStorageInterface.

◆ Release()

int32 UE::Mass::FConcurrentEntityStorage::Release ( TConstArrayView< FMassEntityHandle Handles)
overridevirtual

◆ ReleaseOne()

int32 UE::Mass::FConcurrentEntityStorage::ReleaseOne ( FMassEntityHandle  Handle)
overridevirtual

◆ SetArchetypeFromShared() [1/2]

void UE::Mass::FConcurrentEntityStorage::SetArchetypeFromShared ( int32  Index,
const TSharedPtr< FMassArchetypeData > &  Archetype 
)
overridevirtual

◆ SetArchetypeFromShared() [2/2]

void UE::Mass::FConcurrentEntityStorage::SetArchetypeFromShared ( int32  Index,
TSharedPtr< FMassArchetypeData > &  Archetype 
)
overridevirtual

The documentation for this class was generated from the following files: