Apparatus Version 1.21
ECS data-oriented workflow for Unreal Engine.
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
USubjectiveUserWidget Class Reference

A UI widget subject functionality. More...

#include <SubjectiveUserWidget.h>

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

Public Member Functions

FStandardSubjectivePropertyBlockDoGetStandardPropertyBlock () override
 
FStandardSubjectivePropertyBlockDoGetStandardPropertyBlock () const override
 
 USubjectiveUserWidget (const FObjectInitializer &ObjectInitializer)
 
- Public Member Functions inherited from ISubjective
AMechanismGetMechanism () const
 Get the mechanism this subjective is currently part of (if registered). More...
 
const TArray< FTraitRecord > & GetTraitRecordsRef () const
 Direct access for the internal traits array. More...
 
virtual const TArray< UDetail * > & GetDetailsRef () const
 Direct access for the internal details array. More...
 
const FFingerprintGetFingerprint () const
 Get the active fingerprint of the subjective. More...
 
bool Matches (const FFilter &InFilter) const
 Check if the subjective matches a supplied filter. More...
 
bool Matches (const FTraitmark &InTraitmark) const
 Check if the subjective matches a supplied traitmark as a filter. More...
 
bool Matches (const FDetailmark &InDetailmark) const
 Check if the subjective matches a supplied detailmark as a filter. More...
 
UBeltGetPreferredBelt () const
 Get the preferred belt of the subjective (if any). More...
 
const struct FBeltSlotGetSlot () const
 Get the current belt slot of the subjective (if any). More...
 
bool IsRegistered () const
 Check if the subjective is registered within the machine. More...
 
int32 GetSlotIndex () const
 Get the current slot index of the subjective. More...
 
bool IsBooted () const
 Check if the subject is booted. More...
 
FSubjectHandle GetHandle ()
 Get the subject handle of this subjective. More...
 
FConstSubjectHandle GetHandle () const
 Get the subject handle of this subjective. More...
 
EApparatusStatus Unregister ()
 Unregister the subjective from its mechanism in a manual fashion. More...
 
virtual uint32 CalcHash () const
 Calculate the hash of the subjective. More...
 
void ReceiveHandleDespawned ()
 Called when the subject handle is despawned. More...
 
virtual AActor * GetActor () const
 Get an actor corresponding to the subjective (if any). More...
 
EFlagmark GetFlagmark () const
 Get the current flagmark of the subjective. More...
 
EApparatusStatus SetFlagmark (const EFlagmark InFlagmark)
 Set the current flagmark for the subjective. More...
 
bool HasFlag (const EFlagmarkBit Flag) const
 Get the current state of a flag for the subjective. More...
 
EApparatusStatus SetFlag (const EFlagmarkBit Flag, const bool bState=true)
 Set a flag for the subjective. More...
 
void ToggleFlag (const EFlagmarkBit Flag)
 Toggle a flag for the subjective. More...
 
bool HasTrait (UScriptStruct *const TraitType) const
 Check if the subjective has a certain trait. More...
 
template<typename T >
std::enable_if< IsTraitType< T >(), bool >::type HasTrait () const
 Check if there is a trait of a specific type in the subjective. More...
 
EApparatusStatus SetTrait (UScriptStruct *TraitType, const void *const TraitData)
 Set a trait of the subjective by its type. More...
 
template<typename T >
std::enable_if< IsTraitType< T >(), EApparatusStatus >::type SetTrait (const T &Trait)
 Set a trait of the subjective. More...
 
EApparatusStatus GetTrait (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait from a subjective 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 subjective by its type. More...
 
template<typename T >
std::enable_if< IsTraitType< T >(), T >::type GetTrait () const
 Get a copy of a trait from a subjective by its type. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
const void * GetTraitPtr (UScriptStruct *const TraitType) const
 Get the trait data from a subjective by its type. More...
 
template<EParadigm Paradigm = EParadigm::Safe>
void * GetTraitPtr (UScriptStruct *const TraitType)
 Get the trait data from a subjective by its type. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if< IsTraitType< T >()&&(Paradigm<=EParadigm::Unsafe), constT * >::type GetTraitPtr ()
 Get the trait data from a subjective by its type. More...
 
template<typename T , EParadigm Paradigm = EParadigm::Safe>
std::enable_if< IsTraitType< T >()&&(Paradigm<=EParadigm::Unsafe), T * >::type GetTraitPtr ()
 Get the trait data from a subjective by its type. More...
 
EApparatusStatus ObtainTrait (UScriptStruct *TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true)
 Obtain a trait from a subjective by its type. More...
 
template<typename T >
std::enable_if< IsTraitType< T >(), EApparatusStatus >::type ObtainTrait (T &OutTrait, const bool bTraitDataInitialized=true)
 Obtain a trait from a subjective. More...
 
template<typename T >
std::enable_if< IsTraitType< T >(), T >::type ObtainTrait ()
 Get a copy of an obtained trait from a subjective. More...
 
EApparatusStatus RemoveTrait (UScriptStruct *const TraitType)
 Remove a trait from the subjective. More...
 
template<typename T >
std::enable_if< IsTraitType< T >(), EApparatusStatus >::type RemoveTrait ()
 Remove a trait from the subjective. More...
 
void GetDetails (const bool bIncludeDisabled, TArray< UDetail * > &OutDetails) const
 Get all of the details of the subjective. More...
 
void GetDetails (TArray< UDetail * > &OutDetails) const
 Get all the enabled details of the subjective. More...
 
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
 
UDetailGetDetail (TSubclassOf< UDetail > DetailClass, const bool bIncludeDisabled=false) const
 Get a detail by its class. More...
 
template<class D >
std::enable_if< IsDetailClass< D >(), D * >::type GetDetail (const bool bIncludeDisabled=false) const
 Get a detail by its class. More...
 
void GetDetails (TSubclassOf< UDetail > DetailClass, TArray< UDetail * > &OutDetails, const bool bIncludeDisabled=false) const
 Get all of the details of a certain class. More...
 
template<class D >
std::enable_if< IsDetailClass< D >(), void >::type GetDetails (TArray< D * > &OutDetails, const bool bIncludeDisabled=false) const
 Get details of a certain class. More...
 
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. More...
 
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. More...
 
UDetailEnableDetail (const TSubclassOf< UDetail > DetailClass)
 Enable a detail of a certain type. More...
 
template<class D >
std::enable_if< IsDetailClass< D >(), D * >::type EnableDetail ()
 Enable a detail of a certain type. More...
 
UDetailAddDetail (const TSubclassOf< UDetail > DetailClass, const bool bReuseDisabled=false)
 Add a new active detail or reuse an inactive one. More...
 
template<class D >
std::enable_if< IsDetailClass< D >(), D * >::type AddDetail (const bool bReuseDisabled=false)
 Add a new active detail or reuse an inactive one. More...
 
EApparatusStatus DisableDetail (const TSubclassOf< UDetail > DetailClass, const bool bDisableMultiple=false)
 Disable detail(s) by class. More...
 
template<class D >
std::enable_if< IsDetailClass< D >(), EApparatusStatus >::type DisableDetail (const bool bDisableMultiple=false)
 Disable detail(s) by class. More...
 
virtual bool IsNetworkCapable () const
 Check if the subjective class is capable of networking. More...
 
uint32 GetNetworkId () const
 Get the unique cross-peer network identifier of the subjective (if any). More...
 
bool IsServerSide () const
 Check if the subjective is a server-side one. More...
 
bool IsClientSide () const
 Check if the subjective is a client-side one. More...
 
const FTraitmarkGetTraitmarkPass () const
 Get the server-side list of traits allowed to be received from clients. More...
 
EApparatusStatus SetTraitmarkPass (const FTraitmark &InTraitmarkPass)
 Set the server-side list of traits allowed to be received from clients. More...
 
void PushTrait (UScriptStruct *const TraitType)
 Send an existing trait to a remote peer. More...
 
virtual void PushTrait (UScriptStruct *const TraitType, const void *const TraitData, const bool bSetForLocal=false)
 Send an additional trait to a remote peer. More...
 

Public Attributes

TArray< FTraitRecord > Traits
 The list of traits. More...
 
TArray< UDetail * > Details
 The list of details. More...
 
UBeltPreferredBelt = nullptr
 An optional preferred belt for the subject to be placed in. More...
 
int32 Flagmark = FM_None
 The flagmark of the subjective. More...
 

Protected Member Functions

virtual void NativeConstruct () override
 
virtual void NativeDestruct () override
 
void Serialize (FArchive &Archive) override
 
void HandleDespawned () override
 Called when the subject handle is despawned. More...
 
- Protected Member Functions inherited from ISubjective
bool MarkBooted ()
 Set the subjective as booted. More...
 
void TakeBeltSlot (UBelt *const InBelt, const int32 InSlotIndex)
 Set or reset the current belt slot of the subjective. More...
 
FStandardSubjectivePropertyBlockGetStandardPropertyBlock ()
 
const FStandardSubjectivePropertyBlockGetStandardPropertyBlock () const
 
virtual FStandardSubjectiveNetworkPropertyBlockDoGetStandardNetworkPropertyBlock ()
 
virtual FStandardSubjectiveNetworkPropertyBlockDoGetStandardNetworkPropertyBlock () const
 
FStandardSubjectiveNetworkPropertyBlockGetStandardNetworkPropertyBlock ()
 
const FStandardSubjectiveNetworkPropertyBlockGetStandardNetworkPropertyBlock () const
 
const int32 & GetFlagmarkPropRef () const
 Get the internal flagmark property reference. More...
 
int32 & GetFlagmarkPropRef ()
 Get the internal flagmark property reference. More...
 
TArray< FTraitRecord > & GetTraitRecordsRef ()
 Direct access for the internal traits array. More...
 
TArray< UDetail * > & GetDetailsRef ()
 Direct access for the internal details array. More...
 
void TakeBeltSlot (std::nullptr_t)
 Reset the belt slot. More...
 
void ClientReceiveNetworkId_Implementation (const uint32 NetworkId)
 Assign a unique network identifier to the subject of the subjective. More...
 
void ServerRequestNetworkId_Implementation ()
 Request a unique network identifier for the subject of the subjective. More...
 
void ReceiveTrait_Implementation (UScriptStruct *const TraitType, const TArray< uint8 > &TraitData)
 Receive a trait on the server or the client. More...
 
virtual void AssignNetworkIdOnClient (const uint32 NetworkId)
 Assign a network identifier on a client. More...
 
virtual void ObtainNetworkIdFromServer ()
 Obtain a networking subject identifier from the server. More...
 
void TakeBeltSlot (const int32 InSlotIndex)
 Change the current slot of the subjective, while preserving the belt. More...
 
UBeltGetBelt () const
 Get the active belt of the subjective (if any). More...
 
FFingerprintGetFingerprintRef ()
 Get the internal fingerprint of the subjective. More...
 
const FFingerprintGetFingerprintRef () const
 Get the internal fingerprint of the subjective. More...
 
struct FBeltSlotGetSlotPtr ()
 Get the current belt slot of the subjective (if any). More...
 
void DoRegister ()
 Perform an actual registration of the subjective. More...
 
EApparatusStatus DoUnregister ()
 Perform an actual de-registration procedure on the subjective. More...
 
void DoStartSerialization (FArchive &Archive)
 Begin the serialization routine. More...
 
void DoFinishSerialization (FArchive &Archive)
 End the serialization routine. More...
 
virtual bool ShouldBeReplicated () const
 Check if the entity be replicated. More...
 
template<class S >
void DoPushTrait (S *const Subjective, UScriptStruct *const TraitType, const void *const TraitData, const bool bSetForLocal, void(S::*ServerReceiveTraitRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData), void(S::*ClientReceiveTraitRPC)(UScriptStruct *TraitType, const TArray< uint8 > &TraitData))
 Push a trait to the remote version of the subject. More...
 

Additional Inherited Members

- Public Types inherited from ISubjective
enum  { InvalidSlotIndex = -1 }
 
- Static Public Member Functions inherited from ISubjective
static bool IsValidSubjective (const ISubjective *const InSubjective)
 
- Protected Attributes inherited from ISubjective
UBeltBelt = nullptr
 A reference to a current subjective's belt (if any). More...
 
int32 SlotIndex = InvalidSlotIndex
 The index of the belt slot, this subject currently resides in. More...
 
FSubjectHandle Handle
 The subject handle which points to a global subjects registry. More...
 
bool bUnregistered = false
 Was the subjective already unregistered via the normal DoUnregister() means. More...
 
FStandardSubjectivePropertyBlockStandardPropertyBlockCache = nullptr
 
FStandardSubjectiveNetworkPropertyBlockStandardNetworkPropertyBlockCache = nullptr
 

Detailed Description

A UI widget subject functionality.

Constructor & Destructor Documentation

◆ USubjectiveUserWidget()

USubjectiveUserWidget::USubjectiveUserWidget ( const FObjectInitializer &  ObjectInitializer)

Member Function Documentation

◆ DoGetStandardPropertyBlock() [1/2]

FStandardSubjectivePropertyBlock * USubjectiveUserWidget::DoGetStandardPropertyBlock ( ) const
inlineoverridevirtual

Reimplemented from ISubjective.

◆ DoGetStandardPropertyBlock() [2/2]

FStandardSubjectivePropertyBlock * USubjectiveUserWidget::DoGetStandardPropertyBlock ( )
inlineoverridevirtual

Reimplemented from ISubjective.

◆ HandleDespawned()

void USubjectiveUserWidget::HandleDespawned ( )
inlineoverrideprotectedvirtual

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.

◆ NativeConstruct()

virtual void USubjectiveUserWidget::NativeConstruct ( )
overrideprotectedvirtual

◆ NativeDestruct()

virtual void USubjectiveUserWidget::NativeDestruct ( )
overrideprotectedvirtual

◆ Serialize()

void USubjectiveUserWidget::Serialize ( FArchive &  Archive)
inlineoverrideprotected

Member Data Documentation

◆ Details

TArray<UDetail*> USubjectiveUserWidget::Details

The list of details.

◆ Flagmark

int32 USubjectiveUserWidget::Flagmark = FM_None

The flagmark of the subjective.

◆ PreferredBelt

UBelt* USubjectiveUserWidget::PreferredBelt = nullptr

An optional preferred belt for the subject to be placed in.

◆ Traits

TArray<FTraitRecord> USubjectiveUserWidget::Traits

The list of traits.


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