7#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_6
10#include "MassEntityView.generated.h"
12#define UE_API MASSENTITY_API
56 "Given struct doesn't represent a valid fragment type but a tag. Use HasTag instead.");
59 return *((T*)GetFragmentPtrChecked(*T::StaticStruct()));
67 "Given struct doesn't represent a valid fragment type but a tag. Use HasTag instead.");
70 return (T*)GetFragmentPtr(*T::StaticStruct());
76 return FStructView(FragmentType,
static_cast<uint8*
>(GetFragmentPtr(*FragmentType)));
84 "Given struct doesn't represent a valid const shared fragment type. Make sure to inherit from FMassConstSharedFragment or one of its child-types.");
86 return (
const T*)GetConstSharedFragmentPtr(*T::StaticStruct());
94 "Given struct doesn't represent a valid const shared fragment type. Make sure to inherit from FMassConstSharedFragment or one of its child-types.");
96 return *((
const T*)GetConstSharedFragmentPtrChecked(*T::StaticStruct()));
102 return FConstStructView(FragmentType,
static_cast<const uint8*
>(GetConstSharedFragmentPtr(*FragmentType)));
106 template<UE::Mass::CSharedFragment T>
109 return *((T*)GetSharedFragmentPtrChecked(*T::StaticStruct()));
113 template<UE::Mass::CSharedFragment T>
116 return (T*)GetSharedFragmentPtr(*T::StaticStruct());
119 template<UE::Mass::CConstSharedFragment T>
120 UE_DEPRECATED(5.5,
"Using GetSharedFragmentDataPtr with const shared fragments is deprecated. Use GetConstSharedFragmentDataPtr instead")
121 T* GetSharedFragmentDataPtr()
const
126 template<UE::Mass::CConstSharedFragment T>
127 UE_DEPRECATED(5.5,
"Using GetSharedFragmentDataPtr with const shared fragments is deprecated. Use GetConstSharedFragmentData instead")
128 T& GetSharedFragmentData()
const
136 return FStructView(FragmentType,
static_cast<uint8*
>(GetSharedFragmentPtr(*FragmentType)));
142 static_assert(
UE::Mass::CTag<T>,
"Given struct doesn't represent a valid tag type. Make sure to inherit from FMassTag or one of its child-types.");
143 return HasTag(*T::StaticStruct());
156 UE_API const void* GetConstSharedFragmentPtrChecked(
const UScriptStruct& FragmentType)
const;
171 return EntityDataHandle.
IsValid(Archetype);
181 return Archetype ==
Other.Archetype && EntityDataHandle ==
Other.EntityDataHandle;
#define check(expr)
Definition AssertionMacros.h:314
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define MASS_INVALID_FRAGMENT_MSG
Definition MassEntityElementTypes.h:16
#define UE_API
Definition MassEntityView.h:12
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
Definition MassEntityConcepts.h:32
Definition MassEntityConcepts.h:16
Definition MassEntityConcepts.h:23
bool IsA< FMassSharedFragment >(const UStruct *Struct)
Definition MassEntityElementTypes.h:73
bool IsA< FMassConstSharedFragment >(const UStruct *Struct)
Definition MassEntityElementTypes.h:79
Definition StructView.h:217
Definition MassArchetypeData.h:172
Definition MassArchetypeTypes.h:39
bool operator==(const FMassArchetypeHandle &Other) const
Definition MassArchetypeTypes.h:368
Definition MassEntityHandle.h:13
Definition MassArchetypeTypes.h:304
MASSENTITY_API bool IsValid(const FMassArchetypeData *ArchetypeData) const
Definition MassArchetypeTypes.cpp:482
Definition MassEntityManager.h:96
Definition MassEntityView.h:24
T * GetFragmentDataPtr() const
Definition MassEntityView.h:64
T & GetSharedFragmentData() const
Definition MassEntityView.h:107
FStructView GetSharedFragmentDataStruct(const UScriptStruct *FragmentType) const
Definition MassEntityView.h:133
bool IsSet() const
Definition MassEntityView.h:169
const T * GetConstSharedFragmentDataPtr() const
Definition MassEntityView.h:81
bool operator==(const FMassEntityView &Other) const
Definition MassEntityView.h:179
FStructView GetFragmentDataStruct(const UScriptStruct *FragmentType) const
Definition MassEntityView.h:73
T & GetFragmentData() const
Definition MassEntityView.h:53
bool IsValid() const
Definition MassEntityView.h:174
bool HasTag() const
Definition MassEntityView.h:140
FConstStructView GetConstSharedFragmentDataStruct(const UScriptStruct *FragmentType) const
Definition MassEntityView.h:99
const T & GetConstSharedFragmentData() const
Definition MassEntityView.h:91
T * GetSharedFragmentDataPtr() const
Definition MassEntityView.h:114
Definition StructView.h:24