Apparatus Version 1.22
ECS data-oriented workflow for Unreal Engine.
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges > Struct Template Reference

The main entity in the mechanism, consisting of traits. More...

#include <CommonSubjectHandle.h>

Inheritance diagram for TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >:
Inheritance graph
[legend]
Collaboration diagram for TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >:
Collaboration graph
[legend]

Public Types

enum  { AllowsChanges = bAllowChanges , AllowsDirectTraitAccess = bAllowDirectTraitAccess , AllowsStructuralChanges = bAllowStructuralChanges }
 
using Super = FCommonSubjectHandle
 The base handle type. More...
 
template<EParadigm Paradigm>
using TResultTraitVoidPtr = typename std::enable_if< AllowsDirectTraitAccess||(Paradigm<=EParadigm::Unsafe), typename std::conditional< AllowsChanges, void *, const void * >::type >::type
 The type of a trait void pointer returned by the methods. More...
 
template<typename T , EParadigm Paradigm>
using TResultTraitPtr = typename std::enable_if<(AllowsDirectTraitAccess||(Paradigm<=EParadigm::Unsafe)) &&IsTraitType< T >(), typename std::conditional< AllowsChanges, T *, typename std::add_const_t< T > * >::type >::type
 The type of a trait pointer returned by the methods. More...
 
template<typename T , EParadigm Paradigm>
using TResultTraitRef = typename std::enable_if<(AllowsDirectTraitAccess||(Paradigm<=EParadigm::Unsafe)) &&IsTraitType< T >(), typename std::conditional< AllowsChanges, T &, typename std::add_const_t< T > & >::type >::type
 The type of a trait reference returned by the methods. More...
 
template<class D >
using TResultDetailPtr = typename std::enable_if< IsDetailClass< D >(), typename std::conditional< AllowsChanges, D *, typename std::add_const_t< D > * >::type >::type
 The type of a detail pointer returned by the methods. More...
 
- Public Types inherited from FCommonSubjectHandle
typedef FSubjectInfo::IdType IdType
 The type of the unique subject identifier. More...
 
typedef FSubjectInfo::GenerationType GenerationType
 The type of the subject generation counter. More...
 

Public Member Functions

TSubjectHandleoperator= (TYPE_OF_NULLPTR)
 Clear the subject handle, essentially making it invalid. More...
 
Validity
bool operator== (TYPE_OF_NULLPTR) const
 Check if the subject handle is invalid and is pointing to a non-existent subject. More...
 
bool operator!= (TYPE_OF_NULLPTR) const
 Check if the subject handle is valid and is pointing to an existent subject. More...
 
Despawning
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type Despawn () const
 Destroy the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type DespawnDeferred (const bool bHard=true) const
 Destroy the subject. More...
 
Flagmark
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EFlagmark >::type SetFlagmark (const EFlagmark Flagmark) const
 Set the flagmark of the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type SetFlagmark_Status (const EFlagmark Flagmark) const
 Set the flagmark of the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EFlagmark >::type SetFlagmarkMasked (const EFlagmark Flagmark, const EFlagmark Mask) const
 Set the flagmark of the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type SetFlagmarkMasked_Status (const EFlagmark Flagmark, const EFlagmark Mask) const
 Set the flagmark of the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), bool >::type SetFlag (const EFlagmarkBit Flag, const bool bState=true) const
 Set a single flag for the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type SetFlag_Status (const EFlagmarkBit Flag, const bool bState=true) const
 Set a single flag for the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), bool >::type ToggleFlag (const EFlagmarkBit Flag) const
 Toggle a single flag for the subject. More...
 
Equality
bool operator== (const FCommonSubjectHandle &InSubjectHandle) const
 Check if the subject handle points to the same subject as the other one. More...
 
bool operator!= (const FCommonSubjectHandle &InSubjectHandle) const
 Check if the subject handle points to a different subject than the other one. More...
 
Traits Data Access
template<EParadigm Paradigm = EParadigm::Safe>
TResultTraitVoidPtr< Paradigm > GetTraitPtr (UScriptStruct *const TraitType) const
 Get a pointer to a trait of a certain type. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
TResultTraitPtr< T, Paradigm > GetTraitPtr () const
 Get a pointer to a trait of a certain type. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
TResultTraitRef< T, Paradigm > GetTraitRef () const
 Get a trait from a subject by its type. More...
 
Traits Setting
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type SetTrait (UScriptStruct *const TraitType, const void *const TraitData) const
 Set a trait of the subject by its type. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type SetTrait (const FTraitRecord &TraitRecord) const
 Set a trait of the subject to a trait record. More...
 
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type SetTrait (const T &Trait) const
 Set a trait of the subject. More...
 
template<bool AnyDirectAccess>
EApparatusStatus CopyTraitsTo (const TSubjectHandle< true, AnyDirectAccess, true > &DestinationSubjectHandle) const
 Copy the traits to some other subject. More...
 
Trait Obtainment
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type ObtainTrait (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Obtain a trait from a subject by its type. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type ObtainTrait (UScriptStruct *const TraitType) const
 Obtain a trait for a subject by its type. More...
 
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type ObtainTrait (T &OutTrait, const bool bTraitDataInitialized=true) const
 Obtain a trait from a subject. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), T >::type ObtainTrait () const
 Obtain a trait copy from a subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsStructuralChanges &&AllowsDirectTraitAccess)||(Paradigm<=EParadigm::Unsafe), void * >::type ObtainTraitPtr (UScriptStruct *const TraitType)
 Obtain a trait data pointer from a subject by its type. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<((AllowsStructuralChanges &&AllowsDirectTraitAccess)||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), T * >::type ObtainTraitPtr () const
 Obtain a trait pointer from a subject. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<((AllowsStructuralChanges &&AllowsDirectTraitAccess)||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), T & >::type ObtainTraitRef () const
 Obtain a trait reference from a subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type ObtainTraitDeferred (UScriptStruct *const TraitType) const
 Obtain a trait for a subject by its type. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), T >::type ObtainTraitDeferred () const
 Obtain a trait copy from a subject. More...
 
Deferred Trait Settings
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type SetTraitDeferred (UScriptStruct *const TraitType, const void *const TraitData) const
 Set a trait of the subject by its type. More...
 
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type SetTraitDeferred (const T &Trait) const
 Set a trait of the subject by its type. More...
 
Trait Removal
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type RemoveTrait (UScriptStruct *const TraitType) const
 Remove a trait from the subject. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type RemoveTrait () const
 Remove a trait from the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type RemoveAllTraits () const
 Remove all of the traits from the subject (if any). More...
 
Deferred Trait Removal
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type RemoveTraitDeferred (UScriptStruct *const TraitType) const
 Remove a trait from the subject. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type RemoveTraitDeferred () const
 Remove a trait from the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type RemoveAllTraitsDeferred () const
 Remove all of the traits from the subject. More...
 
Details Getting
TResultDetailPtr< UDetailGetDetail (TSubclassOf< UDetail > DetailClass) const
 Get a detail of a certain class. More...
 
template<class D >
TResultDetailPtr< DGetDetail () const
 Get a detail of a certain class. More...
 
Networking
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type BringOnline () const
 Make the subject networked. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), void >::type SetConnectionPermit (UNetConnection *const Connection) const
 Set the server-side connection to a client from which it is allowed to push traits to this subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type SetTraitmarkPermit (const FTraitmark &InTraitmarkPermit) const
 Set the server-side list of traits allowed to be pushed from clients. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type SetTraitmarkPass (const FTraitmark &InTraitmarkPermit) const
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), void >::type PushTrait (UScriptStruct *const TraitType, const void *const TraitData, const bool bSetForLocal=false, const EPeerRole PeerRole=EPeerRole::None) const
 Send an additional trait to the remote version of the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), void >::type PushTrait (UScriptStruct *const TraitType, const void *const TraitData, const EPeerRole PeerRole) const
 Send an additional trait to the remote version of the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), void >::type PushTrait (const T &Trait, const bool bSetForLocal=false, const EPeerRole PeerRole=EPeerRole::None) const
 Send an additional trait to the remote version of the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), void >::type PushTrait (const T &Trait, const EPeerRole PeerRole) const
 Send an additional trait to the remote version of the subject. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), void >::type PushTrait (UScriptStruct *const TraitType, const EPeerRole PeerRole=EPeerRole::None) const
 Send an existing trait to the remote version of the subject. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), void >::type PushTrait (const EPeerRole PeerRole=EPeerRole::None) const
 Send an existing trait to the remote version of the subject. More...
 
Initialization
 TSubjectHandle ()
 Construct a new invalid subject handle. More...
 
 TSubjectHandle (const TSubjectHandle &InHandle)
 Copy-construct a new subject handle. More...
 
- Public Member Functions inherited from FCommonSubjectHandle
 FCommonSubjectHandle ()
 Initialize an invalid (null) handle. More...
 
 FCommonSubjectHandle (const FCommonSubjectHandle &InSubjectHandle)
 Initialize as a copy of an another subject handle. More...
 
IdType GetId () const
 Get the unique identifier of the subject. More...
 
GenerationType GetGeneration () const
 Get the current generation of the subject. More...
 
bool IsSolid () const
 Check if the subject is currently solid. More...
 
void ResetHandle ()
 Reset the subject handle. More...
 
FCommonSubjectHandleoperator= (TYPE_OF_NULLPTR)
 Clear the subject handle, essentially making it invalid. More...
 
uint32 CalcHash () const
 Calculate the hash-sum value for the handle. More...
 
AMechanismGetMechanism () const
 Get the mechanism the subject is part of. More...
 
const FFingerprintGetFingerprint () const
 Get the current fingerprint of the subject. More...
 
bool Matches (const FFilter &InFilter) const
 Check if the subject matches a certain filter. More...
 
bool IsValid () const
 Check if the subject handle is valid and is pointing to an existent subject. More...
 
bool operator== (TYPE_OF_NULLPTR) const
 Check if the subject handle is invalid and is pointing to a non-existent subject. More...
 
bool operator!= (TYPE_OF_NULLPTR) const
 Check if the subject handle is valid and is pointing to an existent subject. More...
 
 operator bool () const
 Check if the subject handle is valid and is pointing to an existent subject. More...
 
bool EqualsRaw (const FCommonSubjectHandle &InSubject) const
 Check if two subject handles are equal byte-wise. More...
 
bool Equals (const FCommonSubjectHandle &InSubjectHandle) const
 Check if the subject handle points to the same subject as the other one. More...
 
bool operator== (const FCommonSubjectHandle &InSubjectHandle) const
 Check if the subject handle points to the same subject as the other one. More...
 
bool operator!= (const FCommonSubjectHandle &InSubjectHandle) const
 Check if the subject handles point to different subjects. More...
 
EFlagmark GetFlagmark () const
 Get the flagmark of the subject. More...
 
bool HasFlag (const EFlagmarkBit Flag) const
 Get the state of a certain flag of the subject. More...
 
bool HasTrait (UScriptStruct *const TraitType) const
 Check if the subject has a certain trait. More...
 
template<typename T >
std::enable_if< IsTraitType< T >(), bool >::type HasTrait () const
 Check if the subject has a certain trait. More...
 
bool HasDetail (TSubclassOf< UDetail > DetailClass) const
 Check if the subject has a certain detail. More...
 
template<typename D >
std::enable_if< IsDetailClass< D >(), bool >::type HasDetail () const
 Check if the subject has a certain detail. More...
 
EApparatusStatus GetTrait (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait from a subject by its type. More...
 
template<typename T >
std::enable_if< IsTraitType< T >(), EApparatusStatus >::type GetTrait (T &OutTrait, const bool bTraitDataInitialized=true) const
 Get a trait from a subject by its type. More...
 
template<typename T >
std::enable_if< IsTraitType< T >(), T >::type GetTrait () const
 Get a trait copy from a subject by its type. More...
 
bool IsOnline () const
 Check if the subject currently networked. More...
 
uint32 GetNetworkId () const
 Get a unique network identifier of a subject (if any). More...
 
bool IsServerSide () const
 Check if this is a server-side version of the subject. More...
 
bool IsClientSide () const
 Check if this is a client-side version of the subject. More...
 
UNetConnection * GetConnectionPermit () const
 Get the server-side connection that is allowed to push to the server's version of the subject. More...
 
const FTraitmarkGetTraitmarkPermit () const
 Get the server-side list of traits allowed to be received from clients. More...
 
const FTraitmarkGetTraitmarkPass () const
 
FCommonSubjectHandleoperator= (const FCommonSubjectHandle &InSubjectHandle)
 Assign to be a copy of an another subject handle. More...
 

Static Public Member Functions

static constexpr bool IsHandleSolid ()
 Check if the handle itself a solid one. More...
 

Protected Member Functions

 TSubjectHandle (const int32 InId, const GenerationType InGeneration)
 Construct by explicit id and generation specifications. More...
 
 TSubjectHandle (const FCommonSubjectHandle &InHandle)
 
- Protected Member Functions inherited from FCommonSubjectHandle
FSubjectInfoFindInfo () const
 Get the valid subject info record (if any). More...
 
FSubjectInfoGetInfo () const
 Get the subject info record associated with it. More...
 
FFingerprintGetFingerprintRef () const
 Get the current fingerprint's reference of the subject. More...
 
bool MarkBooted () const
 
UChunkGetChunk () const
 Get the current chunk of the subject. More...
 
ISubjectiveGetSubjective () const
 Get a subjective this handle is associated with (if any). More...
 
UDetailGetDetail (TSubclassOf< UDetail > DetailClass) const
 Get a detail of a certain class. More...
 
template<class D >
DGetDetail () const
 Get a detail of a certain class. More...
 
 FCommonSubjectHandle (const int32 InId, const GenerationType InGeneration)
 Initialize with explicit id and generation specifications. More...
 

Friends

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

Additional Inherited Members

- Static Public Attributes inherited from FCommonSubjectHandle
static const IdType InvalidId = FSubjectInfo::InvalidId
 Invalid subject identifier. More...
 
static const IdType FirstId = FSubjectInfo::FirstId
 A first valid subject identifier. More...
 
static const IdType IdMax = FSubjectInfo::IdMax
 The maximum valid subject identifier. More...
 
static const GenerationType FirstGeneration = FSubjectInfo::FirstGeneration
 The first valid generation. More...
 
static const GenerationType GenerationMax = FSubjectInfo::GenerationMax
 The maximum valid generation. More...
 
static const FCommonSubjectHandle Invalid
 An invalid common subject handle constant. More...
 
- Protected Attributes inherited from FCommonSubjectHandle
int32 Id = InvalidId
 A unique identifier of the subject within the mechanism. More...
 
uint32 Generation = FirstGeneration
 A unique generation of the subject. More...
 

Detailed Description

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
struct TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >

The main entity in the mechanism, consisting of traits.

This is a user-level handle structure, something like a pointer. The size of this structure is exactly 64-bit and may efficiently be passed by value to the methods and functions.

The base version is the most generic and unsafe one, that allows all sorts of access and functionality.

Template Parameters
bAllowChangesIs the referenced subject mutable (non-constant)?
bAllowDirectTraitAccessShould direct access provided to the trait data.
bAllowStructuralChangesShould structural changes (adding/removing traits) be allowed.

Member Typedef Documentation

◆ Super

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
using TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::Super = FCommonSubjectHandle

The base handle type.

◆ TResultDetailPtr

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<class D >
using TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::TResultDetailPtr = typename std::enable_if<IsDetailClass<D>(), typename std::conditional<AllowsChanges, D*, typename std::add_const_t<D>*>::type>::type

The type of a detail pointer returned by the methods.

Template Parameters
DThe class of the detail.

◆ TResultTraitPtr

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm>
using TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::TResultTraitPtr = typename std::enable_if<(AllowsDirectTraitAccess || (Paradigm <= EParadigm::Unsafe)) && IsTraitType<T>(), typename std::conditional<AllowsChanges, T*, typename std::add_const_t<T>*>::type>::type

The type of a trait pointer returned by the methods.

Template Parameters
TThe type of the trait.
ParadigmThe access safety paradigm.

◆ TResultTraitRef

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm>
using TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::TResultTraitRef = typename std::enable_if<(AllowsDirectTraitAccess || (Paradigm <= EParadigm::Unsafe)) && IsTraitType<T>(), typename std::conditional<AllowsChanges, T&, typename std::add_const_t<T>&>::type>::type

The type of a trait reference returned by the methods.

Template Parameters
TThe type of the trait.
ParadigmThe access safety paradigm.

◆ TResultTraitVoidPtr

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm>
using TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::TResultTraitVoidPtr = typename std::enable_if<AllowsDirectTraitAccess || (Paradigm <= EParadigm::Unsafe), typename std::conditional<AllowsChanges, void*, const void*>::type>::type

The type of a trait void pointer returned by the methods.

Template Parameters
ParadigmThe access safety paradigm.

Member Enumeration Documentation

◆ anonymous enum

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
anonymous enum
Enumerator
AllowsChanges 

Is the target subject mutable (non-constant)?

AllowsDirectTraitAccess 

Is the direct (trait) data access possible?

AllowsStructuralChanges 

Is changing of the subject's structure (adding/removing traits) allowed.

Constructor & Destructor Documentation

◆ TSubjectHandle() [1/4]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::TSubjectHandle ( const int32  InId,
const GenerationType  InGeneration 
)
inlineprotected

Construct by explicit id and generation specifications.

Parameters
InIdThe unique subject identifier.
InGenerationThe generation of the subject.

◆ TSubjectHandle() [2/4]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::TSubjectHandle ( const FCommonSubjectHandle InHandle)
inlineprotected

◆ TSubjectHandle() [3/4]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::TSubjectHandle ( )
inline

Construct a new invalid subject handle.

◆ TSubjectHandle() [4/4]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::TSubjectHandle ( const TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges > &  InHandle)
inline

Copy-construct a new subject handle.

Member Function Documentation

◆ BringOnline()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::BringOnline ( ) const
inline

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 status of the operation.
EApparatusStatus::Noop if the subject is already online.
See also
IsOnline() GetNetworkId()

◆ CopyTraitsTo()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<bool AnyDirectAccess>
EApparatusStatus TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::CopyTraitsTo ( const TSubjectHandle< true, AnyDirectAccess, true > &  DestinationSubjectHandle) const
inline

Copy the traits 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 ones.

Parameters
DestinationSubjectHandleThe destination subject to copy to.
Returns
The status of the operation.

◆ Despawn()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::Despawn ( ) const
inline

Destroy the subject.

If the handle is not valid, nothing is performed.

Template Parameters
ParadigmThe security paradigm to use.
Returns
The status of the operation.

◆ DespawnDeferred()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::DespawnDeferred ( const bool  bHard = true) const
inline

Destroy the subject.

Deferred version.

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

If the handle is not valid, nothing is performed.

Template Parameters
ParadigmThe security paradigm to use.
Parameters
bHardShould the hard version of the operation be performed, i.e. the entity gets skipped during the iteratings from now on.
Returns
The status of the operation.

◆ GetDetail() [1/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<class D >
TResultDetailPtr< D > TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::GetDetail ( ) const
inline

Get a detail of a certain class.

Templated version.

Template Parameters
DThe class of the detail to get.
Returns
A pointer to the detail of the designated class.
nullptr If there is no such detail.

◆ GetDetail() [2/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
TResultDetailPtr< UDetail > TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::GetDetail ( TSubclassOf< UDetail DetailClass) const
inline

Get a detail of a certain class.

Parameters
DetailClassThe class of the detail to get.
Returns
A pointer to the detail of the designated class.
nullptr If there is no such detail.

◆ GetTraitPtr() [1/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm = EParadigm::Safe>
TResultTraitPtr< T, Paradigm > TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::GetTraitPtr ( ) const
inline

Get a pointer to a trait of a certain type.

Templated version.

The operation is secure only for subject handles allowing direct access to the traits data.

Template Parameters
TThe type of the trait to get.
ParadigmThe security paradigm to use.
Returns
A pointer to the trait data.
nullptr If there is no such trait in the subject.

◆ GetTraitPtr() [2/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
TResultTraitVoidPtr< Paradigm > TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::GetTraitPtr ( UScriptStruct *const  TraitType) const
inline

Get a pointer to a trait of a certain type.

The operation is secure only for subject handles allowing direct access to the traits data.

Template Parameters
ParadigmThe security paradigm to use.
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.

◆ GetTraitRef()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm = EParadigm::Safe>
TResultTraitRef< T, Paradigm > TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::GetTraitRef ( ) const
inline

Get a trait from a subject by its type.

Templated version.

The operation is secure only for subject handles allowing direct access to the traits data.

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

◆ IsHandleSolid()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
static constexpr bool TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::IsHandleSolid ( )
inlinestaticconstexpr

Check if the handle itself a solid one.

◆ ObtainTrait() [1/4]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), T >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ObtainTrait ( ) const
inline

Obtain a trait copy from a subject.

Templated version.

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

Template Parameters
TThe type of the trait to obtain.
ParadigmThe security paradigm to use.
Returns
A copy of the trait.

◆ ObtainTrait() [2/4]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ObtainTrait ( T OutTrait,
const bool  bTraitDataInitialized = true 
) const
inline

Obtain a trait from a subject.

Templated 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 security paradigm to use.
TThe type of the trait to obtain.
Parameters
OutTraitThe trait receiver.
bTraitDataInitializedIs the OutTrait actually initialized?
Returns
The status of the operation.

◆ ObtainTrait() [3/4]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ObtainTrait ( UScriptStruct *const  TraitType) const
inline

Obtain a trait for a subject by its type.

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

Template Parameters
ParadigmThe security paradigm to use.
Parameters
TraitTypeThe type of the trait to obtain.
Returns
The status of the operation.

◆ ObtainTrait() [4/4]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ObtainTrait ( UScriptStruct *const  TraitType,
void *const  OutTraitData,
const bool  bTraitDataInitialized = true 
) const
inline

Obtain a trait from a 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 security paradigm to use.
Parameters
TraitTypeThe type of the trait to obtain.
OutTraitDataThe trait data receiver.
bTraitDataInitializedIs the OutTraitData buffer actually initialized?
Returns
The status of the operation.

◆ ObtainTraitDeferred() [1/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), T >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ObtainTraitDeferred ( ) const
inline

Obtain a trait copy from a subject.

Templated deferred version.

If the trait is currently missing in the subject, its default value is returned.

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

Template Parameters
TThe type of the trait to obtain.
ParadigmThe security paradigm to use.
Returns
A copy of the trait.

◆ ObtainTraitDeferred() [2/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ObtainTraitDeferred ( UScriptStruct *const  TraitType) const
inline

Obtain a trait for a subject by its type.

Deferred version.

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

Template Parameters
ParadigmThe security paradigm to use.
Parameters
TraitTypeThe type of the trait to obtain.
Returns
The status of the operation.

◆ ObtainTraitPtr() [1/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<((AllowsStructuralChanges &&AllowsDirectTraitAccess)||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), T * >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ObtainTraitPtr ( ) const
inline

Obtain a trait pointer from a subject.

Templated pointer version.

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

Template Parameters
TThe type of the trait to obtain.
ParadigmThe security paradigm to use.
Returns
A pointer to the trait.

◆ ObtainTraitPtr() [2/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsStructuralChanges &&AllowsDirectTraitAccess)||(Paradigm<=EParadigm::Unsafe), void * >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ObtainTraitPtr ( UScriptStruct *const  TraitType)
inline

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

Pointer version.

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

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

◆ ObtainTraitRef()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<((AllowsStructuralChanges &&AllowsDirectTraitAccess)||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), T & >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ObtainTraitRef ( ) const
inline

Obtain a trait reference from a subject.

Templated reference version.

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

Template Parameters
TThe type of the trait to obtain.
ParadigmThe security paradigm to use.
Returns
A reference to the trait.

◆ operator!=() [1/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
bool TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::operator!= ( const FCommonSubjectHandle InSubjectHandle) const
inline

Check if the subject handle points to a different subject than the other one.

Two invalid subject handles are considered to be the same and this operator would return false.

Parameters
InSubjectHandleA subject handle to compare with.
Returns
true if the handles point to different subjects or one is invalid.
false if the handles point to the same subject or both are invalid.

◆ operator!=() [2/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
bool TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::operator!= ( TYPE_OF_NULLPTR  ) const
inline

Check if the subject handle is valid and is pointing to an existent subject.

Returns
Returns true if the subject is valid. Otherwise, false is returned.

◆ operator=()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
TSubjectHandle & TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::operator= ( TYPE_OF_NULLPTR  )
inline

Clear the subject handle, essentially making it invalid.

◆ operator==() [1/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
bool TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::operator== ( const FCommonSubjectHandle InSubjectHandle) const
inline

Check if the subject handle points to the same subject as the other one.

If both handles are invalid, returns true

Parameters
InSubjectHandleA subject handle to compare with.
Returns
true if the handles point to the same subject or both are invalid.
false if the handles point to different subjects or one is invalid.

◆ operator==() [2/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
bool TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::operator== ( TYPE_OF_NULLPTR  ) const
inline

Check if the subject handle is invalid and is pointing to a non-existent subject.

Returns
Returns true if the subject is invalid. Otherwise, false is returned.

◆ PushTrait() [1/6]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), void >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::PushTrait ( const EPeerRole  PeerRole = EPeerRole::None) const
inline

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

Templated 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 pass of the server's version.

Template Parameters
TThe type of the trait to send.
ParadigmThe safety paradigm to invoke under.
Parameters
PeerRoleThe peer role specification. If left as EPeerRole::None, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.

◆ PushTrait() [2/6]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), void >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::PushTrait ( const T Trait,
const bool  bSetForLocal = false,
const EPeerRole  PeerRole = EPeerRole::None 
) const
inline

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

Templated 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 pass of the server's version.

Template Parameters
ParadigmThe security paradigm to use.
TThe type of the trait to send.
Parameters
[in]TraitThe trait to push.
[in]bSetForLocalShould the trait be also set on the local version of the subject.
[in]PeerRoleThe peer role specification. If left as EPeerRole::None, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you should provide one explicitly sometimes.

◆ PushTrait() [3/6]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), void >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::PushTrait ( const T Trait,
const EPeerRole  PeerRole 
) const
inline

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

Templated 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 pass of the server's version.

Template Parameters
ParadigmThe security paradigm to use.
TThe type of the trait to send.
Parameters
[in]TraitThe trait to push.
[in]PeerRoleThe peer role specification. If left as EPeerRole::None, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you should provide one explicitly sometimes.

◆ PushTrait() [4/6]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), void >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::PushTrait ( UScriptStruct *const  TraitType,
const EPeerRole  PeerRole = EPeerRole::None 
) const
inline

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

Templated 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 pass of the server's version.

Template Parameters
ParadigmThe safety paradigm to invoke under.
Parameters
TraitTypeThe type of the trait to send.
PeerRoleThe peer role specification. If left as EPeerRole::None, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.

◆ PushTrait() [5/6]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), void >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::PushTrait ( UScriptStruct *const  TraitType,
const void *const  TraitData,
const bool  bSetForLocal = false,
const EPeerRole  PeerRole = EPeerRole::None 
) const
inline

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

Templated 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 pass of the server's version.

Template Parameters
ParadigmThe safety paradigm to invoke under.
Parameters
[in]TraitTypeThe type of the trait to send.
[in]TraitDataThe data of the trait to send.
[in]bSetForLocalShould the trait also be set for the local version of the subject.
[in]PeerRoleThe peer role specification. If left as EPeerRole::None, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.

◆ PushTrait() [6/6]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), void >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::PushTrait ( UScriptStruct *const  TraitType,
const void *const  TraitData,
const EPeerRole  PeerRole 
) const
inline

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

Templated 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 pass of the server's version.

Template Parameters
ParadigmThe safety paradigm to invoke under.
Parameters
[in]TraitTypeThe type of the trait to send.
[in]TraitDataThe data of the trait to send.
[in]PeerRoleThe peer role specification. If left as EPeerRole::None, the peer role is tried to be derived automatically. This may be ambiguous on a listen server, so you can provide one explicitly.

◆ RemoveAllTraits()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::RemoveAllTraits ( ) const
inline

Remove all of the traits from the subject (if any).

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

Template Parameters
ParadigmThe security paradigm to use.
Returns
The status of the operation.

◆ RemoveAllTraitsDeferred()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::RemoveAllTraitsDeferred ( ) const
inline

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 security paradigm to use.
Returns
The status of the operation.

◆ RemoveTrait() [1/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::RemoveTrait ( ) const
inline

Remove a trait from the subject.

Templated 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.
ParadigmThe security paradigm to use.
Returns
The status of the operation.

◆ RemoveTrait() [2/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::RemoveTrait ( UScriptStruct *const  TraitType) const
inline

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 security paradigm to use.
Parameters
TraitTypeThe type of the trait to remove.
Returns
The status of the operation.

◆ RemoveTraitDeferred() [1/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if<(AllowsChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::RemoveTraitDeferred ( ) const
inline

Remove a trait from the subject.

Templated 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.
ParadigmThe security paradigm to use.
Returns
The status of the operation.

◆ RemoveTraitDeferred() [2/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::RemoveTraitDeferred ( UScriptStruct *const  TraitType) const
inline

Remove a trait from the subject.

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 security paradigm to use.
Parameters
TraitTypeThe type of the trait to remove. If nullptr, nothing is performed.
Returns
The status of the operation.

◆ SetConnectionPermit()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), void >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetConnectionPermit ( UNetConnection *const  Connection) const
inline

Set the server-side connection to a client from which it is allowed to push traits to this subject.

Template Parameters
ParadigmThe safety paradigm to invoke under.
Parameters
[in]ConnectionThe connection pass to set.

◆ SetFlag()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), bool >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetFlag ( const EFlagmarkBit  Flag,
const bool  bState = true 
) const
inline

Set a single flag for the subject.

This is a user-level method. Setting of the system-level flags is strictly prohibited.

The operation is atomic and thread-safe.

Template Parameters
ParadigmThe security paradigm to use.
Parameters
FlagThe flag to set.
bStateThe state to set to.
Returns
The previous state of the flag.

◆ SetFlag_Status()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetFlag_Status ( const EFlagmarkBit  Flag,
const bool  bState = true 
) const
inline

Set a single flag for the subject.

Status version.

This is a user-level method. Setting of the system-level flags is strictly prohibited.

The operation is atomic and thread-safe.

Template Parameters
ParadigmThe security paradigm to use.
Parameters
FlagThe flag to set.
bStateThe state to set to.
Returns
The status of the operation.

◆ SetFlagmark()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EFlagmark >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetFlagmark ( const EFlagmark  Flagmark) const
inline

Set the flagmark of the subject.

This is a user-level method that prevents setting the system-level flags.

This operation is atomic and thread-safe.

Template Parameters
ParadigmThe security paradigm to use.
Parameters
FlagmarkThe flagmark to set. The system-level bits are silently ignored.
Returns
The previous flagmark of the subject.

◆ SetFlagmark_Status()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetFlagmark_Status ( const EFlagmark  Flagmark) const
inline

Set the flagmark of the subject.

Status version.

This is a user-level method that prevents setting the system-level flags.

This operation is atomic and thread-safe.

Template Parameters
ParadigmThe security paradigm to use.
Parameters
FlagmarkThe flagmark to set. The system-level bits are silently ignored.
Returns
The status of the operation.

◆ SetFlagmarkMasked()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EFlagmark >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetFlagmarkMasked ( const EFlagmark  Flagmark,
const EFlagmark  Mask 
) const
inline

Set the flagmark of the subject.

This is a user-level method that prevents setting the system-level flags.

This operation is atomic and thread-safe.

Template Parameters
ParadigmThe security paradigm to use.
Parameters
FlagmarkThe flagmark to set.
MaskThe mask to use.
Returns
The previous flagmark of the subject

◆ SetFlagmarkMasked_Status()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetFlagmarkMasked_Status ( const EFlagmark  Flagmark,
const EFlagmark  Mask 
) const
inline

Set the flagmark of the subject.

Status version.

This is a user-level method that prevents setting the system-level flags.

This operation is atomic and thread-safe.

Template Parameters
ParadigmThe security paradigm to use.
Parameters
FlagmarkThe flagmark to set.
MaskThe mask to use.
Returns
The status of the operation.

◆ SetTrait() [1/3]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetTrait ( const FTraitRecord &  TraitRecord) const
inline

Set a trait of the subject to a trait record.

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

Template Parameters
ParadigmThe security paradigm to use.
Parameters
TraitRecordThe trait record to set to.
Returns
The status of the operation.

◆ SetTrait() [2/3]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetTrait ( const T Trait) const
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
ParadigmThe security paradigm to use.
TA type of the trait to add.
Parameters
TraitA trait to initialize with.
Returns
The status of the operation.

◆ SetTrait() [3/3]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsStructuralChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetTrait ( UScriptStruct *const  TraitType,
const void *const  TraitData 
) const
inline

Set a trait of the subject by its type.

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

Template Parameters
ParadigmThe security paradigm to use.
Parameters
TraitTypeThe type of the trait to add.
TraitDataThe trait data to initialize with.
Returns
The status of the operation.

◆ SetTraitDeferred() [1/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe, typename T = void>
std::enable_if<(AllowsChanges||(Paradigm<=EParadigm::Unsafe))&&IsTraitType< T >(), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetTraitDeferred ( const T Trait) const
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
ParadigmThe security paradigm to use.
TThe type of the trait to add.
Parameters
TraitThe trait to initialize with.
Returns
The status of the operation.

◆ SetTraitDeferred() [2/2]

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetTraitDeferred ( UScriptStruct *const  TraitType,
const void *const  TraitData 
) const
inline

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 security paradigm to use.
Parameters
TraitTypeThe type of the trait to add.
TraitDataThe trait data to initialize with.
Returns
The status of the operation.

◆ SetTraitmarkPass()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetTraitmarkPass ( const FTraitmark InTraitmarkPermit) const
inline

◆ SetTraitmarkPermit()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), EApparatusStatus >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::SetTraitmarkPermit ( const FTraitmark InTraitmarkPermit) const
inline

Set the server-side list of traits allowed to be pushed from clients.

Template Parameters
ParadigmThe safety paradigm to invoke under.
Parameters
[in]InTraitmarkPermitThe traitmark pass to set.
Returns
The status of the operation.

◆ ToggleFlag()

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<EParadigm Paradigm = EParadigm::Safe>
std::enable_if< AllowsChanges||(Paradigm<=EParadigm::Unsafe), bool >::type TSubjectHandle< bAllowChanges, bAllowDirectTraitAccess, bAllowStructuralChanges >::ToggleFlag ( const EFlagmarkBit  Flag) const
inline

Toggle a single flag for the subject.

This is a user-level method. Changing a system-level flag is strictly prohibited.

The operation is atomic and thread-safe.

Template Parameters
ParadigmThe security paradigm to use.
Parameters
FlagThe flag to toggle.
Returns
The previous state of the flag.

Friends And Related Function Documentation

◆ AMechanism

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend class AMechanism
friend

◆ ASubjectiveActor

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend class ASubjectiveActor
friend

◆ FChunkSlot

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend struct FChunkSlot
friend

◆ FConstSubjectHandle

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend struct FConstSubjectHandle
friend

◆ FSolidSubjectHandle

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend struct FSolidSubjectHandle
friend

◆ FSubjectInfo

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend struct FSubjectInfo
friend

◆ FSubjectNetworkState

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend struct FSubjectNetworkState
friend

◆ FSubjectRecord

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend struct FSubjectRecord
friend

◆ ISubjective

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend class ISubjective
friend

◆ TBeltIt

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename SubjectHandleT >
friend struct TBeltIt
friend

◆ TChain

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename ChunkItT , typename BeltItT , EParadigm Paradigm>
friend struct TChain
friend

◆ TChunkIt

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
template<typename SubjectHandleT >
friend struct TChunkIt
friend

◆ UChunk

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend class UChunk
friend

◆ UMachine

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend class UMachine
friend

◆ UNetworkBearerComponent

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend class UNetworkBearerComponent
friend

◆ USubjectiveActorComponent

template<bool bAllowChanges, bool bAllowDirectTraitAccess, bool bAllowStructuralChanges>
friend class USubjectiveActorComponent
friend

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