|
Apparatus
Version 1.3.0
ECS data-driven workflow for Unreal Engine.
|
An interface for all sorts of subjects. More...
#include <Subjective.h>


Public Types | |
| enum | { InvalidSlotIndex = FBeltSlot::InvalidIndex } |
Public Member Functions | |
| const FFingerprint & | GetFingerprint () 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... | |
| void | GetDetails (const bool bIncludeDisabled, TArray< UDetail * > &OutDetails) const |
| Get the details of the subjective. More... | |
| UDetail * | FindDetail (TSubclassOf< UDetail > DetailClass, const bool bIncludeDisabled=false) const |
| Find the detail by a type. More... | |
| void | FindDetails (TSubclassOf< UDetail > DetailClass, TArray< UDetail * > &OutDetails, const bool bIncludeDisabled=false) const |
| Find the details by their type. 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<typename T > | |
| bool | HasDetail (const bool bIncludeDisabled=false) const |
| Check if there is a detail of a specific class in the subjective. 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 *TraitType, void *const TraitData, 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... | |
| 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... | |
| EApparatusStatus | RemoveTrait (UScriptStruct *TraitType) |
| Remove a trait from the subjective. More... | |
| template<typename T > | |
| EApparatusStatus | RemoveTrait () |
| Remove a trait from the subjective. More... | |
| virtual class UBelt * | GetPreferredBelt () const |
| Get the preferred belt of the subjective (if any). More... | |
| class UDetail * | EnableDetail (TSubclassOf< UDetail > DetailClass) |
| Enable a detail of a certain type. More... | |
| class UDetail * | AddDetail (TSubclassOf< UDetail > DetailClass, const bool bReuseDisabled=false) |
| Add a new active detail or reuse an inactive one. More... | |
| EApparatusStatus | DisableDetail (TSubclassOf< UDetail > DetailClass, const bool bDisableMultiple=false) |
| Disable a certain detail(s) by type. More... | |
| const struct FBeltSlot * | GetSlot () 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... | |
| const FSubjectHandle & | GetHandle () const |
| Get the subject handle of this subjective. More... | |
| virtual uint32 | GetHash () const |
| Get the hash of the subjective. More... | |
Protected Member Functions | |
| void | MarkBooted () |
| Set the subjective as booted. More... | |
| void | TakeBeltSlot (class UBelt *InBelt, int32 InSlotIndex) |
| Set the current belt slot of the subjective (if any). More... | |
| UBelt * | GetBelt () const |
| Get the active belt of the subjective (if any). More... | |
| virtual TArray< UDetail * > & | GetDetailsRef () |
| Direct access for the internal details array. More... | |
| virtual const TArray< UDetail * > & | GetDetailsRef () const |
| Direct access for the internal details array. More... | |
| FFingerprint & | GetFingerprintRef () |
| Get the internal fingerprint of the subjective. More... | |
| struct FBeltSlot * | GetSlotPtr () |
| Get the current belt slot of the subjective (if any). More... | |
Protected Attributes | |
| TWeakObjectPtr< UBelt > | Belt = 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... | |
Friends | |
| struct | FFingerprint |
| struct | FBeltSlot |
| struct | FBeltSlotCache |
| class | UDetail |
| class | UBelt |
| class | UMachine |
| class | UApparatusFunctionLibrary |
An interface for all sorts of subjects.
|
inline |
Add a new active detail or reuse an inactive one.
|
inline |
Disable a certain detail(s) by type.
You can't remove details, but only disable them.
Enable a detail of a certain type.
Add it if there is none already, or reuse an inactive one.
|
inline |
Find the detail by a type.
|
inline |
Find the details by their type.
Supports searching by a base type.
|
inlineprotected |
Get the active belt of the subjective (if any).
|
inline |
Get the details of the subjective.
|
inlineprotectedvirtual |
Direct access for the internal details array.
Reimplemented in USubjectiveUserWidget, USubjectiveActorComponent, and ASubjectiveActor.
|
inlineprotectedvirtual |
Direct access for the internal details array.
Constant version.
Reimplemented in USubjectiveUserWidget, USubjectiveActorComponent, and ASubjectiveActor.
|
inline |
Get the active fingerprint of the subjective.
Constant version.
|
inlineprotected |
Get the internal fingerprint of the subjective.
|
inline |
Get the subject handle of this subjective.
|
inline |
Get the subject handle of this subjective.
Constant version.
|
inlinevirtual |
Get the hash of the subjective.
|
inlinevirtual |
Get the preferred belt of the subjective (if any).
Reimplemented in USubjectiveUserWidget, USubjectiveActorComponent, and ASubjectiveActor.
|
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.
|
inline |
Get a trait from a subjective by its type.
Templated version.
| T | The type of the trait to get. |
| OutTrait | The trait receiver. |
| bTraitDataInitialized | Is the OutTrait actually initialized? |
|
inline |
Get a trait from a subjective by its type.
| TraitType | The type of the trait to get. |
| TraitData | The trait data receiver. |
| bTraitDataInitialized | Is the TraitData buffer actually initialized? |
|
inline |
Check if there is a detail of a specific class in the subjective.
Templated version.
Supports examining by a base type.
|
inline |
Check if there is a detail of a specific class in the subjective.
Supports examining by a base type.
|
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 registered within the machine.
|
inlineprotected |
Set the subjective as booted.
|
inline |
Check if the subjective matches a supplied detailmark as a filter.
|
inline |
Check if the subjective matches a supplied filter.
|
inline |
Check if the subjective matches a supplied traitmark as a filter.
|
inline |
Obtain a trait from a 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.
| T | The type of the trait to obtain. |
| OutTrait | The trait receiver. |
| bTraitDataInitialized | Is the OutTrait actually initialized? |
|
inline |
Obtain a trait from a subjective by its type.
If the trait is not currently within the subjective, it gets created anewand the default value gets copied to the receiver.
| TraitType | The type of the trait to obtain. |
| OutTraitData | The trait data receiver. |
| bTraitDataInitialized | Is the TraitData buffer actually initialized? |
|
inline |
Remove a trait from the subjective.
Templated 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. |
|
inline |
Remove a trait from the subjective.
If there is no such trait in the subjective, nothing is performed and EApparatusStatus::Noop is returned.
| TraitType | The type of the trait to remove. |
|
inline |
Set a trait of the subjective.
Templated version.
If the trait is not currently within the subjective, it gets created anew and set accordingly.
| T | A type of the trait to add. |
| Trait | A trait to initialize with. |
|
inline |
Set a trait of the subjective by its type.
If the trait is not currently within the subjective, it gets created anew and set accordingly
| TraitType | The type of the trait to add. |
| TraitData | The trait data to initialize with. |
|
inlineprotected |
Set the current belt slot of the subjective (if any).
| InBelt | The belt must be stored in a GC-managed UPROPERTY. |
| InSlotIndex | The slot must be referenced and stored by its index in a SlotIndex field. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
A weak reference to a current subjective's belt (if any).
|
protected |
The subject handle which points to a global subjects registry.
|
protected |
The index of the belt slot, this subject currently resides in.