Navigation
API > API/Runtime > API/Runtime/MassEntity
References
| Module | MassEntity |
| Header | /Engine/Source/Runtime/MassEntity/Public/MassEntityTypes.h |
| Include | #include "MassEntityTypes.h" |
Syntax
struct FMassArchetypeSharedFragmentValues
Remarks
Wrapper for const and non-const shared fragment containers that tracks which struct types it holds (via a FMassSharedFragmentBitSet). Note that having multiple instanced of a given struct type is not supported and Add* functions will fetch the previously added fragment instead of adding a new one.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bSorted | We consider empty FMassArchetypeSharedFragmentValues a sorted containter.Same goes for a container containing a single element, | |
| FMassConstSharedFragmentBitSet | ConstSharedFragmentBitSet | ||
| TArray< FConstSharedStruct > | ConstSharedFragments | ||
| uint32 | HashCache | ||
| FMassSharedFragmentBitSet | SharedFragmentBitSet | ||
| TArray< FSharedStruct > | SharedFragments |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FMassArchetypeSharedFragmentValues
(
const FMassArchetypeSharedFragmentValues& OtherFragmentValues |
|||
FMassArchetypeSharedFragmentValues
(
FMassArchetypeSharedFragmentValues&& OtherFragmentValues |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FConstSharedStruct | AddConstSharedFragment
(
const FConstSharedStruct& Fragment |
Adds Fragment to the collection. | |
| FSharedStruct | AddSharedFragment
(
const FSharedStruct& Fragment |
Adds Fragment to the collection. | |
| int32 | Append
(
const FMassArchetypeSharedFragmentValues& Other |
Appends contents of Other to `this_ instance. | |
| void | CacheHash () |
||
| uint32 | |||
| bool | ContainsType
(
const UScriptStruct* FragmentType |
||
| bool | ContainsType () |
||
| void | |||
| SIZE_T | |||
| const FMassConstSharedFragmentBitSet & | |||
| const TArray< FConstSharedStruct > & | |||
| FConstSharedStruct | GetConstSharedFragmentStruct
(
const UScriptStruct* StructType |
||
| TArray< FSharedStruct > & | |||
| const FMassSharedFragmentBitSet & | |||
| const TArray< FSharedStruct > & | |||
| FSharedStruct | GetSharedFragmentStruct
(
const UScriptStruct* StructType |
||
| bool | HasAllRequiredConstSharedFragmentTypes
(
const FMassConstSharedFragmentBitSet& InConstSharedFragmentBitSet |
||
| bool | HasAllRequiredSharedFragmentTypes
(
const FMassSharedFragmentBitSet& InSharedFragmentBitSet |
||
| bool | HasExactConstSharedFragmentTypesMatch
(
const FMassConstSharedFragmentBitSet& InConstSharedFragmentBitSet |
||
| bool | HasExactFragmentTypesMatch
(
const FMassSharedFragmentBitSet& InSharedFragmentBitSet |
DEPRECATED. | |
| bool | HasExactFragmentTypesMatch
(
const FMassSharedFragmentBitSet& InSharedFragmentBitSet, |
||
| bool | HasExactSharedFragmentTypesMatch
(
const FMassSharedFragmentBitSet& InSharedFragmentBitSet |
||
| bool | HasSameValues
(
const FMassArchetypeSharedFragmentValues& Other |
Compares contents of `this_ and the Other, and allows different order of elements in both containers. | |
| bool | IsEquivalent
(
const FMassArchetypeSharedFragmentValues& OtherSharedFragmentValues |
||
| bool | IsSorted () |
||
| int32 | Remove
(
const FMassSharedFragmentBitSet& SharedFragmentToRemoveBitSet |
Note that the function removes the shared fragments by type | |
| int32 | Remove
(
const FMassConstSharedFragmentBitSet& ConstSharedFragmentToRemoveBitSet |
Note that the function removes the const shared fragments by type | |
| void | ReplaceSharedFragments
(
TConstArrayView< FSharedStruct > Fragments |
Finds instances of fragment types given by Fragments and replaces their values with contents of respective element of Fragments. | |
| void | Sort () |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FMassArchetypeSharedFragmentValues & | operator=
(
const FMassArchetypeSharedFragmentValues& OtherFragmentValues |
||
| FMassArchetypeSharedFragmentValues & | operator=
(
FMassArchetypeSharedFragmentValues&& OtherFragmentValues |