Apparatus Version 1.8
ECS data-oriented workflow for Unreal Engine.
Public Member Functions | Protected Member Functions | Friends | 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

 USubjectiveUserWidget (const FObjectInitializer &ObjectInitializer)
 
const TArray< FTraitRecord > & GetTraitRecordsRef () const override
 Direct access for the internal traits array. More...
 
const TArray< UDetail * > & GetDetailsRef () const override
 Direct access for the internal details array. More...
 
class UBeltGetPreferredBelt () const override
 Get the preferred belt of the subjective (if any). More...
 
void HandleDespawned () override
 Called when the subject handle is despawned. More...
 
- Public Member Functions inherited from ISubjective
UMechanismGetMechanism () const
 Get the mechanism this subjective is currently part of (if registered). 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...
 
bool HasTrait (UScriptStruct *const TraitType) const
 Check if the subjective has a certain trait. More...
 
template<typename T >
bool 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 >
EApparatusStatus 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 >
EApparatusStatus GetTrait (T &OutTrait, const bool bTraitDataInitialized=true) const
 Get a trait from a subjective by its type. More...
 
template<typename T >
GetTrait () const
 Get a copy of a trait 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 >
EApparatusStatus ObtainTrait (T &OutTrait, const bool bTraitDataInitialized=true)
 Obtain a trait from a subjective. More...
 
template<typename T >
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 >
EApparatusStatus RemoveTrait ()
 Remove a trait from the subjective. More...
 
void GetDetails (const bool bIncludeDisabled, TArray< UDetail * > &OutDetails) const
 Get 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
 Find a detail by its class. More...
 
template<class D >
D * FindDetail (const bool bIncludeDisabled=false) const
 Find a detail by its class. More...
 
UDetailGetDetail (TSubclassOf< UDetail > DetailClass, const bool bIncludeDisabled=false) const
 Get a detail by its class. More...
 
template<class D >
D * GetDetail (const bool bIncludeDisabled=false) const
 Get a detail by its class. More...
 
void FindDetails (TSubclassOf< UDetail > DetailClass, TArray< UDetail * > &OutDetails, const bool bIncludeDisabled=false) const
 Find the details by their class. More...
 
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 T >
bool 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 >
D * 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 >
D * 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 >
EApparatusStatus DisableDetail (const bool bDisableMultiple=false)
 Disable detail(s) by class. 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...
 
virtual uint32 CalcHash () const
 Calculate the hash of the subjective. More...
 
void ReceiveHandleDespawned ()
 Called when the subject handle is despawned. More...
 
virtual class AActor * GetActor () const
 Get an actor corresponding to the subjective (if any). More...
 

Protected Member Functions

virtual void NativeConstruct () override
 
virtual void NativeDestruct () override
 
TArray< FTraitRecord > & GetTraitRecordsRef () override
 Direct access for the internal traits array. More...
 
TArray< UDetail * > & GetDetailsRef () override
 Direct access for the internal details array. More...
 
- Protected Member Functions inherited from ISubjective
void MarkBooted ()
 Set the subjective as booted. More...
 
void TakeBeltSlot (UBelt *const InBelt, const int32 InSlotIndex=FBeltSlot::InvalidIndex)
 Set or reset the current belt slot of the subjective. 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...
 
struct FBeltSlotGetSlotPtr ()
 Get the current belt slot of the subjective (if any). More...
 
void DoRegister ()
 
void DoUnregister ()
 

Friends

class FSubjectDetails
 

Additional Inherited Members

- Public Types inherited from ISubjective
enum  { InvalidSlotIndex = FBeltSlot::InvalidIndex }
 
- Protected Attributes inherited from ISubjective
TWeakObjectPtr< UBeltBelt = nullptr
 A weak reference to a current subjective's belt (if any). More...
 
int32 SlotIndex = FBeltSlot::InvalidIndex
 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...
 

Detailed Description

A UI widget subject functionality.

Constructor & Destructor Documentation

◆ USubjectiveUserWidget()

USubjectiveUserWidget::USubjectiveUserWidget ( const FObjectInitializer &  ObjectInitializer)

Member Function Documentation

◆ GetDetailsRef() [1/2]

const TArray<UDetail*>& USubjectiveUserWidget::GetDetailsRef ( ) const
inlineoverridevirtual

Direct access for the internal details array.

Constant version.

Reimplemented from ISubjective.

◆ GetDetailsRef() [2/2]

TArray<UDetail*>& USubjectiveUserWidget::GetDetailsRef ( )
inlineoverrideprotectedvirtual

Direct access for the internal details array.

Reimplemented from ISubjective.

◆ GetPreferredBelt()

class UBelt* USubjectiveUserWidget::GetPreferredBelt ( ) const
inlineoverridevirtual

Get the preferred belt of the subjective (if any).

Reimplemented from ISubjective.

◆ GetTraitRecordsRef() [1/2]

const TArray<FTraitRecord>& USubjectiveUserWidget::GetTraitRecordsRef ( ) const
inlineoverridevirtual

Direct access for the internal traits array.

Constant version.

Reimplemented from ISubjective.

◆ GetTraitRecordsRef() [2/2]

TArray<FTraitRecord>& USubjectiveUserWidget::GetTraitRecordsRef ( )
inlineoverrideprotectedvirtual

Direct access for the internal traits array.

Reimplemented from ISubjective.

◆ HandleDespawned()

void USubjectiveUserWidget::HandleDespawned ( )
inlineoverridevirtual

Called when the subject handle is despawned.

Reimplemented from ISubjective.

◆ NativeConstruct()

virtual void USubjectiveUserWidget::NativeConstruct ( )
overrideprotectedvirtual

◆ NativeDestruct()

virtual void USubjectiveUserWidget::NativeDestruct ( )
overrideprotectedvirtual

Friends And Related Function Documentation

◆ FSubjectDetails

friend class FSubjectDetails
friend

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