Apparatus
Version 1.23
ECS data-oriented workflow for Unreal Engine.
|
An interface for all sorts of subjectives. More...
#include <Subjective.h>
Public Types | |
typedef int32 | SlotIndexType |
The type of the slot index. | |
Public Member Functions | |
AMechanism * | GetMechanism () const |
Get the mechanism this subjective is currently part of (if registered). | |
template<EParadigm Paradigm = EParadigm::Safe> | |
TOutcome< Paradigm > | SetMechanism (AMechanism *const Mechanism) |
Set the mechanism of the subjective. | |
const TArray< FTraitRecord > & | GetTraitRecordsRef () const |
Direct access for the internal traits array. | |
virtual const TArray< UDetail * > & | GetDetailsRef () const |
Direct access for the internal details array. | |
const FFingerprint & | GetFingerprint () const |
Get the active fingerprint of the subjective. | |
bool | Matches (const FFilter &InFilter) const |
Check if the subjective matches a supplied filter. | |
bool | Matches (const FTraitmark &InTraitmark) const |
Check if the subjective matches a supplied traitmark as a filter. | |
bool | Matches (const FDetailmark &InDetailmark) const |
Check if the subjective matches a supplied detailmark as a filter. | |
UBelt * | GetPreferredBelt () const |
Get the preferred belt of the subjective (if any). | |
const struct FBeltSlot * | GetSlot () const |
Get the current belt slot of the subjective (if any). | |
bool | IsRegistered () const |
Check if the subjective is registered within the machine. | |
int32 | GetSlotIndex () const |
Get the current slot index of the subjective. | |
bool | IsBooted () const |
Check if the subject is booted. | |
FSubjectHandle | GetHandle () |
Get the subject handle of this subjective. | |
FConstSubjectHandle | GetHandle () const |
Get the subject handle of this subjective. | |
template<EParadigm Paradigm = EParadigm::DefaultPortable> | |
TOutcome< Paradigm > | Unregister () |
Unregister the subjective from its mechanism in a manual fashion. | |
virtual uint32 | CalcHash () const |
Calculate the hash of the subjective. | |
void | ReceiveHandleDespawned () |
Called when the subject handle is despawned. | |
virtual void | NotifyHandleDespawned () |
Called when the subject handle is despawned. | |
virtual AActor * | GetActor () const |
Get an actor corresponding to the subjective (if any). | |
Flagmark | |
EFlagmark | GetFlagmark () const |
Get the current flagmark of the subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, EFlagmark > | SetFlagmark (const EFlagmark InFlagmark) |
Set the current flagmark for the subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, EFlagmark > | SetFlagmarkMasked (const EFlagmark InFlagmark, const EFlagmark InMask=FM_AllUserLevel) |
Set the current flagmark for the subjective in a masked fashion. | |
bool | HasFlag (const EFlagmarkBit Flag) const |
Get the current state of a flag for the subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, bool > | SetFlag (const EFlagmarkBit Flag, const bool bState=true) |
Set a flag for the subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, bool > | ToggleFlag (const EFlagmarkBit Flag) |
Toggle a flag for the subjective. | |
Traits | |
bool | HasTrait (UScriptStruct *const TraitType) const |
Check if the subjective has a certain trait. | |
template<typename T , TTraitTypeSecurity< T > = true> | |
bool | HasTrait () const |
Check if there is a trait of a specific type in the subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | SetTrait (UScriptStruct *const TraitType, const void *const TraitData) |
Set a trait of the subjective by its type. | |
template<EParadigm Paradigm = EParadigm::Default, typename T = void> | |
TOutcomeIf< Paradigm, IsTraitType< T >()> | SetTrait (const T &Trait) |
Set a trait of the subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | GetTrait (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const |
Get a trait from the subjective by its type. | |
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm > | GetTrait (T *const OutTrait, const bool bTraitDataInitialized=true) const |
Get a trait from the subjective by its type. | |
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm > | GetTrait (T &OutTrait, const bool bTraitDataInitialized=true) const |
Get a trait from the subjective by its type. | |
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm, T > | GetTrait () const |
Get a copy of a trait from the subjective by its type. | |
template<typename T , EParadigm Paradigm = EParadigm::Default, TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm, T > | GetTrait () const |
Get a copy of a trait from the subjective by its type. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcomeIfUnsafe< Paradigm, const void * > | GetTraitPtr (UScriptStruct *const TraitType) const |
Get the trait data from the subjective by its type. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcomeIfUnsafe< Paradigm, void * > | GetTraitPtr (UScriptStruct *const TraitType) |
Get the trait data from a subjective by its type. | |
template<EParadigm Paradigm = EParadigm::Default, typename T = void> | |
TOutcomeIf< Paradigm, IsTraitType< T >() &&IsUnsafe(Paradigm), const T * > | GetTraitPtr () const |
Get the trait data from the subjective by its type. | |
template<EParadigm Paradigm = EParadigm::Default, typename T = void> | |
TOutcomeIf< Paradigm, IsTraitType< T >() &&IsUnsafe(Paradigm), T * > | GetTraitPtr () |
Get the trait data from the subjective by its type. | |
template<typename T , EParadigm Paradigm = EParadigm::Default> | |
auto | GetTraitPtr () const |
Get the trait data from the subjective by its type. | |
template<typename T , EParadigm Paradigm = EParadigm::Default> | |
auto | GetTraitPtr () |
Get the trait data from the subjective by its type. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | ObtainTrait (UScriptStruct *TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) |
Obtain a trait from the subjective by its type. | |
template<EParadigm Paradigm = EParadigm::Default, typename T = void> | |
TOutcomeIf< Paradigm, IsTraitType< T >()> | ObtainTrait (T *const OutTrait, const bool bTraitDataInitialized=true) |
Obtain a trait from the subjective. | |
template<EParadigm Paradigm = EParadigm::Default, typename T = void, TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm > | ObtainTrait (T &OutTrait, const bool bTraitDataInitialized=true) |
Obtain a trait from the subjective. | |
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm, T > | ObtainTrait () |
Get a copy of an obtained trait from the subjective. | |
template<typename T , EParadigm Paradigm = EParadigm::Default, TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm, T > | ObtainTrait () |
Get a copy of an obtained trait from the subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | RemoveTrait (UScriptStruct *const TraitType) |
Remove a trait from the subjective. | |
template<EParadigm Paradigm, typename T , TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm > | RemoveTrait () |
Remove a trait from the subjective. | |
template<typename T , EParadigm Paradigm = EParadigm::Default, TTraitTypeSecurity< T > = true> | |
TOutcome< Paradigm > | RemoveTrait () |
Remove a trait from the subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | RemoveAllTraits () |
Remove all of the traits from the subjective. | |
Details | |
void | GetDetails (const bool bIncludeDisabled, TArray< UDetail * > &OutDetails) const |
Get all of the details of the subjective. | |
void | GetDetails (TArray< UDetail * > &OutDetails, const bool bIncludeDisabled=false) const |
Get all the enabled details of the subjective. | |
UDetail * | FindDetail (TSubclassOf< UDetail > DetailClass, const bool bIncludeDisabled=false) const |
template<class D > | |
std::enable_if< IsDetailClass< D >(), D * >::type | FindDetail (const bool bIncludeDisabled=false) const |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, UDetail * > | GetDetail (TSubclassOf< UDetail > DetailClass, const bool bIncludeDisabled=false) const |
Get a detail by its class. | |
template<EParadigm Paradigm, class D > | |
TOutcomeIf< Paradigm, IsDetailClass< D >(), D * > | GetDetail (const bool bIncludeDisabled=false) const |
Get a detail by its class. | |
template<class D , EParadigm Paradigm = EParadigm::Default> | |
TOutcomeIf< Paradigm, IsDetailClass< D >(), D * > | GetDetail (const bool bIncludeDisabled=false) const |
Get a detail by its class. | |
template<EParadigm Paradigm = EParadigm::Default, typename AllocatorT = FDefaultAllocator> | |
TOutcome< Paradigm > | CollectDetails (TSubclassOf< UDetail > DetailClass, TArray< UDetail *, AllocatorT > &OutDetails, const bool bIncludeDisabled=false) const |
Collect all of the details of a certain class. | |
template<EParadigm Paradigm = EParadigm::Default, typename AllocatorT = FDefaultAllocator> | |
TOutcome< Paradigm > | GetDetails (TSubclassOf< UDetail > DetailClass, TArray< UDetail *, AllocatorT > &OutDetails, const bool bIncludeDisabled=false) const |
Get all of the details of a certain class. | |
template<class D , typename AllocatorT > | |
std::enable_if< IsDetailClass< D >(), void >::type | GetDetails (TArray< D *, AllocatorT > &OutDetails, const bool bIncludeDisabled=false) const |
Get all of the details of a certain class. | |
void | FindDetails (TSubclassOf< UDetail > DetailClass, TArray< UDetail * > &OutDetails, const bool bIncludeDisabled=false) const |
bool | HasDetail (TSubclassOf< UDetail > DetailClass, const bool bIncludeDisabled=false) const |
Check if there is a detail of a specific class in the subjective. | |
template<class D > | |
std::enable_if< IsDetailClass< D >(), bool >::type | HasDetail (const bool bIncludeDisabled=false) const |
Check if there is a detail of a specific class in the subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, UDetail * > | EnableDetail (const TSubclassOf< UDetail > DetailClass) |
Enable a detail of a certain type. | |
template<EParadigm Paradigm, class D > | |
TOutcomeIf< Paradigm, IsDetailClass< D >(), D * > | EnableDetail () |
Enable a detail of a certain type. | |
template<class D , EParadigm Paradigm = EParadigm::Default> | |
TOutcomeIf< Paradigm, IsDetailClass< D >(), D * > | EnableDetail () |
Enable a detail of a certain type. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, UDetail * > | AddDetail (const TSubclassOf< UDetail > DetailClass, const bool bReuseDisabled=false) |
Add a new active detail or reuse an inactive one. | |
template<EParadigm Paradigm, class D > | |
TOutcomeIf< Paradigm, IsDetailClass< D >(), D * > | AddDetail (const bool bReuseDisabled=false) |
Add a new active detail or reuse an inactive one. | |
template<class D , EParadigm Paradigm = EParadigm::Default> | |
TOutcomeIf< Paradigm, IsDetailClass< D >(), D * > | AddDetail (const bool bReuseDisabled=false) |
Add a new active detail or reuse an inactive one. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | DisableDetail (const TSubclassOf< UDetail > DetailClass, const bool bDisableMultiple=false) |
Disable detail(s) by class. | |
template<EParadigm Paradigm, class D > | |
TOutcomeIf< Paradigm, IsDetailClass< D >()> | DisableDetail (const bool bDisableMultiple=false) |
Disable detail(s) by class. | |
template<class D > | |
auto | DisableDetail (const bool bDisableMultiple=false) |
Disable detail(s) by class. | |
Networking | |
virtual bool | IsNetworkCapable () const |
Check if the subjective class is capable of networking. | |
uint32 | GetNetworkId () const |
Get the unique cross-peer network identifier of the subjective (if any). | |
bool | IsServerSide () const |
Check if the subjective is a server-side one. | |
bool | IsClientSide () const |
Check if the subjective is a client-side one. | |
UNetConnection * | GetConnectionPermit () const |
Get the server-side connection to a client from which it is allowed to push traits to this subjective. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | SetConnectionPermit (UNetConnection *const Connection) |
Set the server-side connection to a client from which it is allowed to push traits to this subjective. | |
const FTraitmark & | GetTraitmarkPermit () const |
Get the server-side list of traits allowed to be received from clients. | |
const FTraitmark & | GetTraitmarkPass () const |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | SetTraitmarkPermit (const FTraitmark &InTraitmarkPermit) |
Set the server-side list of traits allowed to be received from clients. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | SetTraitmarkPass (const FTraitmark &InTraitmarkPermit) |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | PushTrait (UScriptStruct *const TraitType, const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) const |
Send an existing trait to a remote peer. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | PushTrait (UScriptStruct *const TraitType, const void *const TraitData, const bool bSetForLocal, const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) |
Send an additional trait to a remote peer. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | PushTrait (UScriptStruct *const TraitType, const void *const TraitData, const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) |
Send an additional trait to a remote peer. | |
template<EParadigm Paradigm = EParadigm::Default, 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 extra trait to a remote peer. | |
template<EParadigm Paradigm = EParadigm::Default, typename T = void> | |
TOutcomeIf< Paradigm, IsTraitType< T >()> | PushTrait (const T &Trait, const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) |
Send an extra trait to a remote peer. | |
template<EParadigm Paradigm, typename T > | |
TOutcomeIf< Paradigm, IsTraitType< T >()> | PushTrait (const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) |
Send an extra trait to a remote peer. | |
template<typename T , EParadigm Paradigm = EParadigm::Default> | |
auto | PushTrait (const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) |
Send an extra trait to a remote peer. | |
Static Public Member Functions | |
static bool | IsValidSubjective (const ISubjective *const InSubjective) |
Static Public Attributes | |
static constexpr SlotIndexType | InvalidSlotIndex = -1 |
Invalid belt slot index. | |
Protected Member Functions | |
bool | MarkBooted () |
Set the subjective as booted. | |
void | TakeBeltSlot (UBelt *const InBelt, const int32 InSlotIndex) |
Set or reset the current belt slot of the subjective. | |
virtual FStandardSubjectivePropertyBlock * | DoGetStandardPropertyBlock () |
virtual FStandardSubjectivePropertyBlock * | DoGetStandardPropertyBlock () const |
FStandardSubjectivePropertyBlock & | GetStandardPropertyBlock () |
const FStandardSubjectivePropertyBlock & | GetStandardPropertyBlock () const |
virtual FStandardSubjectiveNetworkPropertyBlock * | DoGetStandardNetworkPropertyBlock () |
virtual FStandardSubjectiveNetworkPropertyBlock * | DoGetStandardNetworkPropertyBlock () const |
FStandardSubjectiveNetworkPropertyBlock & | GetStandardNetworkPropertyBlock () |
const FStandardSubjectiveNetworkPropertyBlock & | GetStandardNetworkPropertyBlock () const |
const EFlagmark & | GetFlagmarkPropRef () const |
Get the internal flagmark property reference. | |
EFlagmark & | GetFlagmarkPropRef () |
Get the internal flagmark property reference. | |
auto & | GetMechanismOverridePropRef () const |
Get the mechanism override property of the subjective. | |
auto & | GetMechanismOverridePropRef () |
Get the mechanism override property of the subjective. | |
TArray< FTraitRecord > & | GetTraitRecordsRef () |
Direct access for the internal traits array. | |
TArray< UDetail * > & | GetDetailsRef () |
Direct access for the internal details array. | |
void | TakeBeltSlot (TYPE_OF_NULLPTR) |
Reset the belt slot. | |
void | ClientReceiveNetworkId_Implementation (const uint32 NetworkId) |
Assign a unique network identifier to the subject of the subjective. | |
void | ServerRequestNetworkId_Implementation () |
Request a unique network identifier for the subject of the subjective. | |
void | PeerReceiveTrait_Implementation (EPeerRole PeerRole, UScriptStruct *const TraitType, const TArray< uint8 > &TraitData) |
Receive a trait on the server or the client. | |
bool | PeerReceiveTrait_Validate (EPeerRole PeerRole, UScriptStruct *const TraitType, const TArray< uint8 > &TraitData) |
Validate receiving a trait on the server or the client. | |
virtual TPortableOutcome | DoPushTrait (const EParadigm Paradigm, UScriptStruct *const TraitType, const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) const |
virtual TPortableOutcome | DoPushTrait (const EParadigm Paradigm, UScriptStruct *const TraitType, const void *const TraitData, const bool bSetForLocal=false, const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) |
virtual void | AssignNetworkIdOnClient (const uint32 NetworkId) |
Assign a network identifier on a client. | |
virtual void | ObtainNetworkIdFromServer () |
Obtain a networking subject identifier from the server. | |
void | TakeBeltSlot (const int32 InSlotIndex) |
Change the current slot of the subjective, while preserving the belt. | |
UBelt * | GetBelt () const |
Get the active belt of the subjective (if any). | |
FFingerprint & | GetFingerprintRef () |
Get the internal fingerprint of the subjective. | |
const FFingerprint & | GetFingerprintRef () const |
Get the internal fingerprint of the subjective. | |
struct FBeltSlot * | GetSlotPtr () |
Get the current belt slot of the subjective (if any). | |
void | DoRegister () |
Perform an actual registration of the subjective. | |
template<EParadigm Paradigm = EParadigm::DefaultInternal> | |
TOutcome< Paradigm > | DoUnregister () |
Perform an actual de-registration procedure on the subjective. | |
void | DoStartSerialization (FArchive &Archive) |
Begin the serialization routine. | |
void | DoFinishSerialization (FArchive &Archive) |
End the serialization routine. | |
bool | DoesHaveTraitRecord (UScriptStruct *const TraitType) const |
FTraitmark | DoGetTraitRecordsTraitmark () const |
Get the traitmark based on the existing trait records. | |
const FTraitRecord * | DoFindTraitRecord (UScriptStruct *const TraitType) const |
EApparatusStatus | DoGetTraitRecord (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const |
template<typename T > | |
EApparatusStatus | DoGetTraitRecord (T *const OutTraitData, const bool bTraitDataInitialized=true) const |
template<typename T > | |
EApparatusStatus | DoGetTraitRecord (T &OutTraitData, const bool bTraitDataInitialized=true) const |
EApparatusStatus | DoSetTraitRecord (UScriptStruct *TraitType, const void *TraitData) |
template<typename T > | |
EApparatusStatus | DoSetTraitRecord (const T &InTrait) |
template<typename T > | |
EApparatusStatus | DoSetTraitRecord (const T *const InTrait) |
const FTraitRecord & | DoObtainTraitRecord (UScriptStruct *const TraitType) |
EApparatusStatus | DoObtainTraitRecord (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) |
EApparatusStatus | DoRemoveTraitRecord (UScriptStruct *const TraitType) |
EApparatusStatus | DoRemoveAllTraitRecords () |
virtual bool | ShouldBeReplicated () const |
Check if the entity be replicated. | |
Static Protected Member Functions | |
template<EParadigm Paradigm = EParadigm::DefaultInternal, class S = void> | |
static TOutcome< Paradigm > | DoPushTrait (const S *const Subjective, UScriptStruct *const TraitType, EPeerRole PeerRole, const bool bReliable, void(S::*ServerReceiveTraitRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData), void(S::*ClientReceiveTraitRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData), void(S::*ServerReceiveTraitUnreliableRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData), void(S::*ClientReceiveTraitUnreliableRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData)) |
Push a trait to the remote version of the subject. | |
template<EParadigm Paradigm = EParadigm::DefaultInternal, class S = void> | |
static TOutcome< Paradigm > | DoPushTrait (S *const Subjective, UScriptStruct *const TraitType, const void *const TraitData, bool bSetForLocal, EPeerRole PeerRole, const bool bReliable, void(S::*ServerReceiveTraitRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData), void(S::*ClientReceiveTraitRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData), void(S::*ServerReceiveTraitUnreliableRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData), void(S::*ClientReceiveTraitUnreliableRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData)) |
Push a trait to the remote version of the subject. | |
Protected Attributes | |
UBelt * | Belt = nullptr |
A reference to a current subjective's belt (if any). | |
SlotIndexType | SlotIndex = InvalidSlotIndex |
The index of the belt slot, this subject currently resides in. | |
FSubjectHandle | Handle |
The subject handle which points to a global subjects registry. | |
bool | bUnregistered = false |
Was the subjective already unregistered via the normal DoUnregister() means. | |
FStandardSubjectivePropertyBlock * | StandardPropertyBlockCache = nullptr |
FStandardSubjectiveNetworkPropertyBlock * | StandardNetworkPropertyBlockCache = nullptr |
Friends | |
struct | FFingerprint |
struct | FBeltSlot |
struct | FBeltSlotCache |
struct | FSubjectInfo |
class | UDetail |
class | UBelt |
class | AMechanism |
class | UMachine |
class | UApparatusFunctionLibrary |
class | ISolidSubjective |
An interface for all sorts of subjectives.
All of the subjectives are essentially subjects design-wise and inherit all of their functionality internally.
typedef int32 ISubjective::SlotIndexType |
The type of the slot index.
|
inline |
Add a new active detail or reuse an inactive one.
Statically typed paradigm version.
Paradigm | The paradigm to work under. |
D | The class of the detail to add. Must be UDetail based. |
bReuseDisabled | Should disabled details be reused instead of adding a new one? |
|
inline |
Add a new active detail or reuse an inactive one.
Statically typed version.
D | The class of the detail to add. Must be UDetail based. |
Paradigm | The paradigm to work under. |
bReuseDisabled | Should disabled details be reused instead of adding a new one? |
|
inline |
Add a new active detail or reuse an inactive one.
Dynamically typed version.
Paradigm | The paradigm to work under. |
DetailClass | The class of the detail to add. |
bReuseDisabled | Should disabled details be reused instead of adding a new one? |
|
inlineprotectedvirtual |
Assign a network identifier on a client.
Should be implemented via a client RPC.
Reimplemented in ASubjectiveActor, and USubjectiveActorComponent.
|
inlinevirtual |
Calculate the hash of the subjective.
Reimplemented in ISolidSubjective.
|
protected |
Assign a unique network identifier to the subject of the subjective.
The standard implementation for the RPC.
|
inline |
Collect all of the details of a certain class.
Dynamically-typed version.
Supports searching by a base class.
Paradigm | The paradigm to work under. |
AllocatorT | The type of the allocator to feature in the array. |
[in] | DetailClass | The class of the details to collect. |
[out] | OutDetails | The output array to store the details in. |
[in] | bIncludeDisabled | Should disabled details be collected. |
|
inline |
Disable detail(s) by class.
Statically typed paradigm version.
Details can't be removed from subjectives. They can only be disabled.
Paradigm | The paradigm to work under. |
D | The class of the detail to disable. Must be UDetail subclass. |
bDisableMultiple | Should all matching details be disabled instead of first one? |
Disable detail(s) by class.
Statically typed version.
Details can't be removed from subjectives. They can only be disabled.
D | The class of the detail to disable. Must be UDetail subclass. |
bDisableMultiple | Should all matching details be disabled instead of first one? |
TOutcome< Paradigm > ISubjective::DisableDetail | ( | const TSubclassOf< UDetail > | DetailClass, |
const bool | bDisableMultiple = false |
||
) |
Disable detail(s) by class.
Dynamically typed version.
Details can't be removed from subjectives. They can only be disabled.
Paradigm | The paradigm to work under. |
DetailClass | The class of the detail(s) to disable. |
bDisableMultiple | Should all matching details be disabled instead of first one? |
|
inlineprotected |
|
inlineprotected |
|
protected |
End the serialization routine.
|
inlineprotectedvirtual |
Reimplemented in ASubjectiveActor, and USubjectiveActorComponent.
|
inlineprotectedvirtual |
Reimplemented in ASubjectiveActor, and USubjectiveActorComponent.
|
inlineprotectedvirtual |
Reimplemented in ASubjectiveActor, USubjectiveActorComponent, and USubjectiveUserWidget.
|
inlineprotectedvirtual |
Reimplemented in ASubjectiveActor, USubjectiveActorComponent, and USubjectiveUserWidget.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
Get the traitmark based on the existing trait records.
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
Reimplemented in ASubjectiveActor, and USubjectiveActorComponent.
|
inlineprotectedvirtual |
Reimplemented in ASubjectiveActor, and USubjectiveActorComponent.
|
staticprotected |
Push a trait to the remote version of the subject.
Standard implementation.
Paradigm | The paradigm to work under. |
S | The type of the subjective to issue from. |
Subjective | The subjective to use. |
TraitType | 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 reliable channel be used for transaction. |
ServerReceiveTraitRPC | The RPC to receive the trait on a server. |
ClientReceiveTraitRPC | The RPC to receive the trait on a client. |
ServerReceiveTraitUnreliableRPC | The RPC to receive the trait on a server unreliably. |
ClientReceiveTraitUnreliableRPC | The RPC to receive the trait on a client unreliably. |
|
staticprotected |
Push a trait to the remote version of the subject.
Standard implementation.
Paradigm | The paradigm to work under. |
S | The type of the subjective to issue from. |
Subjective | The subjective to use. |
TraitType | The type of the trait to push. |
TraitData | The trait data to push. |
bSetForLocal | Should the trait also be set for the local version of the 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 reliable channel be used for transaction. |
ServerReceiveTraitRPC | The RPC to receive the trait on a server. |
ClientReceiveTraitRPC | The RPC to receive the trait on a client. |
ServerReceiveTraitUnreliableRPC | The RPC to receive the trait on a server unreliably. |
ClientReceiveTraitUnreliableRPC | The RPC to receive the trait on a client unreliably. |
|
protected |
Perform an actual registration of the subjective.
Calls the UMechanism::RegisterSubjective() method in turn.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
Begin the serialization routine.
|
protected |
Perform an actual de-registration procedure on the subjective.
|
inline |
Enable a detail of a certain type.
Statically typed paradigm version.
Adds the detail if there is none of the class already, or reuses an inactive one, enabling it.
Paradigm | The paradigm to work under. |
D | The class of the detail to enable. |
|
inline |
Enable a detail of a certain type.
Statically typed version.
Adds the detail if there is none of the class already, or reuses an inactive one, enabling it.
D | The class of the detail to enable. |
Paradigm | The paradigm to work under. |
|
inline |
Enable a detail of a certain type.
Adds the detail if there is none of the class already, or reuses an inactive one, enabling it.
Paradigm | The paradigm to work under. |
DetailClass | A class of detail to enable. |
|
inline |
Supports searching by a base class.
D | The class of the detail to search for. |
bIncludeDisabled | Should disabled details be included? |
nullptr
otherwise.
|
inline |
Supports searching by a base class.
DetailClass | The class of the detail to search for. |
bIncludeDisabled | Should disabled details be included? |
nullptr
otherwise.
|
inline |
Supports searching by a base class.
|
inlinevirtual |
Get an actor corresponding to the subjective (if any).
Must be overridden in the descendants if they can derive an actor from itselves.
The default implementation just returns nullptr
.
Reimplemented in ISolidSubjective, ASubjectiveActor, and USubjectiveActorComponent.
|
inlineprotected |
Get the active belt of the subjective (if any).
|
inline |
Get the server-side connection to a client from which it is allowed to push traits to this subjective.
|
inline |
Get a detail by its class.
Statically typed version.
Supports searching by a base class.
Paradigm | The paradigm to work under. |
D | The type of the detail to get. |
bIncludeDisabled | Should disabled details be included? |
|
inline |
Get a detail by its class.
Statically typed version.
Supports searching by a base class.
D | The type of the detail to get. |
Paradigm | The paradigm to work under. |
bIncludeDisabled | Should disabled details be included? |
|
inline |
Get a detail by its class.
Supports searching by a base class.
DetailClass | The class of the detail to search for. |
bIncludeDisabled | Should disabled details be considered? |
|
inline |
Get all of the details of the subjective.
bIncludeDisabled | Should disabled details be included? |
OutDetails | An array to store the details in. |
|
inline |
Get all of the details of a certain class.
Statically typed version.
Supports searching by a base class.
D | The class of the details to collect. |
AllocatorT | The type of the allocator to utilize within the details. |
[out] | OutDetails | The output array to store the details in. |
[in] | bIncludeDisabled | Should disabled details be collected. |
|
inline |
Get all the enabled details of the subjective.
OutDetails | An array to store the details in. |
bIncludeDisabled | Should disabled details be included? |
|
inline |
Get all of the details of a certain class.
Dynamically-typed version.
Supports searching by a base class.
Paradigm | The paradigm to work under. |
AllocatorT | The type of the allocator to feature in the array. |
[in] | DetailClass | The class of the details to collect. |
[out] | OutDetails | The output array to store the details in. |
[in] | bIncludeDisabled | Should disabled details be collected. |
|
inlineprotected |
Direct access for the internal details array.
|
inlinevirtual |
Direct access for the internal details array.
Constant version.
|
inline |
Get the active fingerprint of the subjective.
Constant version.
|
inlineprotected |
Get the internal fingerprint of the subjective.
|
inlineprotected |
Get the internal fingerprint of the subjective.
Constant version.
|
inline |
Get the current flagmark of the subjective.
|
inlineprotected |
Get the internal flagmark property reference.
|
inlineprotected |
Get the internal flagmark property reference.
Constant version.
|
inline |
Get the subject handle of this subjective.
|
inline |
Get the subject handle of this subjective.
Constant version.
|
inline |
Get the mechanism this subjective is currently part of (if registered).
|
inlineprotected |
Get the mechanism override property of the subjective.
|
inlineprotected |
Get the mechanism override property of the subjective.
Constant version.
|
inline |
Get the unique cross-peer network identifier of the subjective (if any).
|
inline |
Get the preferred belt of the subjective (if any).
|
inline |
Get the current belt slot of the subjective (if any).
Constant version.
nullptr
, if the subject is not (yet) part of any belt.
|
inline |
Get the current slot index of the subjective.
|
inlineprotected |
Get the current belt slot of the subjective (if any).
nullptr
, if the subject is not (yet) part of any belt.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
Get a copy of a trait from the subjective by its type.
Statically typed version.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
Get a copy of a trait from the subjective by its type.
Statically typed version.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
|
inline |
Get a trait from the subjective by its type.
Statically typed reference version.
If the trait is missing within the subject, the output data is unchanged and EApparatusStatus::Missing is returned.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
[out] | OutTrait | The trait receiver. |
[in] | bTraitDataInitialized | Is the OutTrait actually initialized? |
|
inline |
Get a trait from the subjective by its type.
Statically typed pointer version.
If the trait is missing within the subject, the output data is unchanged and EApparatusStatus::Missing is returned.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
[out] | OutTrait | The trait data receiver. |
[in] | bTraitDataInitialized | Is the OutTrait actually initialized? |
|
inline |
Get a trait from the subjective by its type.
If the trait is missing within the subject, the behavior is undefined and an assertion may be raised.
Paradigm | The paradigm to work under. |
[in] | TraitType | The type of the trait to get. |
[out] | OutTraitData | The trait data receiver. |
[in] | bTraitDataInitialized | Is the OutTraitData buffer actually initialized? |
|
inline |
|
inline |
Get the server-side list of traits allowed to be received from clients.
Can only be queried on a server-side subjective version.
|
inline |
Get the trait data from the subjective by its type.
Statically typed mutable version.
If the trait is missing within the subject, a nullptr
is returned.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
|
inline |
Get the trait data from the subjective by its type.
Statically typed mutable version.
If the trait is missing within the subject, a nullptr
is returned.
T | The type of the trait to get. |
Paradigm | The paradigm to work under. |
|
inline |
Get the trait data from the subjective by its type.
Statically typed constant version.
If the trait is missing within the subject, a nullptr
is returned.
Paradigm | The paradigm to work under. |
T | The type of the trait to get. |
|
inline |
Get the trait data from the subjective by its type.
Statically typed constant version.
If the trait is missing within the subject, a nullptr
is returned.
T | The type of the trait to get. |
Paradigm | The paradigm to work under. |
|
inline |
Get the trait data from a subjective by its type.
If the trait is missing within the subject, a nullptr
is returned.
TraitType | The type of the trait to get. Must not be a nullptr . |
|
inline |
Get the trait data from the subjective by its type.
Constant version.
If the trait is missing within the subject, a nullptr
is returned.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to get. Must not be a nullptr . |
|
inlineprotected |
Direct access for the internal traits array.
Mutable version.
|
inline |
Direct access for the internal traits array.
Constant version.
|
inline |
Check if there is a detail of a specific class in the subjective.
Templated version.
Supports examining by a base class.
D | The class of the detail to test for. |
bIncludeDisabled | Should disabled details be considered? |
|
inline |
Check if there is a detail of a specific class in the subjective.
Supports examining by a base class.
DetailClass | The class of the detail to test for. |
bIncludeDisabled | Should disabled details be considered? |
|
inline |
Get the current state of a flag for the subjective.
Flag | The flag to get the state of. |
|
inline |
Check if there is a trait of a specific type in the subjective.
Templated version.
|
inline |
Check if the subjective has a certain trait.
|
inline |
Check if the subject is booted.
The subject must be booted (initialized) by the booting mechanics prior to being processed by the ticking mechanics.
|
inline |
Check if the subjective is a client-side one.
|
inlinevirtual |
Check if the subjective class is capable of networking.
This method should be overriden by the interface implementors to explicitly indicate that they have some mandatory properties for the functionality.
Reimplemented in ISolidSubjective, ASubjectiveActor, and USubjectiveActorComponent.
|
inline |
Check if the subjective is registered within the machine.
|
inline |
Check if the subjective is a server-side one.
|
inlinestatic |
|
inlineprotected |
Set the subjective as booted.
|
inline |
Check if the subjective matches a supplied detailmark as a filter.
Check if the subjective matches a supplied filter.
|
inline |
Check if the subjective matches a supplied traitmark as a filter.
|
inlinevirtual |
Called when the subject handle is despawned.
This method should basically self-destruct the subjective or finalize it somehow.
This method should never fail or raise any assertions.
If the self-destruction is not possible or not available for the subjective class, just silently exit the routine.
By default the top-level implementation of the method calls the respective blueprint event and exits silently.
Reimplemented in ASubjectiveActor, USubjectiveActorComponent, and USubjectiveUserWidget.
|
inlineprotectedvirtual |
Obtain a networking subject identifier from the server.
Should be implemented via a client RPC.
Reimplemented in ASubjectiveActor, and USubjectiveActorComponent.
Get a copy of an obtained trait from the subjective.
Statically typed paradigm version.
If the trait is not currently within the subjective, 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. |
Get a copy of an obtained trait from the subjective.
Statically typed version.
If the trait is not currently within the subjective, it gets created anew and the default value gets copied to the receiver.
T | The type of the trait to obtain. |
Paradigm | The paradigm to work under. |
|
inline |
Obtain a trait from the subjective.
Templated version.
If the trait is not currently within the subjective, 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 subjective.
Statically typed pointer version.
If the trait is not currently within the subjective, 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 pointer to the buffer to receive the trait. |
[in] | bTraitDataInitialized | Is the OutTrait actually initialized? |
|
inline |
Obtain a trait from the subjective by its type.
Dynamically typed outputting version.
If the trait is missing within the subject, the output data is unchanged and EApparatusStatus::Missing is returned.
Paradigm | The paradigm to work under. |
[in] | TraitType | The type of the trait to obtain. |
[out] | OutTraitData | The trait data receiver. |
[in] | bTraitDataInitialized | Is the OutTraitData buffer actually initialized? |
|
protected |
Receive a trait on the server or the client.
The standard implementation for the RPC.
|
protected |
Validate receiving a trait on the server or the client.
The standard implementation for the RPC validation.
|
inline |
Send an extra trait to a remote peer.
Statically typed version.
On a client the trait can only be send from a current connection's owned actor, i.e. a pawn or a player controller.
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 reliable channel be used for the transaction. |
|
inline |
Send an extra trait to a remote peer.
Statically typed default paradigm version.
On a client the trait can only be send from a current connection's owned actor, i.e. a pawn or a player controller.
T | The type of the trait to push. |
Paradigm | The paradigm to work under. |
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 reliable channel be used for the transaction. |
|
inline |
Send an extra trait to a remote peer.
Statically typed version.
On a client the trait can only be send from a current connection's owned actor, i.e. a pawn or a player controller.
Paradigm | The paradigm to work under. |
T | The type of the trait to push. |
Trait | The trait to push. |
bSetForLocal | Should the trait be also set for the local version of the 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 reliable channel be used for the transaction. |
bSetForLocal
argument is deprecated now. Set it explicitly and use the version of the method without the argument, please.
|
inline |
Send an extra trait to a remote peer.
Statically typed version.
On a client the trait can only be send from a current connection's owned actor, i.e. a pawn or a player controller.
Paradigm | The paradigm to work under. |
T | The type of the trait to push. |
Trait | 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 reliable channel be used for the transaction. |
|
inline |
Send an existing trait to a remote peer.
Dynamically typed immutable version.
On a client the trait can only be sent from a current connection's owned actor, i.e. a pawn or a player controller.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to send. Must not be a nullptr . |
PeerRole | The explicit 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 reliable channel be used for the transaction. |
|
inline |
Send an additional trait to a remote peer.
Dynamically typed version.
On a client the trait can only be sent from a current connection's owned actor, i.e. a pawn or a player controller.
Executes in a safe polite paradigm.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to send. Must not be a nullptr . |
TraitData | The data of the trait to send. Must not be a nullptr . |
bSetForLocal | Should the trait be also set for the local version of the 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 reliable channel be used for the transaction. |
bSetForLocal
argument is deprecated now. Set it explicitly and use the version of the method without the argument, please.
|
inline |
Send an additional trait to a remote peer.
Dynamically typed version.
On a client the trait can only be sent from a current connection's owned actor, i.e. a pawn or a player controller.
Executes in a safe polite paradigm.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to send. Must not be a nullptr . |
TraitData | The data of the trait to send. Must not be a nullptr . |
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 reliable channel be used for the transaction. |
void ISubjective::ReceiveHandleDespawned | ( | ) |
Called when the subject handle is despawned.
This method should basically self-destruct the subjective or finalize it somehow.
|
inline |
Remove all of the traits from the subjective.
Paradigm | The paradigm to work under. |
|
inline |
Remove a trait from the subjective.
Statically typed paradigm version.
If there is no such trait in the subjective, 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 subjective.
Statically typed version.
If there is no such trait in the subjective, nothing is performed and EApparatusStatus::Noop is returned.
T | The type of the trait to remove. |
Paradigm | The paradigm to work under. |
|
inline |
Remove a trait from the subjective.
Dynamically typed version.
If there is no such trait in the subjective, nothing is performed and EApparatusStatus::Noop is returned.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to remove. May be a nullptr and EApparatusStatus::Noop will be returned in that case. |
|
protected |
Request a unique network identifier for the subject of the subjective.
The standard implementation for the RPC.
|
inline |
Set the server-side connection to a client from which it is allowed to push traits to this subjective.
Paradigm | The paradigm to work under. |
[in] | Connection | The connection permit to set to. |
|
inline |
Set a flag for the subjective.
Paradigm | The paradigm to work under. |
Flag | The flag to set. Must not be a system-level one. |
bState | The state of the flag to set. |
|
inline |
Set the current flagmark for the subjective.
Paradigm | The paradigm to work under. |
InFlagmark | The flagmark to set to. Must not contain any system-level flags. |
|
inline |
Set the current flagmark for the subjective in a masked fashion.
Paradigm | The paradigm to work under. |
InFlagmark | The flagmark to set to. Must not contain any system-level flags. |
InMask | The mask to apply while setting. |
|
inline |
Set the mechanism of the subjective.
For the actor-based subjectives the new mechanism must reside within the same world.
This procedure will essentially move the traits and the details to the new mechanism's own iterables.
Paradigm | The safety paradigm to use. |
Mechanism | The mechanism to set to. Must not be a nullptr . |
|
inline |
Set a trait of the subjective.
Statically typed version.
If the trait is not currently within the subjective, 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 subjective by its type.
Dynamically typed version.
If the trait is not currently within the subjective, it gets created anew and set accordingly
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to add. |
TraitData | The trait data to initialize with. May not be a nullptr , if the TraitType is not a nullptr . |
|
inline |
|
inline |
Set the server-side list of traits allowed to be received from clients.
Can only be set for a server-side subjective version.
Paradigm | The paradigm to work under. |
InTraitmarkPermit | The new traitmark to be used as a whitelist. |
|
inlineprotectedvirtual |
Check if the entity be replicated.
Should be overriden in the descendants to explicitly state the the network functionality is needed on the subjective.
Reimplemented in ASubjectiveActor, and USubjectiveActorComponent.
|
inlineprotected |
Change the current slot of the subjective, while preserving the belt.
This is a simple internal fields setter with minimal logic.
InSlotIndex | The slot index to set. |
|
inlineprotected |
Reset the belt slot.
|
inlineprotected |
Set or reset the current belt slot of the subjective.
This is a simple internal fields setter with a minimal logic. You may use this method to reset the slot.
InBelt | The belt to set. May be a nullptr in order to reset the slot. |
InSlotIndex | The slot index to set. May be a InvalidSlotIndex if the first argument is nullptr . |
|
inline |
Toggle a flag for the subjective.
The | paradigm to work under. |
Flag | The flag to toggle. Must not be a system-level one. |
TOutcome< Paradigm > ISubjective::Unregister | ( | ) |
Unregister the subjective from its mechanism in a manual fashion.
If the subjective is already registered, nothing is performed.
Paradigm | The paradigm to work under. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
A reference to a current subjective's belt (if any).
If is equal to nullptr
, the subjective is not a part of any belt.
|
protected |
Was the subjective already unregistered via the normal DoUnregister() means.
|
protected |
The subject handle which points to a global subjects registry.
|
staticconstexpr |
Invalid belt slot index.
|
protected |
The index of the belt slot, this subject currently resides in.
|
mutableprotected |
|
mutableprotected |