Apparatus Version 1.23
ECS data-oriented workflow for Unreal Engine.
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
USubjectiveActorComponent Class Reference

An actor component which is a subject containing the details. More...

#include <SubjectiveActorComponent.h>

Inheritance diagram for USubjectiveActorComponent:
Inheritance graph
[legend]
Collaboration diagram for USubjectiveActorComponent:
Collaboration graph
[legend]

Public Member Functions

 USubjectiveActorComponent ()
 
AActor * GetActor () const override
 Get an actor corresponding to the subjective (if any).
 
void NotifyHandleDespawned () override
 Called when the subject handle is despawned.
 
- Public Member Functions inherited from ISubjective
AMechanismGetMechanism () 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 FFingerprintGetFingerprint () 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.
 
UBeltGetPreferredBelt () const
 Get the preferred belt of the subjective (if any).
 
const struct FBeltSlotGetSlot () 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).
 
EFlagmark GetFlagmark () const
 Get the current flagmark of the subjective.
 
template<EParadigm Paradigm = EParadigm::Default>
TOutcome< Paradigm, EFlagmarkSetFlagmark (const EFlagmark InFlagmark)
 Set the current flagmark for the subjective.
 
template<EParadigm Paradigm = EParadigm::Default>
TOutcome< Paradigm, EFlagmarkSetFlagmarkMasked (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, boolSetFlag (const EFlagmarkBit Flag, const bool bState=true)
 Set a flag for the subjective.
 
template<EParadigm Paradigm = EParadigm::Default>
TOutcome< Paradigm, boolToggleFlag (const EFlagmarkBit Flag)
 Toggle a flag for the subjective.
 
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, TGetTrait () 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, TGetTrait () 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, TObtainTrait ()
 Get a copy of an obtained trait from the subjective.
 
template<typename T , EParadigm Paradigm = EParadigm::Default, TTraitTypeSecurity< T > = true>
TOutcome< Paradigm, TObtainTrait ()
 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.
 
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.
 
UDetailFindDetail (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.
 
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 FTraitmarkGetTraitmarkPermit () const
 Get the server-side list of traits allowed to be received from clients.
 
const FTraitmarkGetTraitmarkPass () 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.
 

Protected Member Functions

bool IsNetworkCapable () const override
 Check if the subjective class is capable of networking.
 
FStandardSubjectivePropertyBlockDoGetStandardPropertyBlock () override
 
FStandardSubjectivePropertyBlockDoGetStandardPropertyBlock () const override
 
FStandardSubjectiveNetworkPropertyBlockDoGetStandardNetworkPropertyBlock () override
 
FStandardSubjectiveNetworkPropertyBlockDoGetStandardNetworkPropertyBlock () const override
 
void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const
 
bool ShouldBeReplicated () const override
 Check if the entity be replicated.
 
void ClientReceiveNetworkId (const uint32 NetworkId)
 
void ClientReceiveNetworkId_Implementation (const uint32 NetworkId)
 
void ServerRequestNetworkId ()
 
void ServerRequestNetworkId_Implementation ()
 
void ServerReceiveTrait (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
void ServerReceiveTrait_Implementation (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
bool ServerReceiveTrait_Validate (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
void ClientReceiveTrait (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
void ClientReceiveTrait_Implementation (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
bool ClientReceiveTrait_Validate (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
void ServerReceiveTraitUnreliable (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
void ServerReceiveTraitUnreliable_Implementation (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
bool ServerReceiveTraitUnreliable_Validate (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
void ClientReceiveTraitUnreliable (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
void ClientReceiveTraitUnreliable_Implementation (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
bool ClientReceiveTraitUnreliable_Validate (UScriptStruct *TraitType, const TArray< uint8 > &TraitData)
 
void AssignNetworkIdOnClient (const uint32 NetworkId) override
 Assign a network identifier on a client.
 
void ObtainNetworkIdFromServer () override
 Obtain a networking subject identifier from the server.
 
void BeginPlay () override
 
void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 
void Serialize (FArchive &Archive) override
 
TPortableOutcome DoPushTrait (const EParadigm Paradigm, UScriptStruct *const TraitType, const EPeerRole PeerRole=EPeerRole::Auto, const bool bReliable=true) const override
 
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) override
 
- Protected Member Functions inherited from ISubjective
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 FStandardSubjectivePropertyBlockDoGetStandardPropertyBlock ()
 
virtual FStandardSubjectivePropertyBlockDoGetStandardPropertyBlock () const
 
FStandardSubjectivePropertyBlockGetStandardPropertyBlock ()
 
const FStandardSubjectivePropertyBlockGetStandardPropertyBlock () const
 
virtual FStandardSubjectiveNetworkPropertyBlockDoGetStandardNetworkPropertyBlock ()
 
virtual FStandardSubjectiveNetworkPropertyBlockDoGetStandardNetworkPropertyBlock () const
 
FStandardSubjectiveNetworkPropertyBlockGetStandardNetworkPropertyBlock ()
 
const FStandardSubjectiveNetworkPropertyBlockGetStandardNetworkPropertyBlock () const
 
const EFlagmarkGetFlagmarkPropRef () const
 Get the internal flagmark property reference.
 
EFlagmarkGetFlagmarkPropRef ()
 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.
 
UBeltGetBelt () const
 Get the active belt of the subjective (if any).
 
FFingerprintGetFingerprintRef ()
 Get the internal fingerprint of the subjective.
 
const FFingerprintGetFingerprintRef () const
 Get the internal fingerprint of the subjective.
 
struct FBeltSlotGetSlotPtr ()
 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.
 

Protected Attributes

FTraitmark TraitmarkPermit
 The traits allowed to be received on the server.
 
uint32 SubjectNetworkId = FSubjectNetworkState::InvalidId
 
- Protected Attributes inherited from ISubjective
UBeltBelt = 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.
 
FStandardSubjectivePropertyBlockStandardPropertyBlockCache = nullptr
 
FStandardSubjectiveNetworkPropertyBlockStandardNetworkPropertyBlockCache = nullptr
 

Additional Inherited Members

- Public Types inherited from ISubjective
typedef int32 SlotIndexType
 The type of the slot index.
 
- Static Public Member Functions inherited from ISubjective
static bool IsValidSubjective (const ISubjective *const InSubjective)
 
- Static Public Attributes inherited from ISubjective
static constexpr SlotIndexType InvalidSlotIndex = -1
 Invalid belt slot index.
 
- Static Protected Member Functions inherited from ISubjective
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.
 

Detailed Description

An actor component which is a subject containing the details.

Constructor & Destructor Documentation

◆ USubjectiveActorComponent()

USubjectiveActorComponent::USubjectiveActorComponent ( )
inline

Member Function Documentation

◆ AssignNetworkIdOnClient()

void USubjectiveActorComponent::AssignNetworkIdOnClient ( const uint32  NetworkId)
inlineoverrideprotectedvirtual

Assign a network identifier on a client.

Should be implemented via a client RPC.

Reimplemented from ISubjective.

◆ BeginPlay()

void USubjectiveActorComponent::BeginPlay ( )
inlineoverrideprotected

◆ ClientReceiveNetworkId()

void USubjectiveActorComponent::ClientReceiveNetworkId ( const uint32  NetworkId)
protected

◆ ClientReceiveNetworkId_Implementation()

void USubjectiveActorComponent::ClientReceiveNetworkId_Implementation ( const uint32  NetworkId)
inlineprotected

◆ ClientReceiveTrait()

void USubjectiveActorComponent::ClientReceiveTrait ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
protected

◆ ClientReceiveTrait_Implementation()

void USubjectiveActorComponent::ClientReceiveTrait_Implementation ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
inlineprotected

◆ ClientReceiveTrait_Validate()

bool USubjectiveActorComponent::ClientReceiveTrait_Validate ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
inlineprotected

◆ ClientReceiveTraitUnreliable()

void USubjectiveActorComponent::ClientReceiveTraitUnreliable ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
protected

◆ ClientReceiveTraitUnreliable_Implementation()

void USubjectiveActorComponent::ClientReceiveTraitUnreliable_Implementation ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
inlineprotected

◆ ClientReceiveTraitUnreliable_Validate()

bool USubjectiveActorComponent::ClientReceiveTraitUnreliable_Validate ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
inlineprotected

◆ DoGetStandardNetworkPropertyBlock() [1/2]

FStandardSubjectiveNetworkPropertyBlock * USubjectiveActorComponent::DoGetStandardNetworkPropertyBlock ( ) const
inlineoverrideprotectedvirtual

Reimplemented from ISubjective.

◆ DoGetStandardNetworkPropertyBlock() [2/2]

FStandardSubjectiveNetworkPropertyBlock * USubjectiveActorComponent::DoGetStandardNetworkPropertyBlock ( )
inlineoverrideprotectedvirtual

Reimplemented from ISubjective.

◆ DoGetStandardPropertyBlock() [1/2]

FStandardSubjectivePropertyBlock * USubjectiveActorComponent::DoGetStandardPropertyBlock ( ) const
inlineoverrideprotectedvirtual

Reimplemented from ISubjective.

◆ DoGetStandardPropertyBlock() [2/2]

FStandardSubjectivePropertyBlock * USubjectiveActorComponent::DoGetStandardPropertyBlock ( )
inlineoverrideprotectedvirtual

Reimplemented from ISubjective.

◆ DoPushTrait() [1/2]

TPortableOutcome USubjectiveActorComponent::DoPushTrait ( const EParadigm  Paradigm,
UScriptStruct *const  TraitType,
const EPeerRole  PeerRole = EPeerRole::Auto,
const bool  bReliable = true 
) const
inlineoverrideprotectedvirtual

Reimplemented from ISubjective.

◆ DoPushTrait() [2/2]

TPortableOutcome USubjectiveActorComponent::DoPushTrait ( const EParadigm  Paradigm,
UScriptStruct *const  TraitType,
const void *const  TraitData,
const bool  bSetForLocal = false,
const EPeerRole  PeerRole = EPeerRole::Auto,
const bool  bReliable = true 
)
inlineoverrideprotectedvirtual

Reimplemented from ISubjective.

◆ EndPlay()

void USubjectiveActorComponent::EndPlay ( const EEndPlayReason::Type  EndPlayReason)
inlineoverrideprotected

◆ GetActor()

AActor * USubjectiveActorComponent::GetActor ( ) const
inlineoverridevirtual

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.

Returns
An actor this subjective belongs to.
nullptr if the subject doesn't belong to any actor.

Reimplemented from ISubjective.

◆ GetLifetimeReplicatedProps()

void USubjectiveActorComponent::GetLifetimeReplicatedProps ( TArray< FLifetimeProperty > &  OutLifetimeProps) const
protected

◆ IsNetworkCapable()

bool USubjectiveActorComponent::IsNetworkCapable ( ) const
inlineoverrideprotectedvirtual

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 from ISubjective.

◆ NotifyHandleDespawned()

void USubjectiveActorComponent::NotifyHandleDespawned ( )
inlineoverridevirtual

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 from ISubjective.

◆ ObtainNetworkIdFromServer()

void USubjectiveActorComponent::ObtainNetworkIdFromServer ( )
inlineoverrideprotectedvirtual

Obtain a networking subject identifier from the server.

Should be implemented via a client RPC.

Reimplemented from ISubjective.

◆ Serialize()

void USubjectiveActorComponent::Serialize ( FArchive &  Archive)
inlineoverrideprotected

◆ ServerReceiveTrait()

void USubjectiveActorComponent::ServerReceiveTrait ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
protected

◆ ServerReceiveTrait_Implementation()

void USubjectiveActorComponent::ServerReceiveTrait_Implementation ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
inlineprotected

◆ ServerReceiveTrait_Validate()

bool USubjectiveActorComponent::ServerReceiveTrait_Validate ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
inlineprotected

◆ ServerReceiveTraitUnreliable()

void USubjectiveActorComponent::ServerReceiveTraitUnreliable ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
protected

◆ ServerReceiveTraitUnreliable_Implementation()

void USubjectiveActorComponent::ServerReceiveTraitUnreliable_Implementation ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
inlineprotected

◆ ServerReceiveTraitUnreliable_Validate()

bool USubjectiveActorComponent::ServerReceiveTraitUnreliable_Validate ( UScriptStruct *  TraitType,
const TArray< uint8 > &  TraitData 
)
inlineprotected

◆ ServerRequestNetworkId()

void USubjectiveActorComponent::ServerRequestNetworkId ( )
protected

◆ ServerRequestNetworkId_Implementation()

void USubjectiveActorComponent::ServerRequestNetworkId_Implementation ( )
inlineprotected

◆ ShouldBeReplicated()

bool USubjectiveActorComponent::ShouldBeReplicated ( ) const
inlineoverrideprotectedvirtual

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 from ISubjective.

Member Data Documentation

◆ SubjectNetworkId

uint32 USubjectiveActorComponent::SubjectNetworkId = FSubjectNetworkState::InvalidId
protected

◆ TraitmarkPermit

FTraitmark USubjectiveActorComponent::TraitmarkPermit
protected

The traits allowed to be received on the server.


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