Apparatus Version 1.8
ECS data-oriented workflow for Unreal Engine.
Classes | Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
FConstSubjectHandle Struct Reference

The handle for the immutable subject. More...

#include <ConstSubjectHandle.h>

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

Public Types

enum  { IsSolid = 1 }
 
typedef const ISubjective SubjectiveType
 The compatible type of the subjective used. More...
 
- Public Types inherited from FSubjectHandleBase
enum  { InvalidId = FSubjectInfo::InvalidId , InvalidGeneration = FSubjectInfo::InvalidGeneration }
 

Public Member Functions

SubjectiveTypeGetSubjective () const
 Get a subjective this handle is associated with (if any). More...
 
const void * GetTraitPtr (UScriptStruct *const TraitType) const
 Get a pointer to a read-only trait from a subject by its type. More...
 
template<typename T >
const T * GetTraitPtr () const
 Get a pointer to a read-only trait from a subject by its type. More...
 
template<typename T >
const T & GetTraitRef () const
 Get a read-only trait reference from a subject by its type. More...
 
 operator FSubjectHandle () const
 Explicit conversion to a mutable version. More...
 
 FConstSubjectHandle ()
 Construct a new invalid subject handle. More...
 
 FConstSubjectHandle (const FConstSubjectHandle &InHandle)
 Copy-construct a new subject handle. More...
 
 FConstSubjectHandle (const FSolidSubjectHandle &InHandle)
 Copy-construct a new const subject handle from a uniform version. More...
 
 FConstSubjectHandle (const FSubjectHandle &InHandle)
 Copy-construct a new constant subject handle from a mutable version. More...
 
 FConstSubjectHandle (const FSubjectHandleBase &InHandle)
 Copy-construct a new constant subject handle from a base version. More...
 
- Public Member Functions inherited from FSubjectHandleBase
 FSubjectHandleBase ()
 Construct a new invalid base subject handle. More...
 
UMechanismGetMechanism () const
 Get the mechanism of the subject handle. More...
 
void ResetHandle ()
 Clear the subject handle, essentially making it invalid. More...
 
UObject * GetSubjectiveObject () const
 Get a subjective object this handle is associated with (if any). More...
 
FSubjectHandleBaseoperator= (TYPE_OF_NULLPTR)
 Clear the subject handle, essentially making it invalid. More...
 
uint32 CalcHash () const
 Calculate the hash-sum value for the handle. More...
 
const FFingerprintGetFingerprint () const
 Get the fingerprint of the subject. More...
 
bool Matches (const FFilter &InFilter) const
 Check if the subject matches a certain filter. More...
 
bool IsValid () const
 Check if the subject handle is valid and is pointing to an existent subject. More...
 
bool operator== (TYPE_OF_NULLPTR) const
 Check if the subject handle is invalid and is pointing to a non-existent subject. More...
 
bool operator!= (TYPE_OF_NULLPTR) const
 Check if the subject handle is valid and is pointing to an existent subject. More...
 
 operator bool () const
 Check if the subject handle is valid and is pointing to an existent subject. More...
 
bool HasTrait (UScriptStruct *const TraitType) const
 Check if the subject has a certain trait. More...
 
template<typename T >
bool HasTrait () const
 Check if the subject has a certain trait. More...
 
bool HasDetail (TSubclassOf< UDetail > DetailClass) const
 Check if the subject has a certain detail. More...
 
template<typename T >
bool HasDetail () const
 Check if the subject has a certain detail. More...
 
bool EqualsRaw (const FSubjectHandleBase &InSubject) const
 Check if two subject handles are equal byte-wise. More...
 
bool operator== (const FSubjectHandleBase &InSubject) const
 Check if the subject handle points to the same subject as the other one. More...
 
bool operator!= (const FSubjectHandleBase &InSubject) const
 Check if the subject handles point to different subjects. More...
 
EApparatusStatus GetTrait (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait from a subject by its type. More...
 
template<typename T >
EApparatusStatus GetTrait (T &OutTrait, const bool bTraitDataInitialized=true) const
 Get a trait from a subject by its type. More...
 
template<typename T >
GetTrait () const
 Get a trait copy from a subject by its type. More...
 
EApparatusStatus CopyTraitsTo (const FSubjectHandle &DestinationSubjectHandle) const
 Copy the traits to some other subject. More...
 

Static Public Attributes

static const FConstSubjectHandle Invalid
 A global constant for an invalid (NULL) subject handle. More...
 

Friends

struct FSubjectInfo
 
struct FSubjectHandleBase
 
struct FSubjectHandle
 
struct FSolidSubjectHandle
 
class UChunk
 
class UMachine
 
class ISubjective
 

Additional Inherited Members

- Protected Member Functions inherited from FSubjectHandleBase
FSubjectInfoFindInfo () const
 Get the valid subject info record (if any). More...
 
FSubjectInfoGetInfo () const
 Get the subject info record associated with it. More...
 
EApparatusStatus MarkBooted () const
 
EApparatusStatus Despawn () const
 Destroy the subject. More...
 
UChunkGetChunk () const
 Get the current chunk of the subject. More...
 
EApparatusStatus SetTrait (UScriptStruct *TraitType, const void *const TraitData) const
 Set a trait of the subject by its type. More...
 
template<typename T >
EApparatusStatus SetTrait (const T &Trait) const
 Set a trait of the subject. More...
 
void * GetTraitPtr (UScriptStruct *const TraitType) const
 Get a pointer to a trait of a certain type. More...
 
template<typename T >
T * GetTraitPtr () const
 Get a pointer to a trait of a certain type. More...
 
template<typename T >
T & GetTraitRef () const
 Get a trait from a subject by its type. More...
 
EApparatusStatus ObtainTrait (UScriptStruct *TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Obtain a trait from a subject by its type. More...
 
template<typename T >
EApparatusStatus ObtainTrait (T &OutTrait, const bool bTraitDataInitialized=true) const
 Obtain a trait from a subject. More...
 
template<typename T >
ObtainTrait () const
 Obtain a trait copy from a subject. More...
 
EApparatusStatus RemoveTrait (UScriptStruct *TraitType) const
 Remove a trait from the subject. More...
 
template<typename T >
EApparatusStatus RemoveTrait () const
 Remove a trait from the subject. More...
 
TScriptInterface< ISubjectiveGetSubjective () const
 Get a subjective this handle is associated with (if any). More...
 
 FSubjectHandleBase (const int32 InId, const int32 InGeneration)
 Construct by explicit id and generation specifications. More...
 
 FSubjectHandleBase (const FSubjectHandleBase &InHandle)
 Copy-construct a new subject handle. More...
 
 FSubjectHandleBase (const FSubjectHandle &InHandle)
 Copy-construct a new subject handle from a mutable subject handle. More...
 
 FSubjectHandleBase (const FSolidSubjectHandle &InHandle)
 Copy-construct a new subject handle from a homogenous subject handle. More...
 
 FSubjectHandleBase (const FConstSubjectHandle &InHandle)
 Copy-construct a new subject handle from an immutable subject handle. More...
 
- Protected Attributes inherited from FSubjectHandleBase
int32 Id = InvalidId
 A unique identifier of the subject within the mechanism. More...
 
int32 Generation = InvalidGeneration
 A unique generation of the subject. More...
 

Detailed Description

The handle for the immutable subject.

This is a user-level handle structure, something like a pointer. The size of this structure is exactly 64-bit and may be passed by value.

Member Typedef Documentation

◆ SubjectiveType

The compatible type of the subjective used.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IsSolid 

Constructor & Destructor Documentation

◆ FConstSubjectHandle() [1/5]

FConstSubjectHandle::FConstSubjectHandle ( )
inline

Construct a new invalid subject handle.

◆ FConstSubjectHandle() [2/5]

FConstSubjectHandle::FConstSubjectHandle ( const FConstSubjectHandle InHandle)
inline

Copy-construct a new subject handle.

◆ FConstSubjectHandle() [3/5]

FConstSubjectHandle::FConstSubjectHandle ( const FSolidSubjectHandle InHandle)
inline

Copy-construct a new const subject handle from a uniform version.

◆ FConstSubjectHandle() [4/5]

FConstSubjectHandle::FConstSubjectHandle ( const FSubjectHandle InHandle)
inline

Copy-construct a new constant subject handle from a mutable version.

◆ FConstSubjectHandle() [5/5]

FConstSubjectHandle::FConstSubjectHandle ( const FSubjectHandleBase InHandle)
inlineexplicit

Copy-construct a new constant subject handle from a base version.

Member Function Documentation

◆ GetSubjective()

SubjectiveType* FConstSubjectHandle::GetSubjective ( ) const
inline

Get a subjective this handle is associated with (if any).

◆ GetTraitPtr() [1/2]

template<typename T >
const T* FConstSubjectHandle::GetTraitPtr ( ) const
inline

Get a pointer to a read-only trait from a subject by its type.

Templated version.

Template Parameters
TThe type of the trait to get.
Returns
A pointer to the read-only trait.

◆ GetTraitPtr() [2/2]

const void* FConstSubjectHandle::GetTraitPtr ( UScriptStruct *const  TraitType) const
inline

Get a pointer to a read-only trait from a subject by its type.

Parameters
TraitTypeThe type of the trait to get.
Returns
A pointer to the read-only trait.

◆ GetTraitRef()

template<typename T >
const T& FConstSubjectHandle::GetTraitRef ( ) const
inline

Get a read-only trait reference from a subject by its type.

Templated version.

Template Parameters
TThe type of the trait to get.
Returns
A reference for the read-only trait.

◆ operator FSubjectHandle()

FConstSubjectHandle::operator FSubjectHandle ( ) const
inlineexplicit

Explicit conversion to a mutable version.

Friends And Related Function Documentation

◆ FSolidSubjectHandle

friend struct FSolidSubjectHandle
friend

◆ FSubjectHandle

friend struct FSubjectHandle
friend

◆ FSubjectHandleBase

friend struct FSubjectHandleBase
friend

◆ FSubjectInfo

friend struct FSubjectInfo
friend

◆ ISubjective

friend class ISubjective
friend

◆ UChunk

friend class UChunk
friend

◆ UMachine

friend class UMachine
friend

Member Data Documentation

◆ Invalid

const FConstSubjectHandle FConstSubjectHandle::Invalid
static

A global constant for an invalid (NULL) subject handle.


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