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

#include <MassEntityManagerStorage.h>

+ Inheritance diagram for UE::Mass::IEntityStorageInterface:

Public Types

enum class  EEntityState { Free , Reserved , Created }
 

Public Member Functions

virtual ~IEntityStorageInterface ()=default
 
virtual FMassArchetypeDataGetArchetype (int32 Index)=0
 
virtual const FMassArchetypeDataGetArchetype (int32 Index) const =0
 
virtual TSharedPtr< FMassArchetypeData > & GetArchetypeAsShared (int32 Index)=0
 
virtual const TSharedPtr< FMassArchetypeData > & GetArchetypeAsShared (int32 Index) const =0
 
virtual void SetArchetypeFromShared (int32 Index, TSharedPtr< FMassArchetypeData > &Archetype)=0
 
virtual void SetArchetypeFromShared (int32 Index, const TSharedPtr< FMassArchetypeData > &Archetype)=0
 
virtual EEntityState GetEntityState (int32 Index) const =0
 
virtual int32 GetSerialNumber (int32 Index) const =0
 
virtual bool IsValidIndex (int32 Index) const =0
 
virtual bool IsValidHandle (FMassEntityHandle EntityHandle) const =0
 
virtual bool IsEntityActive (FMassEntityHandle EntityHandle) const =0
 
virtual SIZE_T GetAllocatedSize () const =0
 
virtual bool IsValid (int32 Index) const =0
 
virtual FMassEntityHandle AcquireOne ()=0
 
int32 Acquire (const int32 Count, TArray< FMassEntityHandle > &OutEntityHandles)
 
virtual int32 Acquire (TArrayView< FMassEntityHandle > OutEntityHandles)=0
 
virtual int32 Release (TConstArrayView< FMassEntityHandle > Handles)=0
 
virtual int32 ReleaseOne (FMassEntityHandle Handles)=0
 
virtual int32 ForceRelease (TConstArrayView< FMassEntityHandle > Handles)=0
 
virtual int32 ForceReleaseOne (FMassEntityHandle Handle)=0
 
virtual int32 Num () const =0
 
virtual int32 ComputeFreeSize () const =0
 

Detailed Description

Interface that abstracts the storage system for Mass Entities in the EntityManager This may be temporary until the concurrent mechanism has been vetted for performance

Member Enumeration Documentation

◆ EEntityState

Enumerator
Free 

Entity index refers to an entity that is free to be reserved or created

Reserved 

Entity index refers to a reserved entity

Created 

Entity index refers to an entity assigned to an archetype

Constructor & Destructor Documentation

◆ ~IEntityStorageInterface()

virtual UE::Mass::IEntityStorageInterface::~IEntityStorageInterface ( )
virtualdefault

Member Function Documentation

◆ Acquire() [1/2]

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

◆ Acquire() [2/2]

◆ AcquireOne()

virtual FMassEntityHandle UE::Mass::IEntityStorageInterface::AcquireOne ( )
pure virtual

Produce a single entity handle

Implemented in UE::Mass::FSingleThreadedEntityStorage, and UE::Mass::FConcurrentEntityStorage.

◆ ComputeFreeSize()

virtual int32 UE::Mass::IEntityStorageInterface::ComputeFreeSize ( ) const
pure virtual

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

Implemented in UE::Mass::FSingleThreadedEntityStorage, and UE::Mass::FConcurrentEntityStorage.

◆ ForceRelease()

virtual int32 UE::Mass::IEntityStorageInterface::ForceRelease ( TConstArrayView< FMassEntityHandle Handles)
pure virtual

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

Implemented in UE::Mass::FSingleThreadedEntityStorage, and UE::Mass::FConcurrentEntityStorage.

◆ ForceReleaseOne()

virtual int32 UE::Mass::IEntityStorageInterface::ForceReleaseOne ( FMassEntityHandle  Handle)
pure virtual

◆ GetAllocatedSize()

virtual SIZE_T UE::Mass::IEntityStorageInterface::GetAllocatedSize ( ) const
pure virtual

◆ GetArchetype() [1/2]

virtual const FMassArchetypeData * UE::Mass::IEntityStorageInterface::GetArchetype ( int32  Index) const
pure virtual

◆ GetArchetype() [2/2]

virtual FMassArchetypeData * UE::Mass::IEntityStorageInterface::GetArchetype ( int32  Index)
pure virtual

◆ GetArchetypeAsShared() [1/2]

virtual const TSharedPtr< FMassArchetypeData > & UE::Mass::IEntityStorageInterface::GetArchetypeAsShared ( int32  Index) const
pure virtual

◆ GetArchetypeAsShared() [2/2]

virtual TSharedPtr< FMassArchetypeData > & UE::Mass::IEntityStorageInterface::GetArchetypeAsShared ( int32  Index)
pure virtual

◆ GetEntityState()

virtual EEntityState UE::Mass::IEntityStorageInterface::GetEntityState ( int32  Index) const
pure virtual

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

Implemented in UE::Mass::FSingleThreadedEntityStorage, and UE::Mass::FConcurrentEntityStorage.

◆ GetSerialNumber()

virtual int32 UE::Mass::IEntityStorageInterface::GetSerialNumber ( int32  Index) const
pure virtual

◆ IsEntityActive()

virtual bool UE::Mass::IEntityStorageInterface::IsEntityActive ( FMassEntityHandle  EntityHandle) const
pure virtual

◆ IsValid()

virtual bool UE::Mass::IEntityStorageInterface::IsValid ( int32  Index) const
pure virtual

Checks if entity at Index is built

Implemented in UE::Mass::FSingleThreadedEntityStorage, and UE::Mass::FConcurrentEntityStorage.

◆ IsValidHandle()

virtual bool UE::Mass::IEntityStorageInterface::IsValidHandle ( FMassEntityHandle  EntityHandle) const
pure virtual

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

Implemented in UE::Mass::FSingleThreadedEntityStorage, and UE::Mass::FConcurrentEntityStorage.

◆ IsValidIndex()

virtual bool UE::Mass::IEntityStorageInterface::IsValidIndex ( int32  Index) const
pure virtual

Checks if index can be used to access entity data

Implemented in UE::Mass::FSingleThreadedEntityStorage, and UE::Mass::FConcurrentEntityStorage.

◆ Num()

virtual int32 UE::Mass::IEntityStorageInterface::Num ( ) const
pure virtual

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

Implemented in UE::Mass::FSingleThreadedEntityStorage, and UE::Mass::FConcurrentEntityStorage.

◆ Release()

virtual int32 UE::Mass::IEntityStorageInterface::Release ( TConstArrayView< FMassEntityHandle Handles)
pure virtual

◆ ReleaseOne()

virtual int32 UE::Mass::IEntityStorageInterface::ReleaseOne ( FMassEntityHandle  Handles)
pure virtual

◆ SetArchetypeFromShared() [1/2]

virtual void UE::Mass::IEntityStorageInterface::SetArchetypeFromShared ( int32  Index,
const TSharedPtr< FMassArchetypeData > &  Archetype 
)
pure virtual

◆ SetArchetypeFromShared() [2/2]

virtual void UE::Mass::IEntityStorageInterface::SetArchetypeFromShared ( int32  Index,
TSharedPtr< FMassArchetypeData > &  Archetype 
)
pure virtual

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