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

The detail-only fingerprint part. More...

#include <Detailmark.h>

Collaboration diagram for FDetailmark:
Collaboration graph
[legend]

Public Types

enum  { InvalidDetailId = -1 , InlineDetailsCount = 8 }
 
typedef TArray< TSubclassOf< UDetail >, TInlineAllocator< InlineDetailsCount > > DetailsType
 The type for details array. More...
 

Public Member Functions

EBootFilter GetBootState () const
 Get the active boot state. More...
 
EApparatusStatus SetBootState (const EBootFilter InBootState)
 Set the new active boot state. More...
 
EApparatusStatus SetBooted (bool bState=true)
 Set the new active boot state. More...
 
bool IsBooted () const
 Check if the detailmark corresponds to a booted entity. More...
 
const DetailsTypeGetDetails () const
 Get the details of the detailmark. More...
 
 operator TArray< TSubclassOf< UDetail >> () const
 Convert to an array of detail classes. More...
 
int32 DetailsNum () const
 The number of details in the detailmark. More...
 
const FBitMaskGetDetailsMask () const
 Get the details mask of the detailmark. More...
 
TSubclassOf< UDetailDetailAt (const int32 Index) const
 Get a detail type by its index. More...
 
TSubclassOf< UDetailoperator[] (const int32 Index) const
 Get a detail type by its index. More...
 
 operator bool () const
 Check if a detailmark is viable and has any actual effect. More...
 
int32 IndexOf (const TSubclassOf< UDetail > DetailClass) const
 Get the index of a specific detail class. More...
 
template<typename TAllocator >
EApparatusStatus IndicesOf (const TSubclassOf< UDetail > DetailClass, TArray< int32, TAllocator > &OutIndices) const
 Find all of the indices of a detail class. More...
 
template<typename TAllocatorA , typename TAllocatorB >
EApparatusStatus FindMappingFrom (const TArray< TSubclassOf< UDetail >, TAllocatorA > &DetailClasses, TArray< int32, TAllocatorB > &OutMapping) const
 Find an indexing mapping from another detailmark defined by an array of details. More...
 
template<typename TAllocator >
EApparatusStatus FindMappingFrom (const FDetailmark &InDetailmark, TArray< int32, TAllocator > &OutMapping) const
 Get an indexing mapping from another detailmark's details. More...
 
template<typename TAllocatorA , typename TAllocatorB , typename TAllocatorC >
EApparatusStatus FindMappingFrom (const TArray< TSubclassOf< UDetail >, TAllocatorA > &InDetailClasses, TArray< TArray< int32, TAllocatorC >, TAllocatorB > &OutMapping) const
 Get an indexing multi-mapping from another detailmark defined by an array of details. More...
 
template<typename TAllocatorA , typename TAllocatorB >
EApparatusStatus FindMappingFrom (const FDetailmark &InDetailmark, TArray< TArray< int32, TAllocatorB >, TAllocatorA > &OutMapping) const
 Get an indexing multi-mapping from another detailmark. More...
 
template<typename TAllocator >
EApparatusStatus FindMappingTo (const FDetailmark &Detailmark, TArray< int32, TAllocator > &OutMapping) const
 Find an indexing details mapping to another detailmark. More...
 
template<typename TAllocatorA , typename TAllocatorB >
EApparatusStatus FindMappingTo (const FDetailmark &Detailmark, TArray< TArray< int32, TAllocatorB >, TAllocatorA > &OutMapping) const
 Find a multi-indexing details mapping to another detailmark. More...
 
bool Contains (const TSubclassOf< UDetail > DetailClass) const
 Check if the detailmark includes a detail class. More...
 
template<typename T >
bool Contains () const
 Check if the detailmark includes a detail class. More...
 
bool Matches (const FFilter &Filter) const
 Check if the detailmark matches a filter. More...
 
bool Matches (const FDetailmark &Detailmark) const
 Check if the detailmark matches another detailmark acting as a filter. More...
 
template<typename TAllocator >
EApparatusStatus Set (const TArray< TSubclassOf< UDetail >, TAllocator > &InDetailClassess, const EBootFilter InBootState=EBootFilter::None)
 Set a detailmark to an array of detail classes and a boot state. More...
 
template<typename TAllocator >
EApparatusStatus Set (const TArray< UDetail *, TAllocator > &InDetails, const EBootFilter InBootState=EBootFilter::None)
 Set a detailmark to an array of active details and a boot state. More...
 
EApparatusStatus Set (FDetailmark &&InDetailmark)
 Move a detailmark to this detailmark. More...
 
EApparatusStatus Set (const FDetailmark &InDetailmark)
 Set a detailmark equal to another detailmark. More...
 
FDetailmarkoperator= (FDetailmark &&InDetailmark)
 Move a detailmark. More...
 
FDetailmarkoperator= (const FDetailmark &InDetailmark)
 Set a detailmark equal to another detailmark. More...
 
EApparatusStatus Add (std::initializer_list< TSubclassOf< UDetail >> DetailClasses)
 Add detail classes to the detailmark. More...
 
EApparatusStatus Add (const FDetailmark &Detailmark, const EBootFilter InBootState=EBootFilter::None)
 Add a detailmark. More...
 
EApparatusStatus AddDecomposed (const FDetailmark &Detailmark, const EBootFilter InBootState=EBootFilter::None)
 Add a detailmark while decomposing its details to base classes. More...
 
EApparatusStatus Add (TSubclassOf< UDetail > DetailClass, const EBootFilter InBootState=EBootFilter::None)
 Add a detail class. More...
 
EApparatusStatus AddDecomposed (TSubclassOf< UDetail > DetailClass, const EBootFilter InBootState=EBootFilter::None)
 Add a detail class while decomposing it to its base classes. More...
 
EApparatusStatus Add (const TArray< TSubclassOf< UDetail >> &InDetails, const EBootFilter InBootState=EBootFilter::None)
 Add an array of details and a boot state specification. More...
 
template<typename T >
EApparatusStatus Add (const EBootFilter InBootState=EBootFilter::None)
 Add a generic detail class. More...
 
FDetailmarkoperator+= (std::initializer_list< TSubclassOf< UDetail >> DetailClasses)
 Add variadic detail classes. More...
 
FDetailmarkoperator+= (const TArray< TSubclassOf< UDetail >> &DetailClasses)
 Add an array of detail classes. More...
 
FDetailmarkoperator+= (TSubclassOf< UDetail > DetailClass)
 Add a single detail type. More...
 
EApparatusStatus Remove (const TSubclassOf< UDetail > DetailClass)
 Remove a detail class from the detailmark specification. More...
 
template<typename T >
EApparatusStatus Remove ()
 Remove a detail class from a detailmark. More...
 
FDetailmarkoperator-= (TSubclassOf< UDetail > DetailClass)
 Remove a detail type from the detailmark. More...
 
EApparatusStatus Reset (const EBootFilter InBootState=EBootFilter::None)
 Clear the detailmark without any deallocations. More...
 
FString ToString () const
 Convert a detailmark to a string. More...
 
 FDetailmark (const EBootFilter InBootState=EBootFilter::None)
 Construct a new detailmark with an optional boot state. More...
 
 FDetailmark (FDetailmark &&Detailmark)
 Move-construct a detailmark. More...
 
 FDetailmark (const FDetailmark &Detailmark)
 Construct a new detailmark as a copy of another one. More...
 
 FDetailmark (const FDetailmark &Detailmark, const EBootFilter InBootState)
 Construct a new detailmark as a copy of another one and a boot state override. More...
 
 FDetailmark (TSubclassOf< UDetail > DetailClass, const EBootFilter InBootState=EBootFilter::None)
 Initialize a new detailmark with a single detail class and an optional boot state. More...
 
 FDetailmark (std::initializer_list< TSubclassOf< UDetail >> InDetailClasses, const EBootFilter InBootState=EBootFilter::None)
 Construct a new detailmark with an initializer list of detail classes and an optional boot state. More...
 
template<typename TAllocator >
 FDetailmark (const TArray< TSubclassOf< UDetail >, TAllocator > &InDetailClasses, const EBootFilter InBootState=EBootFilter::None)
 Construct a new detailmark with an array of detail classes and an optional boot state. More...
 
template<typename TAllocator >
 FDetailmark (const TArray< UDetail *, TAllocator > &InDetails, const EBootFilter InBootState=EBootFilter::None)
 Construct a new detailmark with an array of details and an optional boot state. More...
 

Static Public Member Functions

static int32 GetDetailId (const TSubclassOf< UDetail > DetailClass)
 Get a detail's unique identifier. More...
 
static int32 RegisteredDetailsNum ()
 Get the total number of registered details so far. More...
 
static const FBitMaskGetDetailMask (const TSubclassOf< UDetail > DetailClass)
 Get the cached mask of a detail type. More...
 
static const FBitMaskGetExcludedDetailMask (const TSubclassOf< UDetail > DetailClass)
 Get the excluded mask of a detail type. More...
 
static const FBitMaskGetDetailMask (const UDetail *Detail)
 Get the cached mask of a detail's type. More...
 
static const FBitMaskGetExcludedDetailMask (const UDetail *Detail)
 Get the excluded mask of a details's type. More...
 
template<class T >
static const FBitMaskGetDetailMask ()
 Get the mask of a detail. More...
 

Static Public Attributes

static const FDetailmark Zero
 An empty detailmark constant. More...
 
static const FDetailmark Halted
 The default detailmark for newly spanwed subjects. More...
 

Friends

struct FFilter
 
class UChunk
 
struct FSubjectHandle
 
class UBelt
 
class AMechanism
 
class UApparatusFunctionLibrary
 

Detailed Description

The detail-only fingerprint part.

Member Typedef Documentation

◆ DetailsType

typedef TArray<TSubclassOf<UDetail>, TInlineAllocator<InlineDetailsCount> > FDetailmark::DetailsType

The type for details array.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
InvalidDetailId 

Invalid detail identifier.

InlineDetailsCount 

The number of inline-allocated details.

Constructor & Destructor Documentation

◆ FDetailmark() [1/8]

FDetailmark::FDetailmark ( const EBootFilter  InBootState = EBootFilter::None)
inline

Construct a new detailmark with an optional boot state.

◆ FDetailmark() [2/8]

FDetailmark::FDetailmark ( FDetailmark &&  Detailmark)
inline

Move-construct a detailmark.

◆ FDetailmark() [3/8]

FDetailmark::FDetailmark ( const FDetailmark Detailmark)
inline

Construct a new detailmark as a copy of another one.

◆ FDetailmark() [4/8]

FDetailmark::FDetailmark ( const FDetailmark Detailmark,
const EBootFilter  InBootState 
)
inline

Construct a new detailmark as a copy of another one and a boot state override.

◆ FDetailmark() [5/8]

FDetailmark::FDetailmark ( TSubclassOf< UDetail DetailClass,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Initialize a new detailmark with a single detail class and an optional boot state.

Parameters
DetailClassA detail class to initialize with.
InBootStateA boot state to initialize with.

◆ FDetailmark() [6/8]

FDetailmark::FDetailmark ( std::initializer_list< TSubclassOf< UDetail >>  InDetailClasses,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Construct a new detailmark with an initializer list of detail classes and an optional boot state.

◆ FDetailmark() [7/8]

template<typename TAllocator >
FDetailmark::FDetailmark ( const TArray< TSubclassOf< UDetail >, TAllocator > &  InDetailClasses,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Construct a new detailmark with an array of detail classes and an optional boot state.

◆ FDetailmark() [8/8]

template<typename TAllocator >
FDetailmark::FDetailmark ( const TArray< UDetail *, TAllocator > &  InDetails,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Construct a new detailmark with an array of details and an optional boot state.

Member Function Documentation

◆ Add() [1/5]

template<typename T >
EApparatusStatus FDetailmark::Add ( const EBootFilter  InBootState = EBootFilter::None)
inline

Add a generic detail class.

Returns
The status of the operation.

◆ Add() [2/5]

EApparatusStatus FDetailmark::Add ( const FDetailmark Detailmark,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Add a detailmark.

Returns
The status of the operation.

◆ Add() [3/5]

EApparatusStatus FDetailmark::Add ( const TArray< TSubclassOf< UDetail >> &  InDetails,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Add an array of details and a boot state specification.

Returns
The status of the operation.

◆ Add() [4/5]

EApparatusStatus FDetailmark::Add ( std::initializer_list< TSubclassOf< UDetail >>  DetailClasses)
inline

Add detail classes to the detailmark.

Returns
The status of the operation.

◆ Add() [5/5]

EApparatusStatus FDetailmark::Add ( TSubclassOf< UDetail DetailClass,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Add a detail class.

Parameters
DetailClassA class of the detail to add.
InBootStateA boot state to add.
Returns
The status of the operation.

◆ AddDecomposed() [1/2]

EApparatusStatus FDetailmark::AddDecomposed ( const FDetailmark Detailmark,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Add a detailmark while decomposing its details to base classes.

Returns
The status of the operation.

◆ AddDecomposed() [2/2]

EApparatusStatus FDetailmark::AddDecomposed ( TSubclassOf< UDetail DetailClass,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Add a detail class while decomposing it to its base classes.

Parameters
DetailClassA class of the detail to add.
InBootStateA boot state to add.
Returns
The status of the operation.

◆ Contains() [1/2]

template<typename T >
bool FDetailmark::Contains ( ) const
inline

Check if the detailmark includes a detail class.

◆ Contains() [2/2]

bool FDetailmark::Contains ( const TSubclassOf< UDetail DetailClass) const
inline

Check if the detailmark includes a detail class.

◆ DetailAt()

TSubclassOf<UDetail> FDetailmark::DetailAt ( const int32  Index) const
inline

Get a detail type by its index.

◆ DetailsNum()

int32 FDetailmark::DetailsNum ( ) const
inline

The number of details in the detailmark.

◆ FindMappingFrom() [1/4]

template<typename TAllocator >
EApparatusStatus FDetailmark::FindMappingFrom ( const FDetailmark InDetailmark,
TArray< int32, TAllocator > &  OutMapping 
) const
inline

Get an indexing mapping from another detailmark's details.

Parameters
InDetailmarkA detailmark to get a mapping from.
OutMappingThe resulting details mapping.
Returns
The status of the operation.

◆ FindMappingFrom() [2/4]

template<typename TAllocatorA , typename TAllocatorB >
EApparatusStatus FDetailmark::FindMappingFrom ( const FDetailmark InDetailmark,
TArray< TArray< int32, TAllocatorB >, TAllocatorA > &  OutMapping 
) const
inline

Get an indexing multi-mapping from another detailmark.

Parameters
InDetailmarkA detailmark to get a mapping from.
OutMappingThe resulting two-dimensional multi-mapping.

◆ FindMappingFrom() [3/4]

template<typename TAllocatorA , typename TAllocatorB >
EApparatusStatus FDetailmark::FindMappingFrom ( const TArray< TSubclassOf< UDetail >, TAllocatorA > &  DetailClasses,
TArray< int32, TAllocatorB > &  OutMapping 
) const
inline

Find an indexing mapping from another detailmark defined by an array of details.

Parameters
DetailClassesA detailmark to get a mapping from.
OutMappingThe resulting mapping.

◆ FindMappingFrom() [4/4]

template<typename TAllocatorA , typename TAllocatorB , typename TAllocatorC >
EApparatusStatus FDetailmark::FindMappingFrom ( const TArray< TSubclassOf< UDetail >, TAllocatorA > &  InDetailClasses,
TArray< TArray< int32, TAllocatorC >, TAllocatorB > &  OutMapping 
) const
inline

Get an indexing multi-mapping from another detailmark defined by an array of details.

Parameters
InDetailClassesA detailmark to get a mapping from.
OutMappingThe resulting two-dimensional multi-mapping.

◆ FindMappingTo() [1/2]

template<typename TAllocator >
EApparatusStatus FDetailmark::FindMappingTo ( const FDetailmark Detailmark,
TArray< int32, TAllocator > &  OutMapping 
) const
inline

Find an indexing details mapping to another detailmark.

Parameters
DetailmarkA detailmark to get the details mapping to.
OutMappingThe resulting mapping.
Returns
The status of the operation.

◆ FindMappingTo() [2/2]

template<typename TAllocatorA , typename TAllocatorB >
EApparatusStatus FDetailmark::FindMappingTo ( const FDetailmark Detailmark,
TArray< TArray< int32, TAllocatorB >, TAllocatorA > &  OutMapping 
) const
inline

Find a multi-indexing details mapping to another detailmark.

Parameters
DetailmarkA detailmark to get the details mapping to.
OutMappingThe resulting multi-mapping.
Returns
The status of the operation.

◆ GetBootState()

EBootFilter FDetailmark::GetBootState ( ) const
inline

Get the active boot state.

◆ GetDetailId()

int32 FDetailmark::GetDetailId ( const TSubclassOf< UDetail DetailClass)
inlinestatic

Get a detail's unique identifier.

◆ GetDetailMask() [1/3]

template<class T >
static const FBitMask& FDetailmark::GetDetailMask ( )
inlinestatic

Get the mask of a detail.

◆ GetDetailMask() [2/3]

const FBitMask & FDetailmark::GetDetailMask ( const TSubclassOf< UDetail DetailClass)
inlinestatic

Get the cached mask of a detail type.

◆ GetDetailMask() [3/3]

const FBitMask & FDetailmark::GetDetailMask ( const UDetail Detail)
inlinestatic

Get the cached mask of a detail's type.

◆ GetDetails()

const DetailsType& FDetailmark::GetDetails ( ) const
inline

Get the details of the detailmark.

◆ GetDetailsMask()

const FBitMask& FDetailmark::GetDetailsMask ( ) const
inline

Get the details mask of the detailmark.

Constant version.

◆ GetExcludedDetailMask() [1/2]

const FBitMask & FDetailmark::GetExcludedDetailMask ( const TSubclassOf< UDetail DetailClass)
inlinestatic

Get the excluded mask of a detail type.

◆ GetExcludedDetailMask() [2/2]

static const FBitMask& FDetailmark::GetExcludedDetailMask ( const UDetail Detail)
inlinestatic

Get the excluded mask of a details's type.

◆ IndexOf()

int32 FDetailmark::IndexOf ( const TSubclassOf< UDetail DetailClass) const
inline

Get the index of a specific detail class.

Searches for exact class first, by parental class information second.

◆ IndicesOf()

template<typename TAllocator >
EApparatusStatus FDetailmark::IndicesOf ( const TSubclassOf< UDetail DetailClass,
TArray< int32, TAllocator > &  OutIndices 
) const
inline

Find all of the indices of a detail class.

Parameters
DetailClassA detail class to find the indices of.
OutIndicesThe resulting indices storage.
Returns
The status of the operation.

◆ IsBooted()

bool FDetailmark::IsBooted ( ) const
inline

Check if the detailmark corresponds to a booted entity.

◆ Matches() [1/2]

bool FDetailmark::Matches ( const FDetailmark Detailmark) const
inline

Check if the detailmark matches another detailmark acting as a filter.

◆ Matches() [2/2]

bool FDetailmark::Matches ( const FFilter Filter) const
inline

Check if the detailmark matches a filter.

◆ operator bool()

FDetailmark::operator bool ( ) const
inline

Check if a detailmark is viable and has any actual effect.

◆ operator TArray< TSubclassOf< UDetail >>()

FDetailmark::operator TArray< TSubclassOf< UDetail >> ( ) const
inlineexplicit

Convert to an array of detail classes.

◆ operator+=() [1/3]

FDetailmark& FDetailmark::operator+= ( const TArray< TSubclassOf< UDetail >> &  DetailClasses)
inline

Add an array of detail classes.

◆ operator+=() [2/3]

FDetailmark& FDetailmark::operator+= ( std::initializer_list< TSubclassOf< UDetail >>  DetailClasses)
inline

Add variadic detail classes.

◆ operator+=() [3/3]

FDetailmark& FDetailmark::operator+= ( TSubclassOf< UDetail DetailClass)
inline

Add a single detail type.

◆ operator-=()

FDetailmark& FDetailmark::operator-= ( TSubclassOf< UDetail DetailClass)
inline

Remove a detail type from the detailmark.

◆ operator=() [1/2]

FDetailmark& FDetailmark::operator= ( const FDetailmark InDetailmark)
inline

Set a detailmark equal to another detailmark.

◆ operator=() [2/2]

FDetailmark& FDetailmark::operator= ( FDetailmark &&  InDetailmark)
inline

Move a detailmark.

◆ operator[]()

TSubclassOf<UDetail> FDetailmark::operator[] ( const int32  Index) const
inline

Get a detail type by its index.

◆ RegisteredDetailsNum()

int32 FDetailmark::RegisteredDetailsNum ( )
inlinestatic

Get the total number of registered details so far.

◆ Remove() [1/2]

template<typename T >
EApparatusStatus FDetailmark::Remove ( )
inline

Remove a detail class from a detailmark.

Returns
Was anything actually changed?

◆ Remove() [2/2]

EApparatusStatus FDetailmark::Remove ( const TSubclassOf< UDetail DetailClass)
inline

Remove a detail class from the detailmark specification.

Parameters
DetailClassA detail class to remove.
Returns
Was anything actually changed?

◆ Reset()

EApparatusStatus FDetailmark::Reset ( const EBootFilter  InBootState = EBootFilter::None)
inline

Clear the detailmark without any deallocations.

◆ Set() [1/4]

EApparatusStatus FDetailmark::Set ( const FDetailmark InDetailmark)
inline

Set a detailmark equal to another detailmark.

◆ Set() [2/4]

template<typename TAllocator >
EApparatusStatus FDetailmark::Set ( const TArray< TSubclassOf< UDetail >, TAllocator > &  InDetailClassess,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Set a detailmark to an array of detail classes and a boot state.

◆ Set() [3/4]

template<typename TAllocator >
EApparatusStatus FDetailmark::Set ( const TArray< UDetail *, TAllocator > &  InDetails,
const EBootFilter  InBootState = EBootFilter::None 
)
inline

Set a detailmark to an array of active details and a boot state.

◆ Set() [4/4]

EApparatusStatus FDetailmark::Set ( FDetailmark &&  InDetailmark)
inline

Move a detailmark to this detailmark.

◆ SetBooted()

EApparatusStatus FDetailmark::SetBooted ( bool  bState = true)
inline

Set the new active boot state.

Returns
The status of the operation.

◆ SetBootState()

EApparatusStatus FDetailmark::SetBootState ( const EBootFilter  InBootState)
inline

Set the new active boot state.

Returns
The status of the operation.

◆ ToString()

FString FDetailmark::ToString ( ) const

Convert a detailmark to a string.

Friends And Related Function Documentation

◆ AMechanism

friend class AMechanism
friend

◆ FFilter

friend struct FFilter
friend

◆ FSubjectHandle

friend struct FSubjectHandle
friend

◆ UApparatusFunctionLibrary

friend class UApparatusFunctionLibrary
friend

◆ UBelt

friend class UBelt
friend

◆ UChunk

friend class UChunk
friend

Member Data Documentation

◆ Halted

const FDetailmark FDetailmark::Halted
static

The default detailmark for newly spanwed subjects.

◆ Zero

const FDetailmark FDetailmark::Zero
static

An empty detailmark constant.


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