Apparatus Version 1.23
ECS data-oriented workflow for Unreal Engine.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
FSubjectInfo Struct Reference

The internal state for the main subject entity. More...

#include <SubjectInfo.h>

Public Types

typedef int32 IdType
 The type for the unique subject identifier.
 
typedef uint8 MechanismIdType
 The type for the mechanism identifier.
 
typedef int32 SlotIndexType
 The type of the chunk slot index of the subject.
 
typedef uint32 GenerationType
 The type for the subject generation.
 

Public Member Functions

bool IsValid () const
 Check if this is an information block about some actually spawned subject.
 
IdType GetId () const
 Get the unique identifier of the subject.
 
MechanismIdType GetMechanismId () const
 Get the identifier of the mechanism the subject is part of.
 
IdType GetPlace () const
 Get the place index of the subject.
 
UChunkGetChunk () const
 Get the chunk this subject resides in.
 
UWorld * GetWorld () const
 Get the Unreal world the subject resides within.
 
AMechanismGetMechanism () const
 Get the mechanism the subject resides within.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > SetMechanism (AMechanism *const Mechanism)
 Transition the subject to a designated mechanism.
 
bool IsSolid () const
 Check if the subject is in a solid state now.
 
const FFingerprintGetFingerprint () const
 Get the active fingerprint of the subject.
 
template<typename SubjectHandleT = FSubjectHandle>
SubjectHandleT GetHandle () const
 Get the subject handle corresponding to this information structure.
 
template<typename SubjectHandleT >
EApparatusStatus GetHandle (SubjectHandleT &OutSubject) const
 Get a constant subject handle from the subject information.
 
ISubjectiveGetSubjective () const
 Get the subjective associated with a subject (if any).
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > CopyTraitsTo (FSubjectInfo *const Destination) const
 Copy all of the traits from the subject to some other subject.
 
FSubjectInfooperator= (const FSubjectInfo &)=delete
 Copying of the subject information structures is not supported.
 
 FSubjectInfo ()
 Default constructor.
 
 FSubjectInfo (const FSubjectInfo &)=delete
 Copying of the subject information structures is not supported.
 
Trait Data Access
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, const void * > GetTraitPtr (UScriptStruct *const TraitType) const
 Get a read-only trait data pointer from a subject by its type.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, void * > GetTraitPtr (UScriptStruct *const TraitType)
 Get a trait data pointer from a subject by its type.
 
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, const T * > GetTraitPtr () const
 Get a read-only trait data pointer from a subject by its type.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, const T * > GetTraitPtr () const
 Get a read-only trait data pointer from a subject by its type.
 
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, T * > GetTraitPtr ()
 Get a trait data pointer from a subject by its type.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, T * > GetTraitPtr ()
 Get a trait data pointer from a subject by its type.
 
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
const TGetTraitRef () const
 Get a read-only trait reference from a subject by its type.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
const TGetTraitRef () const
 Get a read-only trait reference from a subject by its type.
 
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TGetTraitRef ()
 Get a trait reference from a subject by its type.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
TGetTraitRef ()
 Get a trait reference from a subject by its type.
 
Trait Setting
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > SetTrait (UScriptStruct *const TraitType, const void *const TraitData)
 Set a trait of the subject by its type.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > SetTrait (const FTraitRecord &TraitRecord)
 Set a trait of the subject to the record contents.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal, typename TraitsExtractorT = void>
TOutcome< Paradigm > SetTraits (const TraitsExtractorT &TraitsExtractor, const bool bLeaveRedundant=true)
 Set multiple subject traits equal to the supplied list.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal, typename A1 = FDefaultAllocator, typename A2 = FDefaultAllocator, typename T = void>
TOutcome< Paradigm > SetTraits (const TArray< UScriptStruct *, A1 > &TraitsTypes, const TArray< const T *, A2 > &TraitsData, const bool bLeaveRedundant=true)
 Set multiple subject traits equal to the supplied list.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > SetTraits (const FSubjectRecord &SubjectRecord, const bool bLeaveRedundant=true)
 Set multiple subject traits from a subject record.
 
template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> SetTrait (const T *const Trait)
 Set a trait of the subject with a pointer it.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
auto SetTrait (const T *const Trait)
 Set a trait of the subject with a pointer to it.
 
template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> SetTrait (const T &Trait)
 Set a trait of the subject.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
auto SetTrait (const T &Trait)
 Set a trait of the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal, typename TraitsExtractorT = void>
TOutcome< Paradigm > OverwriteTraits (const TraitsExtractorT &TraitsExtractor)
 Overwrite existing traits from a generic extractor.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal, typename A1 = FDefaultAllocator, typename A2 = FDefaultAllocator, typename T = void>
TOutcome< Paradigm > OverwriteTraits (const TArray< UScriptStruct *, A1 > &TraitsTypes, const TArray< const T *, A2 > &TraitsData)
 Overwrite existing subject traits from the array.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > OverwriteTraits (const FSubjectRecord &SubjectRecord)
 Overwrite existing traits of the subject to the record contents.
 
Deferred Trait Setting
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > SetTraitDeferred (UScriptStruct *const TraitType, const void *const TraitData)
 Set a trait of the subject by its type.
 
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm > SetTraitDeferred (const T &Trait)
 Set a trait of the subject by its type.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
auto SetTraitDeferred (const T &Trait)
 Set a trait of the subject by its type.
 
Trait Getting
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > GetTrait (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait from the subject by its type.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > GetTrait (FTraitRecord &OutTraitRecord) const
 Get a trait from the subject into a trait record.
 
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm > GetTrait (T &OutTrait, const bool bTraitDataInitialized=true) const
 Get a trait from a subject by its type.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
TOutcome< Paradigm > GetTrait (T &OutTrait, const bool bTraitDataInitialized=true) const
 Get a trait from a subject by its type.
 
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, TGetTrait () const
 Get a trait copy from a subject by its type.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, TGetTrait () const
 Get a trait copy from a subject by its type.
 
Trait Obtainment
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, void * > ObtainTraitPtr (UScriptStruct *const TraitType)
 Obtain a trait data pointer from a subject by its type.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > ObtainTrait (UScriptStruct *const TraitType)
 Obtain a trait for a subject by its type.
 
template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >(), T * > ObtainTraitPtr ()
 Obtain a trait data pointer from the subject by its type.
 
template<typename T >
auto ObtainTraitPtr ()
 Obtain a trait data pointer from the subject by its type.
 
template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >(), T & > ObtainTraitRef ()
 Obtain a trait reference from the subject by its type.
 
template<typename T >
auto ObtainTraitRef ()
 Obtain a trait reference from the subject by its type.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > ObtainTrait (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true)
 Obtain a trait from the subject by its type.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal, typename T = void>
TOutcomeIf< Paradigm, IsTraitType< T >()> ObtainTrait (T *const OutTraitData, const bool bTraitDataInitialized=true)
 Obtain a trait from the subject by its type.
 
template<EParadigm Paradigm, typename T >
auto ObtainTrait (T &OutTrait, const bool bTraitDataInitialized=true)
 Obtain a trait from the subject.
 
template<typename T >
auto ObtainTrait (T &OutTrait, const bool bTraitDataInitialized=true)
 Obtain a trait from the subject.
 
template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >(), TObtainTrait ()
 Obtain a trait from the subject.
 
template<typename T >
auto ObtainTrait ()
 Obtain a trait from the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > ObtainTraitDeferred (UScriptStruct *const TraitType)
 Obtain a trait from a subject.
 
template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >(), TObtainTraitDeferred ()
 Obtain a trait from a subject.
 
template<typename T >
auto ObtainTraitDeferred ()
 Obtain a trait from a subject.
 
Traits Removal
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > RemoveTrait (UScriptStruct *const TraitType)
 Remove a trait from the subject.
 
template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> RemoveTrait ()
 Remove a trait from the subject.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
auto RemoveTrait ()
 Remove a trait from the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > RemoveAllTraits ()
 Remove all of the traits from the subject.
 
Deferred Trait Removal
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > RemoveTraitDeferred (UScriptStruct *const TraitType, const bool bForceEnqueue=false)
 Remove a trait from the subject.
 
template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> RemoveTraitDeferred (const bool bForceEnqueue=false)
 Remove a trait from the subject.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
auto RemoveTraitDeferred (const bool bForceEnqueue=false)
 Remove a trait from the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > RemoveAllTraitsDeferred (const bool bForceEnqueue=false)
 Remove all of the traits from the subject.
 
Flagmark
EFlagmark GetFlagmark () const
 Get the flagmark of the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, EFlagmarkSetFlagmark (const EFlagmark Flagmark)
 Set the flagmark of the subject.
 
EApparatusStatus SetFlagmark_Status (const EFlagmark Flagmark)
 Set the flagmark of the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, EFlagmarkSetFlagmarkMasked (const EFlagmark Flagmark, const EFlagmark Mask)
 Set the flagmark of the subject to a masked flagmark.
 
EApparatusStatus SetFlagmarkMasked_Status (const EFlagmark Flagmark, const EFlagmark Mask)
 Set the flagmark of the subject to a masked flagmark.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, EFlagmarkAddToFlagmark (const EFlagmark Flagmark)
 Add flags to the subject's flagmark.
 
bool HasFlag (const EFlagmarkBit Flag) const
 Get the state of a subject flag.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, boolSetFlag (const EFlagmarkBit Flag, const bool State=true)
 Set the state of a subject flag.
 
EApparatusStatus SetFlag_Status (const EFlagmarkBit Flag, const bool State=true)
 Set the state of a subject flag.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, boolToggleFlag (const EFlagmarkBit Flag)
 Toggle the state of a subject flag.
 
Networking
UNetConnection * GetNetConnection () const
 Get the owning net connection of the subject (if any).
 
bool IsOnline () const
 Check if the subject currently networked.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > BringOnline ()
 Make the subject networked.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > BringOnline (const TRange< SubjectNetworkIdType > &IdRange)
 Make the subject networked while using a custom network identifiers range.
 
SubjectNetworkIdType GetNetworkId () const
 Get a unique network identifier of a subject (if any).
 
bool IsInNetworkMode (const ENetMode Mode) const
 Check if the subject is of a certain network mode.
 
bool IsServerSide () const
 Check if this is a server-side version of the subject.
 
bool IsClientSide () const
 Check if this is a client-side version of the subject.
 
UNetConnection * GetConnectionPermit () const
 Get the server-side connection that is allowed to push traits to the server's version of the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > SetConnectionPermit (UNetConnection *const Connection)
 Set the server-side connection that is allowed to push traits to the server's version of the subject.
 
const FTraitmarkGetTraitmarkPermit () const
 Get the server-side list of traits allowed to be received from clients.
 
template<EParadigm Paradigm = EParadigm::Default>
TOutcome< Paradigm > SetTraitmarkPermit (const FTraitmark &InTraitmarkPermit)
 Set the list of traits allowed to be received from clients on the server.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > PushTrait (UScriptStruct *const TraitType, EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) const
 Send an existing trait to the remote version of the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > PushTrait (UScriptStruct *const TraitType, const void *const TraitData, EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true)
 Send an additional trait to the remote version of the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > PushTrait (UScriptStruct *const TraitType, const void *const TraitData, const bool bSetForLocal, EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true)
 Send an additional trait to the remote version of the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal, typename T = void>
TOutcomeIf< Paradigm, IsTraitType< T >()> PushTrait (const T &Trait, const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true)
 Send an additional trait to the remote version of the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal, typename T = void>
TOutcomeIf< Paradigm, IsTraitType< T >()> PushTrait (const T &Trait, const bool bSetForLocal=false, const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true)
 Send an additional trait to the remote version of the subject.
 
template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> PushTrait (const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) const
 Send an existing trait to the remote version of the subject.
 
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcomeIf< Paradigm, IsTraitType< T >()> PushTrait (const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) const
 Send an existing trait to the remote version of the subject.
 
Despawning
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > Despawn ()
 Destroy the subject.
 
template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > DespawnDeferred (const bool bHard=true)
 Destroy the subject.
 

Static Public Member Functions

static constexpr MechanismIdType ExtractMechanismId (const IdType InSubjectId)
 Extract a mechanism identifier from a subject identifier.
 
static constexpr IdType ExtractPlace (const IdType InSubjectId)
 Extract a subject place from a subject identifier.
 
static IdType MakeId (const MechanismIdType MechanismId, const IdType Place)
 Make a subject identifier from a mechanism identifier and a subject placement index.
 

Static Public Attributes

static constexpr IdType InvalidId = 0
 Invalid subject identifier.
 
static constexpr IdType FirstPlace = 0x1
 A first valid subject place.
 
static constexpr SlotIndexType InvalidSlotIndex = -1
 Invalid subject slot index within the chunk.
 
static constexpr auto SlotsPerChunkMax = TNumericLimits<SlotIndexType>::Max()
 The maximum number of subject slots per chunk.
 
static constexpr int MechanismIdShift = 24
 The shift of the subject identifier to recover the mechanism identifier.
 
static constexpr IdType ShiftedMechanismIdMask = 0xFF000000
 The mask for the shifted mechanism identifier.
 
static constexpr IdType PlaceMask = 0xFFFFFF
 The mask for the subject index within a mechanism's subject pool which resides in the machine.
 
static constexpr IdType InvalidPlace = 0x0
 An invalid subject place identifier.
 
static constexpr IdType PlacesPerMechanismMax = 0xFFFFFF
 The maximum number of subjects within the mechanism.
 
static constexpr IdType LastPlace = PlacesPerMechanismMax - 1
 The maximum possible subject place within the mechanism.
 
static constexpr GenerationType FirstGeneration = 0
 The first valid generation.
 
static constexpr GenerationType LastGeneration = TNumericLimits<GenerationType>::Max()
 The maximum valid generation.
 

Friends

struct FCommonSubjectHandle
 
struct FSubjectHandle
 
struct FSubjectNetworkState
 
struct FSolidSubjectHandle
 
struct FConstSubjectHandle
 
struct FSubjectRecord
 
class ASubjectiveActor
 
class USubjectiveActorComponent
 
class UChunk
 
class UNetworkBearerComponent
 
template<typename SubjectHandleT >
struct TChunkIt
 
template<typename SubjectHandleT >
struct TBeltIt
 
template<typename ChunkItT , typename BeltItT , EParadigm Paradigm>
struct TChain
 
class UMachine
 
class AMechanism
 
class ISubjective
 

Detailed Description

The internal state for the main subject entity.

Subjects are not used directly but instead are referenced through FSubjectHandle and FSolidSubjectHandle.

Member Typedef Documentation

◆ GenerationType

The type for the subject generation.

For the reasons of longevity the generation actually doesn't have an invalid value but is essentially looping its value on overflow.

◆ IdType

typedef int32 FSubjectInfo::IdType

The type for the unique subject identifier.

◆ MechanismIdType

The type for the mechanism identifier.

◆ SlotIndexType

The type of the chunk slot index of the subject.

Constructor & Destructor Documentation

◆ FSubjectInfo() [1/2]

FSubjectInfo::FSubjectInfo ( )
inline

Default constructor.

◆ FSubjectInfo() [2/2]

FSubjectInfo::FSubjectInfo ( const FSubjectInfo )
delete

Copying of the subject information structures is not supported.

Member Function Documentation

◆ AddToFlagmark()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, EFlagmark > FSubjectInfo::AddToFlagmark ( const EFlagmark  Flagmark)

Add flags to the subject's flagmark.

The operations is atomic and thread-safe.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
FlagmarkThe flagmark to add.
Returns
The previous flagmark.

◆ BringOnline() [1/2]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::BringOnline ( )

Make the subject networked.

Server-only method.

This assigns a new, unique, cross-peer identifier to the subject and spawns an empty instance of it on the client(s).

If the subject is already online, nothing is performed.

Returns
The outcome of the operation.
EApparatusStatus::Noop if the subject is already online.
See also
IsOnline() GetNetworkId()

◆ BringOnline() [2/2]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::BringOnline ( const TRange< SubjectNetworkIdType > &  IdRange)

Make the subject networked while using a custom network identifiers range.

Server-only method.

This assigns a new, unique, cross-peer identifier to the subject and spawns an empty instance of it on the client(s).

If the subject is already online, nothing is performed.

Parameters
IdRangeThe range of identifiers to allocate within.
Returns
The outcome of the operation.
EApparatusStatus::Noop if the subject is already online.
See also
IsOnline() GetNetworkId()

◆ CopyTraitsTo()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::CopyTraitsTo ( FSubjectInfo *const  Destination) const

Copy all of the traits from the subject to some other subject.

The existing traits of the destination subject are not removed but the new ones are added and/or override the existing matching.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
DestinationThe destination subject to copy to. May not be a nullptr.
Returns
The outcome of the operation.

◆ Despawn()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::Despawn ( )

Destroy the subject.

Template Parameters
ParadigmThe paradigm to work under.
Returns
The outcome of the operation.

◆ DespawnDeferred()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::DespawnDeferred ( const bool  bHard = true)

Destroy the subject.

Deferred version.

The actual entity destruction is deferred until the deferreds are applied either automatically or manually.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
bHardShould the hard version of the operation be performed.
Returns
The status of the operation.

◆ ExtractMechanismId()

static constexpr MechanismIdType FSubjectInfo::ExtractMechanismId ( const IdType  InSubjectId)
inlinestaticconstexpr

Extract a mechanism identifier from a subject identifier.

A mechanism identifier is its unique index.

Parameters
InSubjectIdThe subject identifier to extract from.
Returns
The mechanism identifier.

◆ ExtractPlace()

static constexpr IdType FSubjectInfo::ExtractPlace ( const IdType  InSubjectId)
inlinestaticconstexpr

Extract a subject place from a subject identifier.

A place is a unique subject index within its mechanism.

Parameters
InSubjectIdThe subject identifier to extract from.
Returns
The subject place.

◆ GetChunk()

UChunk * FSubjectInfo::GetChunk ( ) const
inline

Get the chunk this subject resides in.

◆ GetConnectionPermit()

UNetConnection * FSubjectInfo::GetConnectionPermit ( ) const

Get the server-side connection that is allowed to push traits to the server's version of the subject.

Can only be queried from a server-side subject.

See also
SetConnectionPermit()

◆ GetFingerprint()

const FFingerprint & FSubjectInfo::GetFingerprint ( ) const

Get the active fingerprint of the subject.

◆ GetFlagmark()

EFlagmark FSubjectInfo::GetFlagmark ( ) const

Get the flagmark of the subject.

The examination is atomic and thread-safe.

◆ GetHandle() [1/2]

template<typename SubjectHandleT = FSubjectHandle>
SubjectHandleT FSubjectInfo::GetHandle ( ) const
inline

Get the subject handle corresponding to this information structure.

Template Parameters
SubjectHandleTThe type of the subject handle to get.
Returns
The subject handle.

◆ GetHandle() [2/2]

template<typename SubjectHandleT >
EApparatusStatus FSubjectInfo::GetHandle ( SubjectHandleT &  OutSubject) const
inline

Get a constant subject handle from the subject information.

Template Parameters
SubjectHandleTThe type of the subject handle to get.
Parameters
OutSubjectThe subject handle to initialize.
Returns
The status of the operation.

◆ GetId()

IdType FSubjectInfo::GetId ( ) const
inline

Get the unique identifier of the subject.

◆ GetMechanism()

AMechanism * FSubjectInfo::GetMechanism ( ) const

Get the mechanism the subject resides within.

This is derived from the current chunk.

See also
SetMechanism(), GetChunk()

◆ GetMechanismId()

MechanismIdType FSubjectInfo::GetMechanismId ( ) const
inline

Get the identifier of the mechanism the subject is part of.

◆ GetNetConnection()

UNetConnection * FSubjectInfo::GetNetConnection ( ) const
inline

Get the owning net connection of the subject (if any).

◆ GetNetworkId()

SubjectNetworkIdType FSubjectInfo::GetNetworkId ( ) const
inline

Get a unique network identifier of a subject (if any).

This unique identifier clearly and unequivocally identifies a subject within multiple peers (client(s) and server) and is used internally to address the subject in the networking environment.

Returns
The unique cross-peer identifier of the subject or FSubjectNetworkState::InvalidId, if the subject is not online just yet.
See also
IsOnline() BringOnline()

◆ GetPlace()

IdType FSubjectInfo::GetPlace ( ) const
inline

Get the place index of the subject.

This is the index of the subject information structure within the mechanism's subject pool.

◆ GetSubjective()

ISubjective * FSubjectInfo::GetSubjective ( ) const
inline

Get the subjective associated with a subject (if any).

◆ GetTrait() [1/6]

template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, T > FSubjectInfo::GetTrait ( ) const
inline

Get a trait copy from a subject by its type.

Templated version.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to get.
Returns
A copy of the trait.

◆ GetTrait() [2/6]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, T > FSubjectInfo::GetTrait ( ) const
inline

Get a trait copy from a subject by its type.

Templated version.

Template Parameters
TThe type of the trait to get.
ParadigmThe paradigm to work under.
Returns
A copy of the trait.

◆ GetTrait() [3/6]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::GetTrait ( FTraitRecord &  OutTraitRecord) const

Get a trait from the subject into a trait record.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
[out]OutTraitRecordThe trait record to receive the trait. Its type must be set accordingly beforehand.
Returns
The outcome of the operation.
EApparatusStatus::Missing If the subject is not within the subject.

◆ GetTrait() [4/6]

template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm > FSubjectInfo::GetTrait ( T OutTrait,
const bool  bTraitDataInitialized = true 
) const
inline

Get a trait from a subject by its type.

Templated version.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to get.
Parameters
OutTraitThe trait receiver.
bTraitDataInitializedIs the OutTrait actually initialized?
Returns
The status of the operation.
EApparatusStatus::Missing If the subject is not within the subject.

◆ GetTrait() [5/6]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
TOutcome< Paradigm > FSubjectInfo::GetTrait ( T OutTrait,
const bool  bTraitDataInitialized = true 
) const
inline

Get a trait from a subject by its type.

Templated version.

Template Parameters
TThe type of the trait to get.
ParadigmThe paradigm to work under.
Parameters
OutTraitThe trait receiver.
bTraitDataInitializedIs the OutTrait actually initialized?
Returns
The status of the operation.
EApparatusStatus::Missing If the subject is not within the subject.

◆ GetTrait() [6/6]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::GetTrait ( UScriptStruct *const  TraitType,
void *const  OutTraitData,
const bool  bTraitDataInitialized = true 
) const

Get a trait from the subject by its type.

Parameters
[in]TraitTypeThe type of the trait to get.
[out]OutTraitDataThe trait data receiver. Must have enough bytes for the trait to be copied.
[in]bTraitDataInitializedIs the OutTraitData buffer actually initialized?
Returns
The outcome of the operation.
EApparatusStatus::Missing If there is no such trait within the subject.

◆ GetTraitmarkPermit()

const FTraitmark & FSubjectInfo::GetTraitmarkPermit ( ) const

Get the server-side list of traits allowed to be received from clients.

Can only be queried from a server-side subject.

See also
SetTraitmarkPermit()

◆ GetTraitPtr() [1/6]

template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, T * > FSubjectInfo::GetTraitPtr ( )
inline

Get a trait data pointer from a subject by its type.

Templated paradigm version.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to get.
Returns
The pointer to the trait data or nullptr.

◆ GetTraitPtr() [2/6]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, T * > FSubjectInfo::GetTraitPtr ( )
inline

Get a trait data pointer from a subject by its type.

Templated version.

Template Parameters
TThe type of the trait to get.
ParadigmThe paradigm to work under.
Returns
The pointer to the trait data or nullptr.

◆ GetTraitPtr() [3/6]

template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, const T * > FSubjectInfo::GetTraitPtr ( ) const
inline

Get a read-only trait data pointer from a subject by its type.

Templated paradigm constant version.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to get.
Returns
The pointer to the read-only trait data or nullptr.

◆ GetTraitPtr() [4/6]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, const T * > FSubjectInfo::GetTraitPtr ( ) const
inline

Get a read-only trait data pointer from a subject by its type.

Templated constant version.

Template Parameters
TThe type of the trait to get.
ParadigmThe paradigm to work under.
Returns
The pointer to the read-only trait data or nullptr.

◆ GetTraitPtr() [5/6]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, void * > FSubjectInfo::GetTraitPtr ( UScriptStruct *const  TraitType)

Get a trait data pointer from a subject by its type.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to get.
Returns
A pointer to the trait data.
nullptr If there is no such trait in the subject.

◆ GetTraitPtr() [6/6]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, const void * > FSubjectInfo::GetTraitPtr ( UScriptStruct *const  TraitType) const

Get a read-only trait data pointer from a subject by its type.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to get.
Returns
A pointer to the read-only trait data.
nullptr If there is no such trait in the subject.

◆ GetTraitRef() [1/4]

template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
T & FSubjectInfo::GetTraitRef ( )
inline

Get a trait reference from a subject by its type.

Templated version.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to get.
Returns
A reference to the trait data.

◆ GetTraitRef() [2/4]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
T & FSubjectInfo::GetTraitRef ( )
inline

Get a trait reference from a subject by its type.

Templated version.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to get.
Returns
A reference to the trait data.

◆ GetTraitRef() [3/4]

template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
const T & FSubjectInfo::GetTraitRef ( ) const
inline

Get a read-only trait reference from a subject by its type.

Constant templated version.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to get.
Returns
A reference to the read-only trait data.

◆ GetTraitRef() [4/4]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
const T & FSubjectInfo::GetTraitRef ( ) const
inline

Get a read-only trait reference from a subject by its type.

Constant templated version.

Template Parameters
TThe type of the trait to get.
ParadigmThe paradigm to work under.
Returns
A reference to the read-only trait data.

◆ GetWorld()

UWorld * FSubjectInfo::GetWorld ( ) const

Get the Unreal world the subject resides within.

This is derived from the mechanism.

See also
GetMechanism()

◆ HasFlag()

bool FSubjectInfo::HasFlag ( const EFlagmarkBit  Flag) const

Get the state of a subject flag.

The examination is atomic and thread-safe.

Parameters
FlagThe flag to get the state of.
Returns
The state of the flag.

◆ IsClientSide()

bool FSubjectInfo::IsClientSide ( ) const

Check if this is a client-side version of the subject.

A subject must be both online and be part of a client world's mechanism in order to be considered client-side.

See also
IsOnline() IsServerSide()

◆ IsInNetworkMode()

bool FSubjectInfo::IsInNetworkMode ( const ENetMode  Mode) const

Check if the subject is of a certain network mode.

The subject's world is used to determine the mode (if any), otherwise false is returned, unless the mode is ENetMode::Standalone.

Parameters
ModeThe network mode to check against.
Returns
The state of examination.

◆ IsOnline()

bool FSubjectInfo::IsOnline ( ) const

Check if the subject currently networked.

Networked subject can receive and push traits over the network to the remote versions of themselves.

See also
GetNetworkId() BringOnline()

◆ IsServerSide()

bool FSubjectInfo::IsServerSide ( ) const

Check if this is a server-side version of the subject.

A subject must be both online and be part of a server world's mechanism in order to be considered server-side.

See also
IsOnline() IsClientSide()

◆ IsSolid()

bool FSubjectInfo::IsSolid ( ) const

Check if the subject is in a solid state now.

The subject is solid if it's either a part of a solid chunk or a part of a concurrent environment.

◆ IsValid()

bool FSubjectInfo::IsValid ( ) const
inline

Check if this is an information block about some actually spawned subject.

Note
The info can be valid though the subject can be already stale.
Returns
The state of examination.

◆ MakeId()

static IdType FSubjectInfo::MakeId ( const MechanismIdType  MechanismId,
const IdType  Place 
)
inlinestatic

Make a subject identifier from a mechanism identifier and a subject placement index.

Parameters
MechanismIdThe identifier of the mechanism.
PlaceThe place of the subject within the mechanism.
Returns
The global subject identifier.

◆ ObtainTrait() [1/7]

template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >(), T > FSubjectInfo::ObtainTrait ( )
inline

Obtain a trait from the subject.

Templated paradigm copy-returning version.

If the trait is not currently within the subject, it gets created anew and returned.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to obtain.
Returns
A copy of the trait.

◆ ObtainTrait() [2/7]

template<typename T >
auto FSubjectInfo::ObtainTrait ( )
inline

Obtain a trait from the subject.

Templated copy-returning version.

If the trait is not currently within the subject, it gets created anew and returned.

Template Parameters
TThe type of the trait to obtain.
Returns
A copy of the trait.

◆ ObtainTrait() [3/7]

template<EParadigm Paradigm, typename T >
auto FSubjectInfo::ObtainTrait ( T OutTrait,
const bool  bTraitDataInitialized = true 
)
inline

Obtain a trait from the subject.

Templated paradigm outputting version.

If the trait is not currently within the subject, it gets created anew and the default value gets copied to the receiver.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to obtain.
Parameters
[out]OutTraitThe trait receiver.
[in]bTraitDataInitializedIs the OutTrait actually initialized?
Returns
The outcome of the operation.

◆ ObtainTrait() [4/7]

template<typename T >
auto FSubjectInfo::ObtainTrait ( T OutTrait,
const bool  bTraitDataInitialized = true 
)
inline

Obtain a trait from the subject.

Templated copying to destination version.

If the trait is not currently within the subject, it gets created anew and the default value gets copied to the receiver.

Template Parameters
TThe type of the trait to obtain.
Parameters
[out]OutTraitThe trait receiver.
[in]bTraitDataInitializedIs the OutTrait actually initialized?
Returns
The outcome of the operation.

◆ ObtainTrait() [5/7]

template<EParadigm Paradigm = EParadigm::DefaultInternal, typename T = void>
TOutcomeIf< Paradigm, IsTraitType< T >()> FSubjectInfo::ObtainTrait ( T *const  OutTraitData,
const bool  bTraitDataInitialized = true 
)
inline

Obtain a trait from the subject by its type.

Outputting to pointer version.

If the trait is not currently within the subject, it gets created anew and the default value gets copied to the receiver.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to obtain.
Parameters
[out]OutTraitDataThe trait data receiver pointer.
[in]bTraitDataInitializedIs the TraitData buffer actually initialized?
Returns
The status of the operation.

◆ ObtainTrait() [6/7]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::ObtainTrait ( UScriptStruct *const  TraitType)

Obtain a trait for a subject by its type.

Plain ensuring version without return value.

If the trait is not currently within the subject, it gets created anew for the subject.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to obtain.
Returns
The outcome of the operation.

◆ ObtainTrait() [7/7]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::ObtainTrait ( UScriptStruct *const  TraitType,
void *const  OutTraitData,
const bool  bTraitDataInitialized = true 
)

Obtain a trait from the subject by its type.

Outputting version.

If the trait is not currently within the subject, it gets created anew and the default value gets copied to the receiver.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
[in]TraitTypeThe type of the trait to obtain.
[out]OutTraitDataThe trait data receiver pointer. Must be enough to hold the TraitType instance.
[in]bTraitDataInitializedIs the TraitData buffer actually initialized?
Returns
The status of the operation.

◆ ObtainTraitDeferred() [1/3]

template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >(), T > FSubjectInfo::ObtainTraitDeferred ( )

Obtain a trait from a subject.

Templated paradigm deferred version.

If the trait is not currently within the subject, a default trait is returned.

The actual change (if any) will be deferred until the deferreds are applied either manually or automatically.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to obtain.
Returns
A copy of the trait.

◆ ObtainTraitDeferred() [2/3]

template<typename T >
auto FSubjectInfo::ObtainTraitDeferred ( )
inline

Obtain a trait from a subject.

Templated deferred version.

If the trait is not currently within the subject, a default trait is returned.

The actual change (if any) will be deferred until the deferreds are applied either manually or automatically.

Template Parameters
TThe type of the trait to obtain.
Returns
A copy of the trait.

◆ ObtainTraitDeferred() [3/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::ObtainTraitDeferred ( UScriptStruct *const  TraitType)

Obtain a trait from a subject.

Deferred version.

If the trait is not currently within the subject, a EApparatusStatus::Deferred is returned.

The actual change (if any) will be deferred until the deferreds are applied either manually or automatically.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to obtain. Must not be a nullptr.
Returns
The status of the operation.

◆ ObtainTraitPtr() [1/3]

template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >(), T * > FSubjectInfo::ObtainTraitPtr ( )
inline

Obtain a trait data pointer from the subject by its type.

Templated paradigm version

If the trait is not currently within the subject, it gets created anew and returned to the receiver.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to obtain.
Returns
The obtained trait pointer.

◆ ObtainTraitPtr() [2/3]

template<typename T >
auto FSubjectInfo::ObtainTraitPtr ( )
inline

Obtain a trait data pointer from the subject by its type.

Templated version

If the trait is not currently within the subject, it gets created anew and returned to the receiver.

Template Parameters
TThe type of the trait to obtain.
Returns
The obtained trait pointer.

◆ ObtainTraitPtr() [3/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, void * > FSubjectInfo::ObtainTraitPtr ( UScriptStruct *const  TraitType)

Obtain a trait data pointer from a subject by its type.

If the trait is not currently within the subject, it gets created anew and returned to the receiver.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to obtain.
Returns
The obtained trait data pointer.

◆ ObtainTraitRef() [1/2]

template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >(), T & > FSubjectInfo::ObtainTraitRef ( )
inline

Obtain a trait reference from the subject by its type.

Templated paradigm version

If the trait is not currently within the subject, it gets created anew and its reference is returned to the user.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to obtain.
Returns
The obtained reference to the trait.

◆ ObtainTraitRef() [2/2]

template<typename T >
auto FSubjectInfo::ObtainTraitRef ( )
inline

Obtain a trait reference from the subject by its type.

Templated version

If the trait is not currently within the subject, it gets created anew and its reference is returned to the user.

Template Parameters
TThe type of the trait to obtain.
Returns
The obtained trait reference.

◆ operator=()

FSubjectInfo & FSubjectInfo::operator= ( const FSubjectInfo )
delete

Copying of the subject information structures is not supported.

◆ OverwriteTraits() [1/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::OverwriteTraits ( const FSubjectRecord SubjectRecord)

Overwrite existing traits of the subject to the record contents.

If the trait of the corresponding type is not currently within the subject, it gets created anew and set accordingly.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
SubjectRecordThe subject record to overwrite with.
Returns
The outcome of the operation.

◆ OverwriteTraits() [2/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal, typename A1 = FDefaultAllocator, typename A2 = FDefaultAllocator, typename T = void>
TOutcome< Paradigm > FSubjectInfo::OverwriteTraits ( const TArray< UScriptStruct *, A1 > &  TraitsTypes,
const TArray< const T *, A2 > &  TraitsData 
)

Overwrite existing subject traits from the array.

Template Parameters
ParadigmThe paradigm to work under.
A1The allocator type of the types array.
A2The allocator type of the traits data array.
TThe type of the traits data elements. May be a void.
Parameters
TraitsTypesThe types of traits to overwrite.
TraitsDataThe corresponding traits data to overwrite with.
Returns
The status of the operation.

◆ OverwriteTraits() [3/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal, typename TraitsExtractorT = void>
TOutcome< Paradigm > FSubjectInfo::OverwriteTraits ( const TraitsExtractorT &  TraitsExtractor)

Overwrite existing traits from a generic extractor.

Template Parameters
ParadigmThe paradigm to work under.
TraitsExtractorTThe type of the traits-extracting container.
Parameters
TraitsExtractorThe types of the traits to add supplied via an extractor.
Returns
The outcome of the operation.

◆ PushTrait() [1/7]

template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> FSubjectInfo::PushTrait ( const EPeerRole  PeerRole = EPeerRole::Auto,
const bool  bReliable = true 
) const
inline

Send an existing trait to the remote version of the subject.

Statically typed version.

If the trait is not within the subject, it is added automatically. The trait can be sent both from the client's version to the server's and from the server's version to the client(s)'.

When pushing from the server, the trait gets broadcasted to all of the available clients (if any).

When pushing from the client, the server will apply the trait only if it's in the traitmark permit of the server's version.

Warning
The subject is not brought online automatically in this method, since it's working on an immutable version of the subject.
Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to push.
Parameters
PeerRoleThe peer role specification. If left as EPeerRole::Auto, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.
bReliableShould the reliable channel be used for the transaction.
Returns
The outcome of the operation.

◆ PushTrait() [2/7]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcomeIf< Paradigm, IsTraitType< T >()> FSubjectInfo::PushTrait ( const EPeerRole  PeerRole = EPeerRole::Auto,
const bool  bReliable = true 
) const
inline

Send an existing trait to the remote version of the subject.

Statically typed default paradigm version.

If the trait is not within the subject, it is added automatically. The trait can be sent both from the client's version to the server's and from the server's version to the client(s)'.

When pushing from the server, the trait gets broadcasted to all of the available clients (if any).

When pushing from the client, the server will apply the trait only if it's in the traitmark permit of the server's version.

Warning
The subject is not brought online automatically in this method, since it's working on an immutable version of the subject.
Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to push.
Parameters
PeerRoleThe peer role specification. If left as EPeerRole::Auto, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.
bReliableShould the reliable channel be used for the transaction.
Returns
The outcome of the operation.

◆ PushTrait() [3/7]

template<EParadigm Paradigm = EParadigm::DefaultInternal, typename T = void>
TOutcomeIf< Paradigm, IsTraitType< T >()> FSubjectInfo::PushTrait ( const T Trait,
const bool  bSetForLocal = false,
const EPeerRole  PeerRole = EPeerRole::Auto,
const bool  bReliable = true 
)
inline

Send an additional trait to the remote version of the subject.

Statically typed version.

The trait can be sent both from the client's version to the server's and from the server's version to the client(s)'.

When pushing from the server, the trait gets broadcasted to all of the available clients (if any). The subject is brought online automatically, if needed.

When pushing from the client, the server will apply the trait only if it's in the traitmark permit of the server's version.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to send.
Parameters
TraitThe trait to send.
bSetForLocalShould the trait also be set on the local subject.
PeerRoleThe peer role specification. If left as EPeerRole::Auto, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.
bReliableShould the reliable channel be used for the transaction.
Returns
The outcome of the operation.
Deprecated:
since 1.23 The bSetForLocal argument is deprecated now. Set the trait explicitly or use the version of the method without the argument, please.

◆ PushTrait() [4/7]

template<EParadigm Paradigm = EParadigm::DefaultInternal, typename T = void>
TOutcomeIf< Paradigm, IsTraitType< T >()> FSubjectInfo::PushTrait ( const T Trait,
const EPeerRole  PeerRole = EPeerRole::Auto,
const bool  bReliable = true 
)
inline

Send an additional trait to the remote version of the subject.

Statically typed version.

The trait can be sent both from the client's version to the server's and from the server's version to the client(s)'.

Note
This method is mutable, cause a listen server can send a trait to itself by adding it to the subject.

When pushing from the server, the trait gets broadcasted to all of the available clients (if any). The subject is brought online automatically, if needed.

When pushing from the client, the server will apply the trait only if it's in the traitmark permit of the server's version.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to send.
Parameters
TraitThe trait to send.
PeerRoleThe peer role specification. If left as EPeerRole::Auto, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.
bReliableShould the reliable channel be used for the transaction.
Returns
The outcome of the operation.

◆ PushTrait() [5/7]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::PushTrait ( UScriptStruct *const  TraitType,
const void *const  TraitData,
const bool  bSetForLocal,
EPeerRole  PeerRole = EPeerRole::Auto,
const bool  bReliable = true 
)
inline

Send an additional trait to the remote version of the subject.

Dynamically typed version.

The trait can be sent both from the client's version to the server's and from the server's version to the client(s)'.

Note
This method is mutable, cause a listen server can send a trait to itself by adding it to the subject.

When pushing from the server, the trait gets broadcasted to all of the available clients (if any). The subject is brought online automatically, if needed.

When pushing from the client, the server will apply the trait only if it's in the traitmark permit of the server's version.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to send. May be a nullptr and EApparatusStatus::Noop will be returned in such case.
TraitDataThe data of the trait to send. Must not be a nullptr if TraitType is specified.
bSetForLocalShould the trait also be set on the local subject.
PeerRoleThe peer role specification. If left as EPeerRole::Auto, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.
bReliableShould the reliable channel be used for the transaction.
Returns
The outcome of the operation.
Deprecated:
since 1.23 The bSetForLocal argument is deprecated now. Set the trait explicitly or use the version of the method without the argument, please.

◆ PushTrait() [6/7]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::PushTrait ( UScriptStruct *const  TraitType,
const void *const  TraitData,
EPeerRole  PeerRole = EPeerRole::Auto,
const bool  bReliable = true 
)

Send an additional trait to the remote version of the subject.

Dynamically typed version.

The trait can be sent both from the client's version to the server's and from the server's version to the client(s)'.

Note
This method is mutable, cause a listen server can send a trait to itself by adding it to the subject.

When pushing from the server, the trait gets broadcasted to all of the available clients (if any). The subject is brought online automatically, if needed.

When pushing from the client, the server will apply the trait only if it's in the traitmark permit of the server's version.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to send. May be a nullptr and EApparatusStatus::Noop will be returned in such case.
TraitDataThe data of the trait to send. Must not be a nullptr if TraitType is specified.
PeerRoleThe peer role specification. If left as EPeerRole::Auto, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.
bReliableShould the reliable channel be used for the transaction.
Returns
The outcome of the operation.
Deprecated:
since 1.23 The bSetForLocal argument is deprecated now. Set the trait explicitly or use the version of the method without the argument, please.

◆ PushTrait() [7/7]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::PushTrait ( UScriptStruct *const  TraitType,
EPeerRole  PeerRole = EPeerRole::Auto,
const bool  bReliable = true 
) const

Send an existing trait to the remote version of the subject.

The trait can be sent both from the client's version to the server's and from the server's version to the client(s)'.

When pushing from the server, the trait gets broadcasted to all of the available clients (if any).

When pushing from the client, the server will apply the trait only if it's in the traitmark permit of the server's version.

Warning
The subject is not brought online automatically in this method, since it's working on an immutable version of the subject.
Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to send. May be a nullptr and will return EApparatusStatus::Noop in this case.
PeerRoleThe peer role specification. If left as EPeerRole::Auto, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.
bReliableShould the reliable channel be used for the transaction.
Returns
The outcome of the operation.
See also
SetTraitmarkPermit()

◆ RemoveAllTraits()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::RemoveAllTraits ( )

Remove all of the traits from the subject.

Template Parameters
ParadigmThe paradigm to work under.
Returns
The outcome of the operation.
EApparatusStatus::Noop if there are no traits in the subject.

◆ RemoveAllTraitsDeferred()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::RemoveAllTraitsDeferred ( const bool  bForceEnqueue = false)

Remove all of the traits from the subject.

Deferred version.

The actual change is deferred until the deferreds are applied either automatically or manually.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
bForceEnqueueShould the traits be enqueued to be removed even if there are none currently.
Returns
The outcome of the operation.
EApparatusStatus::Noop if there are no traits in the subject, unless bForceEnqueue is set to true.

◆ RemoveTrait() [1/3]

template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> FSubjectInfo::RemoveTrait ( )
inline

Remove a trait from the subject.

Templated paradigm version.

If there is no such trait in the subject, nothing is performed and EApparatusStatus::Noop is returned.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to remove.
Returns
The outcome of the operation.

◆ RemoveTrait() [2/3]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
auto FSubjectInfo::RemoveTrait ( )
inline

Remove a trait from the subject.

Templated paradigm version.

If there is no such trait in the subject, nothing is performed and EApparatusStatus::Noop is returned.

Template Parameters
TThe type of the trait to remove.
Returns
The outcome of the operation.

◆ RemoveTrait() [3/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::RemoveTrait ( UScriptStruct *const  TraitType)

Remove a trait from the subject.

If there is no such trait in the subject, nothing is performed and EApparatusStatus::Noop is returned.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to remove.
Returns
The status of the operation.
EApparatusStatus::Noop If there is no such trait in the subject.

◆ RemoveTraitDeferred() [1/3]

template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> FSubjectInfo::RemoveTraitDeferred ( const bool  bForceEnqueue = false)
inline

Remove a trait from the subject.

Statically typed paradigm deferred version.

The actual change is deferred until the deferreds are applied either automatically or manually.

If at the time of performing the operation, the trait is not within the subject, nothing gets performed.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to remove.
Parameters
bForceEnqueueShould the removal be enqueued even if there's currently no such trait within the subject.
Returns
The outcome of the operation.

◆ RemoveTraitDeferred() [2/3]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
auto FSubjectInfo::RemoveTraitDeferred ( const bool  bForceEnqueue = false)
inline

Remove a trait from the subject.

Statically typed paradigm deferred version.

The actual change is deferred until the deferreds are applied either automatically or manually.

If at the time of performing the operation, the trait is not within the subject, nothing gets performed.

Template Parameters
TThe type of the trait to remove.
Parameters
bForceEnqueueShould the removal be enqueued even if there's currently no such trait within the subject.
Returns
The status of the operation.

◆ RemoveTraitDeferred() [3/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::RemoveTraitDeferred ( UScriptStruct *const  TraitType,
const bool  bForceEnqueue = false 
)

Remove a trait from the subject.

Dynamically typed deferred version.

The actual change is deferred until the deferreds are applied either automatically or manually.

If at the time of performing the operation, the trait is not within the subject, nothing gets performed.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to remove. If nullptr, nothing is performed.
bForceEnqueueShould the removal be enqueued even if there's currently no such trait within the subject.
Returns
The outcome of the operation.

◆ SetConnectionPermit()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::SetConnectionPermit ( UNetConnection *const  Connection)

Set the server-side connection that is allowed to push traits to the server's version of the subject.

Can only be set for a server-side subject.

Template Parameters
ParadigmThe paradigm to work under.
See also
GetConnectionPermit()

◆ SetFlag()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, bool > FSubjectInfo::SetFlag ( const EFlagmarkBit  Flag,
const bool  State = true 
)

Set the state of a subject flag.

This method doesn't perform any additional checks on the argument since it's in an internal subject info structure.

The operation is atomic and thread-safe.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
FlagThe flag to set the state of.
StateThe state to set the flag to.
Returns
The previous state of the flag.

◆ SetFlag_Status()

EApparatusStatus FSubjectInfo::SetFlag_Status ( const EFlagmarkBit  Flag,
const bool  State = true 
)

Set the state of a subject flag.

Status version.

This method doesn't perform any additional checks on the argument since it's in an internal subject info structure.

The operation is atomic and thread-safe.

Parameters
FlagThe flag to set the state of.
StateThe state to set the flag to.
Returns
The status of the operation.

◆ SetFlagmark()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, EFlagmark > FSubjectInfo::SetFlagmark ( const EFlagmark  Flagmark)

Set the flagmark of the subject.

Note
Residing within the info, this is a low-level method with no checks on the argument.

This operation is atomic and thread-safe.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
FlagmarkThe flagmark to set.
Returns
The previous flagmark value.

◆ SetFlagmark_Status()

EApparatusStatus FSubjectInfo::SetFlagmark_Status ( const EFlagmark  Flagmark)

Set the flagmark of the subject.

Note
Residing within the info, this is a low-level method with no checks on the argument.

This operation is atomic and thread-safe.

Parameters
FlagmarkThe flagmark to set.
Returns
The status of the operation.

◆ SetFlagmarkMasked()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, EFlagmark > FSubjectInfo::SetFlagmarkMasked ( const EFlagmark  Flagmark,
const EFlagmark  Mask 
)

Set the flagmark of the subject to a masked flagmark.

Note
Residing within the info, this is a low-level method with no checks on the arguments.

The operations is atomic and thread-safe.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
FlagmarkThe flagmark to set.
MaskThe mask to apply.
Returns
The previous flagmark masked with the passed-in mask.

◆ SetFlagmarkMasked_Status()

EApparatusStatus FSubjectInfo::SetFlagmarkMasked_Status ( const EFlagmark  Flagmark,
const EFlagmark  Mask 
)

Set the flagmark of the subject to a masked flagmark.

Status version.

Note
Residing within the info, this is a low-level method with no checks on the arguments.

The operations is atomic and thread-safe.

Parameters
FlagmarkThe flagmark to set.
MaskThe mask to apply.
Returns
The status of the operation.

◆ SetMechanism()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::SetMechanism ( AMechanism *const  Mechanism)

Transition the subject to a designated mechanism.

Note
You may only transition a subjective's subject to a mechanism that resides within the same world as its owner.
Template Parameters
ParadigmThe paradigm to work under.
Parameters
MechanismThe mechanism to transition to.
Returns
The outcome of the operation.
See also
GetMechanism()

◆ SetTrait() [1/6]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::SetTrait ( const FTraitRecord &  TraitRecord)

Set a trait of the subject to the record contents.

If the trait of the corresponding type is not currently within the subject, it gets created anew and set accordingly.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitRecordThe trait record to set to.
Returns
The outcome of the operation.

◆ SetTrait() [2/6]

template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> FSubjectInfo::SetTrait ( const T Trait)
inline

Set a trait of the subject.

Templated paradigm version.

If the trait is not currently within the subject, it gets created anew and set accordingly.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to set.
Parameters
TraitThe trait to initialize with.
Returns
The outcome of the operation.

◆ SetTrait() [3/6]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
auto FSubjectInfo::SetTrait ( const T Trait)
inline

Set a trait of the subject.

Templated version.

If the trait is not currently within the subject, it gets created anew and set accordingly.

Template Parameters
TThe type of the trait to set.
ParadigmThe paradigm to work under.
Parameters
TraitThe trait to initialize with.
Returns
The outcome of the operation.

◆ SetTrait() [4/6]

template<EParadigm Paradigm, typename T >
TOutcomeIf< Paradigm, IsTraitType< T >()> FSubjectInfo::SetTrait ( const T *const  Trait)
inline

Set a trait of the subject with a pointer it.

Statically-typed default paradigm version.

If the trait is not currently within the subject, it gets created anew and set accordingly.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to set.
Parameters
TraitThe trait to initialize with.
Returns
The outcome of the operation.

◆ SetTrait() [5/6]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal>
auto FSubjectInfo::SetTrait ( const T *const  Trait)
inline

Set a trait of the subject with a pointer to it.

Statically-typed default paradigm version.

If the trait is not currently within the subject, it gets created anew and set accordingly.

Template Parameters
TThe type of the trait to set.
ParadigmThe paradigm to work under.
Parameters
TraitA pointer to the trait to initialize with.
Returns
The outcome of the operation.

◆ SetTrait() [6/6]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::SetTrait ( UScriptStruct *const  TraitType,
const void *const  TraitData 
)

Set a trait of the subject by its type.

Dynamically typed version.

If the trait is not currently within the subject, it gets created anew and set accordingly.

Note
This also supports passing a dynamic trait record and will cast it appropriately.
Template Parameters
ParadigmThe paradigm to work under.
Parameters
TraitTypeThe type of the trait to add. May be a nullptr and the method do nothing in that case.
[in]TraitDataThe trait data to initialize with. Must not be a nullptr, if the TraitType is not a nullptr.
Returns
The outcome of the operation.

◆ SetTraitDeferred() [1/3]

template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true>
TOutcome< Paradigm > FSubjectInfo::SetTraitDeferred ( const T Trait)
inline

Set a trait of the subject by its type.

Deferred templated paradigm version.

The actual change is deferred until the deferreds are applied either automatically or manually.

At the time of performing the operation, if the trait is not currently within the subject, it gets created anew and set accordingly.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the trait to set.
Parameters
TraitThe trait to initialize with.
Returns
The outcome of the operation.

◆ SetTraitDeferred() [2/3]

template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true>
auto FSubjectInfo::SetTraitDeferred ( const T Trait)
inline

Set a trait of the subject by its type.

Deferred templated version.

The actual change is deferred until the deferreds are applied either automatically or manually.

At the time of performing the operation, if the trait is not currently within the subject, it gets created anew and set accordingly.

Template Parameters
TThe type of the trait to set.
Parameters
TraitThe trait to initialize with.
Returns
The outcome of the operation.

◆ SetTraitDeferred() [3/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::SetTraitDeferred ( UScriptStruct *const  TraitType,
const void *const  TraitData 
)

Set a trait of the subject by its type.

Deferred version.

The actual change is deferred until the deferreds are applied either automatically or manually.

At the time of performing the operation, if the trait is not currently within the subject, it gets created anew and set accordingly.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
[in]TraitTypeThe type of the trait to add.
[in]TraitDataThe trait data to initialize with.
Returns
The outcome of the operation.

◆ SetTraitmarkPermit()

template<EParadigm Paradigm = EParadigm::Default>
TOutcome< Paradigm > FSubjectInfo::SetTraitmarkPermit ( const FTraitmark InTraitmarkPermit)

Set the list of traits allowed to be received from clients on the server.

Can only be set for a server-side subject.

Note
The traitmark permit is also used to auto-detect the peer role during the trait pushing on a listen-server, i.e. if a trait is included within the permit the role is considered to be a client. This, of course, can be overriden by an explicit peer role specification during the push.
Parameters
InTraitmarkPermitThe traitmark permit to set to.
Returns
The outcome of the operation.
See also
GetTraitmarkPermit()

◆ SetTraits() [1/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm > FSubjectInfo::SetTraits ( const FSubjectRecord SubjectRecord,
const bool  bLeaveRedundant = true 
)

Set multiple subject traits from a subject record.

The traits essentially get copied from the record.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
SubjectRecordThe subject traits pack to set from.
bLeaveRedundantShould redundant existing traits (not present in the record) be left in the subject.
Returns
The outcome of the operation.

◆ SetTraits() [2/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal, typename A1 = FDefaultAllocator, typename A2 = FDefaultAllocator, typename T = void>
TOutcome< Paradigm > FSubjectInfo::SetTraits ( const TArray< UScriptStruct *, A1 > &  TraitsTypes,
const TArray< const T *, A2 > &  TraitsData,
const bool  bLeaveRedundant = true 
)

Set multiple subject traits equal to the supplied list.

Template Parameters
ParadigmThe paradigm to work under.
A1The allocator type of the types array.
A2The allocator type of the traits data array.
TThe type of the traits data elements. May be a void.
Parameters
TraitsTypesThe types of traits to add.
TraitsDataThe corresponding traits data to initialize with.
bLeaveRedundantShould redundant existing traits be left in the subject.
Returns
The status of the operation.

◆ SetTraits() [3/3]

template<EParadigm Paradigm = EParadigm::DefaultInternal, typename TraitsExtractorT = void>
TOutcome< Paradigm > FSubjectInfo::SetTraits ( const TraitsExtractorT &  TraitsExtractor,
const bool  bLeaveRedundant = true 
)

Set multiple subject traits equal to the supplied list.

Template Parameters
ParadigmThe paradigm to work under.
TraitsExtractorTThe type of the traits-extracting container.
Parameters
TraitsExtractorThe types of the traits to add supplied via an extractor.
bLeaveRedundantShould redundant existing traits be left in the subject.
Returns
The outcome of the operation.

◆ ToggleFlag()

template<EParadigm Paradigm = EParadigm::DefaultInternal>
TOutcome< Paradigm, bool > FSubjectInfo::ToggleFlag ( const EFlagmarkBit  Flag)

Toggle the state of a subject flag.

This method doesn't perform any additional checks on the argument since it's in an internal subject info structure.

The operation is atomic and thread-safe.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
FlagThe flag to toggle.
Returns
The new state of the flag.

Friends And Related Function Documentation

◆ AMechanism

friend class AMechanism
friend

◆ ASubjectiveActor

friend class ASubjectiveActor
friend

◆ FCommonSubjectHandle

friend struct FCommonSubjectHandle
friend

◆ FConstSubjectHandle

friend struct FConstSubjectHandle
friend

◆ FSolidSubjectHandle

friend struct FSolidSubjectHandle
friend

◆ FSubjectHandle

friend struct FSubjectHandle
friend

◆ FSubjectNetworkState

friend struct FSubjectNetworkState
friend

◆ FSubjectRecord

friend struct FSubjectRecord
friend

◆ ISubjective

friend class ISubjective
friend

◆ TBeltIt

template<typename SubjectHandleT >
friend struct TBeltIt
friend

◆ TChain

template<typename ChunkItT , typename BeltItT , EParadigm Paradigm>
friend struct TChain
friend

◆ TChunkIt

template<typename SubjectHandleT >
friend struct TChunkIt
friend

◆ UChunk

friend class UChunk
friend

◆ UMachine

friend class UMachine
friend

◆ UNetworkBearerComponent

friend class UNetworkBearerComponent
friend

◆ USubjectiveActorComponent

friend class USubjectiveActorComponent
friend

Member Data Documentation

◆ FirstGeneration

constexpr GenerationType FSubjectInfo::FirstGeneration = 0
staticconstexpr

The first valid generation.

◆ FirstPlace

constexpr IdType FSubjectInfo::FirstPlace = 0x1
staticconstexpr

A first valid subject place.

◆ InvalidId

constexpr IdType FSubjectInfo::InvalidId = 0
staticconstexpr

Invalid subject identifier.

◆ InvalidPlace

constexpr IdType FSubjectInfo::InvalidPlace = 0x0
staticconstexpr

An invalid subject place identifier.

◆ InvalidSlotIndex

constexpr SlotIndexType FSubjectInfo::InvalidSlotIndex = -1
staticconstexpr

Invalid subject slot index within the chunk.

◆ LastGeneration

constexpr GenerationType FSubjectInfo::LastGeneration = TNumericLimits<GenerationType>::Max()
staticconstexpr

The maximum valid generation.

◆ LastPlace

constexpr IdType FSubjectInfo::LastPlace = PlacesPerMechanismMax - 1
staticconstexpr

The maximum possible subject place within the mechanism.

◆ MechanismIdShift

constexpr int FSubjectInfo::MechanismIdShift = 24
staticconstexpr

The shift of the subject identifier to recover the mechanism identifier.

◆ PlaceMask

constexpr IdType FSubjectInfo::PlaceMask = 0xFFFFFF
staticconstexpr

The mask for the subject index within a mechanism's subject pool which resides in the machine.

◆ PlacesPerMechanismMax

constexpr IdType FSubjectInfo::PlacesPerMechanismMax = 0xFFFFFF
staticconstexpr

The maximum number of subjects within the mechanism.

◆ ShiftedMechanismIdMask

constexpr IdType FSubjectInfo::ShiftedMechanismIdMask = 0xFF000000
staticconstexpr

The mask for the shifted mechanism identifier.

◆ SlotsPerChunkMax

constexpr auto FSubjectInfo::SlotsPerChunkMax = TNumericLimits<SlotIndexType>::Max()
staticconstexpr

The maximum number of subject slots per chunk.


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