Apparatus
Version 1.23
ECS data-oriented workflow for Unreal Engine.
|
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. | |
UChunk * | GetChunk () const |
Get the chunk this subject resides in. | |
UWorld * | GetWorld () const |
Get the Unreal world the subject resides within. | |
AMechanism * | GetMechanism () 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 FFingerprint & | GetFingerprint () 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. | |
ISubjective * | GetSubjective () 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. | |
FSubjectInfo & | operator= (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 T & | GetTraitRef () const |
Get a read-only trait reference from a subject by its type. | |
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal> | |
const T & | GetTraitRef () const |
Get a read-only trait reference from a subject by its type. | |
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true> | |
T & | GetTraitRef () |
Get a trait reference from a subject by its type. | |
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true> | |
T & | GetTraitRef () |
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, T > | GetTrait () const |
Get a trait copy from a subject by its type. | |
template<typename T , EParadigm Paradigm = EParadigm::DefaultInternal, TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm, T > | GetTrait () 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 >(), T > | ObtainTrait () |
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 >(), T > | ObtainTraitDeferred () |
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, EFlagmark > | SetFlagmark (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, EFlagmark > | SetFlagmarkMasked (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, EFlagmark > | AddToFlagmark (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, bool > | SetFlag (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, bool > | ToggleFlag (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 FTraitmark & | GetTraitmarkPermit () 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 |
The internal state for the main subject entity.
Subjects are not used directly but instead are referenced through FSubjectHandle and FSolidSubjectHandle.
typedef uint32 FSubjectInfo::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.
typedef int32 FSubjectInfo::IdType |
The type for the unique subject identifier.
typedef uint8 FSubjectInfo::MechanismIdType |
The type for the mechanism identifier.
typedef int32 FSubjectInfo::SlotIndexType |
The type of the chunk slot index of the subject.
|
inline |
Default constructor.
|
delete |
Copying of the subject information structures is not supported.
TOutcome< Paradigm, EFlagmark > FSubjectInfo::AddToFlagmark | ( | const EFlagmark | Flagmark | ) |
Add flags to the subject's flagmark.
The operations is atomic and thread-safe.
Paradigm | The paradigm to work under. |
Flagmark | The flagmark to add. |
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.
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.
IdRange | The range of identifiers to allocate within. |
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.
Paradigm | The paradigm to work under. |
Destination | The destination subject to copy to. May not be a nullptr . |
TOutcome< Paradigm > FSubjectInfo::Despawn | ( | ) |
Destroy the subject.
Paradigm | The paradigm to work under. |
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.
Paradigm | The paradigm to work under. |
bHard | Should the hard version of the operation be performed. |
|
inlinestaticconstexpr |
Extract a mechanism identifier from a subject identifier.
A mechanism identifier is its unique index.
InSubjectId | The subject identifier to extract from. |
|
inlinestaticconstexpr |
Extract a subject place from a subject identifier.
A place is a unique subject index within its mechanism.
InSubjectId | The subject identifier to extract from. |
|
inline |
Get the chunk this subject resides in.
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.
const FFingerprint & FSubjectInfo::GetFingerprint | ( | ) | const |
Get the active fingerprint of the subject.
EFlagmark FSubjectInfo::GetFlagmark | ( | ) | const |
Get the flagmark of the subject.
The examination is atomic and thread-safe.
|
inline |
Get the subject handle corresponding to this information structure.
SubjectHandleT | The type of the subject handle to get. |
|
inline |
Get a constant subject handle from the subject information.
SubjectHandleT | The type of the subject handle to get. |
OutSubject | The subject handle to initialize. |
|
inline |
Get the unique identifier of the subject.
AMechanism * FSubjectInfo::GetMechanism | ( | ) | const |
Get the mechanism the subject resides within.
This is derived from the current chunk.
|
inline |
Get the identifier of the mechanism the subject is part of.
|
inline |
Get the owning net connection of the subject (if any).
|
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.
|
inline |
Get the place index of the subject.
This is the index of the subject information structure within the mechanism's subject pool.
|
inline |
Get the subjective associated with a subject (if any).
Get a trait copy from a subject by its type.
Templated version.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
|
inline |
Get a trait copy from a subject by its type.
Templated version.
T | The type of the trait to get. |
Paradigm | The paradigm to work under. |
TOutcome< Paradigm > FSubjectInfo::GetTrait | ( | FTraitRecord & | OutTraitRecord | ) | const |
Get a trait from the subject into a trait record.
Paradigm | The paradigm to work under. |
[out] | OutTraitRecord | The trait record to receive the trait. Its type must be set accordingly beforehand. |
|
inline |
Get a trait from a subject by its type.
Templated version.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
OutTrait | The trait receiver. |
bTraitDataInitialized | Is the OutTrait actually initialized? |
|
inline |
Get a trait from a subject by its type.
Templated version.
T | The type of the trait to get. |
Paradigm | The paradigm to work under. |
OutTrait | The trait receiver. |
bTraitDataInitialized | Is the OutTrait actually initialized? |
TOutcome< Paradigm > FSubjectInfo::GetTrait | ( | UScriptStruct *const | TraitType, |
void *const | OutTraitData, | ||
const bool | bTraitDataInitialized = true |
||
) | const |
Get a trait from the subject by its type.
[in] | TraitType | The type of the trait to get. |
[out] | OutTraitData | The trait data receiver. Must have enough bytes for the trait to be copied. |
[in] | bTraitDataInitialized | Is the OutTraitData buffer actually initialized? |
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.
Get a trait data pointer from a subject by its type.
Templated paradigm version.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
nullptr
.
|
inline |
Get a trait data pointer from a subject by its type.
Templated version.
T | The type of the trait to get. |
Paradigm | The paradigm to work under. |
nullptr
. Get a read-only trait data pointer from a subject by its type.
Templated paradigm constant version.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
nullptr
.
|
inline |
Get a read-only trait data pointer from a subject by its type.
Templated constant version.
T | The type of the trait to get. |
Paradigm | The paradigm to work under. |
nullptr
. TOutcome< Paradigm, void * > FSubjectInfo::GetTraitPtr | ( | UScriptStruct *const | TraitType | ) |
Get a trait data pointer from a subject by its type.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to get. |
TOutcome< Paradigm, const void * > FSubjectInfo::GetTraitPtr | ( | UScriptStruct *const | TraitType | ) | const |
Get a read-only trait data pointer from a subject by its type.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to get. |
|
inline |
Get a trait reference from a subject by its type.
Templated version.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
|
inline |
Get a trait reference from a subject by its type.
Templated version.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
|
inline |
Get a read-only trait reference from a subject by its type.
Constant templated version.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
|
inline |
Get a read-only trait reference from a subject by its type.
Constant templated version.
T | The type of the trait to get. |
Paradigm | The paradigm to work under. |
UWorld * FSubjectInfo::GetWorld | ( | ) | const |
Get the Unreal world the subject resides within.
This is derived from the mechanism.
bool FSubjectInfo::HasFlag | ( | const EFlagmarkBit | Flag | ) | const |
Get the state of a subject flag.
The examination is atomic and thread-safe.
Flag | The flag to get the state of. |
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.
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.
Mode | The network mode to check against. |
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.
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.
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.
|
inline |
Check if this is an information block about some actually spawned subject.
|
inlinestatic |
Make a subject identifier from a mechanism identifier and a subject placement index.
MechanismId | The identifier of the mechanism. |
Place | The place of the subject within the mechanism. |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to obtain. |
|
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.
T | The type of the trait to obtain. |
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to obtain. |
[out] | OutTrait | The trait receiver. |
[in] | bTraitDataInitialized | Is the OutTrait actually initialized? |
|
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.
T | The type of the trait to obtain. |
[out] | OutTrait | The trait receiver. |
[in] | bTraitDataInitialized | Is the OutTrait actually initialized? |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to obtain. |
[out] | OutTraitData | The trait data receiver pointer. |
[in] | bTraitDataInitialized | Is the TraitData buffer actually initialized? |
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.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to obtain. |
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.
Paradigm | The paradigm to work under. |
[in] | TraitType | The type of the trait to obtain. |
[out] | OutTraitData | The trait data receiver pointer. Must be enough to hold the TraitType instance. |
[in] | bTraitDataInitialized | Is the TraitData buffer actually initialized? |
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to obtain. |
|
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.
T | The type of the trait to obtain. |
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.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to obtain. Must not be a nullptr . |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to obtain. |
|
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.
T | The type of the trait to obtain. |
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.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to obtain. |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to obtain. |
|
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.
T | The type of the trait to obtain. |
|
delete |
Copying of the subject information structures is not supported.
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.
Paradigm | The paradigm to work under. |
SubjectRecord | The subject record to overwrite with. |
TOutcome< Paradigm > FSubjectInfo::OverwriteTraits | ( | const TArray< UScriptStruct *, A1 > & | TraitsTypes, |
const TArray< const T *, A2 > & | TraitsData | ||
) |
Overwrite existing subject traits from the array.
Paradigm | The paradigm to work under. |
A1 | The allocator type of the types array. |
A2 | The allocator type of the traits data array. |
T | The type of the traits data elements. May be a void . |
TraitsTypes | The types of traits to overwrite. |
TraitsData | The corresponding traits data to overwrite with. |
TOutcome< Paradigm > FSubjectInfo::OverwriteTraits | ( | const TraitsExtractorT & | TraitsExtractor | ) |
Overwrite existing traits from a generic extractor.
Paradigm | The paradigm to work under. |
TraitsExtractorT | The type of the traits-extracting container. |
TraitsExtractor | The types of the traits to add supplied via an extractor. |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to push. |
PeerRole | The 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. |
bReliable | Should the reliable channel be used for the transaction. |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to push. |
PeerRole | The 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. |
bReliable | Should the reliable channel be used for the transaction. |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to send. |
Trait | The trait to send. |
bSetForLocal | Should the trait also be set on the local subject. |
PeerRole | The 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. |
bReliable | Should the reliable channel be used for the transaction. |
bSetForLocal
argument is deprecated now. Set the trait explicitly or use the version of the method without the argument, please.
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to send. |
Trait | The trait to send. |
PeerRole | The 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. |
bReliable | Should the reliable channel be used for the transaction. |
|
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)'.
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.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to send. May be a nullptr and EApparatusStatus::Noop will be returned in such case. |
TraitData | The data of the trait to send. Must not be a nullptr if TraitType is specified. |
bSetForLocal | Should the trait also be set on the local subject. |
PeerRole | The 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. |
bReliable | Should the reliable channel be used for the transaction. |
bSetForLocal
argument is deprecated now. Set the trait explicitly or use the version of the method without the argument, please. 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)'.
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.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to send. May be a nullptr and EApparatusStatus::Noop will be returned in such case. |
TraitData | The data of the trait to send. Must not be a nullptr if TraitType is specified. |
PeerRole | The 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. |
bReliable | Should the reliable channel be used for the transaction. |
bSetForLocal
argument is deprecated now. Set the trait explicitly or use the version of the method without the argument, please. 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.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to send. May be a nullptr and will return EApparatusStatus::Noop in this case. |
PeerRole | The 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. |
bReliable | Should the reliable channel be used for the transaction. |
TOutcome< Paradigm > FSubjectInfo::RemoveAllTraits | ( | ) |
Remove all of the traits from the subject.
Paradigm | The paradigm to work under. |
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.
Paradigm | The paradigm to work under. |
bForceEnqueue | Should the traits be enqueued to be removed even if there are none currently. |
bForceEnqueue
is set to true
.
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to remove. |
|
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.
T | The type of the trait to remove. |
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.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to remove. |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to remove. |
bForceEnqueue | Should the removal be enqueued even if there's currently no such trait within the subject. |
|
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.
T | The type of the trait to remove. |
bForceEnqueue | Should the removal be enqueued even if there's currently no such trait within the subject. |
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.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to remove. If nullptr , nothing is performed. |
bForceEnqueue | Should the removal be enqueued even if there's currently no such trait within the subject. |
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.
Paradigm | The paradigm to work under. |
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.
Paradigm | The paradigm to work under. |
Flag | The flag to set the state of. |
State | The state to set the flag to. |
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.
Flag | The flag to set the state of. |
State | The state to set the flag to. |
TOutcome< Paradigm, EFlagmark > FSubjectInfo::SetFlagmark | ( | const EFlagmark | Flagmark | ) |
Set the flagmark of the subject.
This operation is atomic and thread-safe.
Paradigm | The paradigm to work under. |
Flagmark | The flagmark to set. |
EApparatusStatus FSubjectInfo::SetFlagmark_Status | ( | const EFlagmark | Flagmark | ) |
Set the flagmark of the subject.
This operation is atomic and thread-safe.
Flagmark | The flagmark to set. |
TOutcome< Paradigm, EFlagmark > FSubjectInfo::SetFlagmarkMasked | ( | const EFlagmark | Flagmark, |
const EFlagmark | Mask | ||
) |
Set the flagmark of the subject to a masked flagmark.
The operations is atomic and thread-safe.
Paradigm | The paradigm to work under. |
Flagmark | The flagmark to set. |
Mask | The mask to apply. |
EApparatusStatus FSubjectInfo::SetFlagmarkMasked_Status | ( | const EFlagmark | Flagmark, |
const EFlagmark | Mask | ||
) |
Set the flagmark of the subject to a masked flagmark.
Status version.
The operations is atomic and thread-safe.
Flagmark | The flagmark to set. |
Mask | The mask to apply. |
TOutcome< Paradigm > FSubjectInfo::SetMechanism | ( | AMechanism *const | Mechanism | ) |
Transition the subject to a designated mechanism.
Paradigm | The paradigm to work under. |
Mechanism | The mechanism to transition to. |
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.
Paradigm | The paradigm to work under. |
TraitRecord | The trait record to set to. |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to set. |
Trait | The trait to initialize with. |
|
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.
T | The type of the trait to set. |
Paradigm | The paradigm to work under. |
Trait | The trait to initialize with. |
|
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to set. |
Trait | The trait to initialize with. |
|
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.
T | The type of the trait to set. |
Paradigm | The paradigm to work under. |
Trait | A pointer to the trait to initialize with. |
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.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to add. May be a nullptr and the method do nothing in that case. | |
[in] | TraitData | The trait data to initialize with. Must not be a nullptr , if the TraitType is not a nullptr . |
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.
Paradigm | The paradigm to work under. |
T | The type of the trait to set. |
Trait | The trait to initialize with. |
|
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.
T | The type of the trait to set. |
Trait | The trait to initialize with. |
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.
Paradigm | The paradigm to work under. |
[in] | TraitType | The type of the trait to add. |
[in] | TraitData | The trait data to initialize with. |
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.
InTraitmarkPermit | The traitmark permit to set to. |
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.
Paradigm | The paradigm to work under. |
SubjectRecord | The subject traits pack to set from. |
bLeaveRedundant | Should redundant existing traits (not present in the record) be left in the subject. |
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.
Paradigm | The paradigm to work under. |
A1 | The allocator type of the types array. |
A2 | The allocator type of the traits data array. |
T | The type of the traits data elements. May be a void . |
TraitsTypes | The types of traits to add. |
TraitsData | The corresponding traits data to initialize with. |
bLeaveRedundant | Should redundant existing traits be left in the subject. |
TOutcome< Paradigm > FSubjectInfo::SetTraits | ( | const TraitsExtractorT & | TraitsExtractor, |
const bool | bLeaveRedundant = true |
||
) |
Set multiple subject traits equal to the supplied list.
Paradigm | The paradigm to work under. |
TraitsExtractorT | The type of the traits-extracting container. |
TraitsExtractor | The types of the traits to add supplied via an extractor. |
bLeaveRedundant | Should redundant existing traits be left in the subject. |
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.
Paradigm | The paradigm to work under. |
Flag | The flag to toggle. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
staticconstexpr |
The first valid generation.
|
staticconstexpr |
A first valid subject place.
|
staticconstexpr |
Invalid subject identifier.
|
staticconstexpr |
An invalid subject place identifier.
|
staticconstexpr |
Invalid subject slot index within the chunk.
|
staticconstexpr |
The maximum valid generation.
|
staticconstexpr |
The maximum possible subject place within the mechanism.
|
staticconstexpr |
The shift of the subject identifier to recover the mechanism identifier.
|
staticconstexpr |
The mask for the subject index within a mechanism's subject pool which resides in the machine.
|
staticconstexpr |
The maximum number of subjects within the mechanism.
|
staticconstexpr |
The mask for the shifted mechanism identifier.
|
staticconstexpr |
The maximum number of subject slots per chunk.