35 :
FStructView(InstancedStruct.GetScriptStruct(), InstancedStruct.GetMutableMemory())
39 :
FStructView(SharedStruct.GetScriptStruct(), SharedStruct.GetMemory())
46 UE::StructUtils::CheckStructType<T>();
54 return UE::StructUtils::GetStructRef<T>(ScriptStruct, StructMemory);
61 return UE::StructUtils::GetStructPtr<T>(ScriptStruct, StructMemory);
79 StructMemory =
nullptr;
80 ScriptStruct =
nullptr;
86 return StructMemory !=
nullptr && ScriptStruct !=
nullptr;
90 template <
typename OtherType>
93 return ((ScriptStruct ==
Other.GetScriptStruct()) && (StructMemory ==
Other.GetMemory()));
96 template <
typename OtherType>
99 return !operator==(
Other);
116template<
typename BaseStructT>
123 template<
typename T = BaseStructT>
124 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
130 template<
typename T = BaseStructT>
131 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
137 template<
typename T = BaseStructT>
138 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
145 template<
typename T = BaseStructT>
146 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
152 template<
typename T = BaseStructT>
153 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
160 template<
typename T = BaseStructT>
161 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
164 return UE::StructUtils::GetStructRef<T>(ScriptStruct, StructMemory);
168 template<
typename T = BaseStructT>
169 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
172 return UE::StructUtils::GetStructPtr<T, BaseStructT>(ScriptStruct, StructMemory);
183 template<
typename T = BaseStructT>
184 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
187 return ((ScriptStruct ==
Other.GetScriptStruct()) && (StructMemory ==
Other.GetMemory()));
190 template<
typename T = BaseStructT>
191 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
194 return !operator==(
Other);
228 :
FConstStructView(InstancedStruct.GetScriptStruct(), InstancedStruct.GetMemory())
232 :
FConstStructView(SharedStruct.GetScriptStruct(), SharedStruct.GetMemory())
236 :
FConstStructView(SharedStruct.GetScriptStruct(), SharedStruct.GetMemory())
248 UE::StructUtils::CheckStructType<T>();
254 requires (std::is_const_v<T>)
257 return UE::StructUtils::GetStructRef<T>(ScriptStruct, StructMemory);
262 requires (std::is_const_v<T>)
265 return UE::StructUtils::GetStructPtr<T>(ScriptStruct, StructMemory);
283 StructMemory =
nullptr;
284 ScriptStruct =
nullptr;
290 return StructMemory !=
nullptr && ScriptStruct !=
nullptr;
294 template <
typename OtherType>
297 return ((ScriptStruct ==
Other.GetScriptStruct()) && (StructMemory ==
Other.GetMemory()));
300 template <
typename OtherType>
303 return !operator==(
Other);
314 const uint8* StructMemory =
nullptr;
326template<
typename BaseStructT>
331 template<
typename T = BaseStructT>
332 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
338 template<
typename T = BaseStructT>
339 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
345 template<
typename T = BaseStructT>
346 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
352 template<
typename T = BaseStructT>
353 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
359 template<
typename T = BaseStructT>
360 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
366 template<
typename T = BaseStructT>
367 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
374 template<
typename T = BaseStructT>
375 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
376 constexpr const T&
Get()
const
378 return UE::StructUtils::GetStructRef<T>(ScriptStruct, StructMemory);
382 template<
typename T = BaseStructT>
383 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
386 return UE::StructUtils::GetStructPtr<T, BaseStructT>(ScriptStruct, StructMemory);
397 template<
typename T = BaseStructT>
398 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
401 return ((ScriptStruct ==
Other.GetScriptStruct()) && (StructMemory ==
Other.GetMemory()));
404 template<
typename T = BaseStructT>
405 requires (std::is_base_of_v<BaseStructT, std::decay_t<T>>)
408 return !operator==(
Other);
#define check(expr)
Definition AssertionMacros.h:314
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_FORCEINLINE_HINT uint32 GetPtr() const
Definition LockFreeList.h:15
Definition SharedStruct.h:538
Definition StructView.h:217
void Reset()
Definition StructView.h:281
bool IsValid() const
Definition StructView.h:288
bool operator==(const OtherType &Other) const
Definition StructView.h:295
const UScriptStruct * GetScriptStruct() const
Definition StructView.h:269
FConstStructView(const FConstSharedStruct &SharedStruct)
Definition StructView.h:235
FConstStructView(const FSharedStruct &SharedStruct)
Definition StructView.h:231
FConstStructView(const FInstancedStruct &InstancedStruct)
Definition StructView.h:227
const uint8 * GetMemory() const
Definition StructView.h:275
void SetStructData(const UScriptStruct *InScriptStruct, const uint8 *InStructMemory)
Definition StructView.h:306
FConstStructView(const FStructView StructView)
Definition StructView.h:239
constexpr T * GetPtr() const
Definition StructView.h:263
bool operator!=(const OtherType &Other) const
Definition StructView.h:301
constexpr T & Get() const
Definition StructView.h:255
FConstStructView(const UScriptStruct *InScriptStruct, const uint8 *InStructMemory=nullptr)
Definition StructView.h:222
static FConstStructView Make(const T &Struct)
Definition StructView.h:246
FConstStructView()=default
Definition InstancedStruct.h:32
Definition SharedStruct.h:161
Definition StructView.h:24
FStructView(const FSharedStruct &SharedStruct)
Definition StructView.h:38
FStructView(FInstancedStruct &InstancedStruct)
Definition StructView.h:34
bool operator==(const OtherType &Other) const
Definition StructView.h:91
const UScriptStruct * GetScriptStruct() const
Definition StructView.h:65
void Reset()
Definition StructView.h:77
T * GetPtr() const
Definition StructView.h:59
T & Get() const
Definition StructView.h:52
uint8 * GetMemory() const
Definition StructView.h:71
static FStructView Make(T &InStruct)
Definition StructView.h:44
bool operator!=(const OtherType &Other) const
Definition StructView.h:97
FStructView(const UScriptStruct *InScriptStruct, uint8 *InStructMemory=nullptr)
Definition StructView.h:29
bool IsValid() const
Definition StructView.h:84
Definition SharedStruct.h:740
const uint8 * GetMemory() const
Definition SharedStruct.h:794
Definition StructView.h:328
TConstStructView(const uint8 *InStructMemory=nullptr)
Definition StructView.h:340
TConstStructView(const TStructView< T > StructView)
Definition StructView.h:368
TConstStructView(const TConstSharedStruct< T > &SharedStruct)
Definition StructView.h:361
constexpr const T & Get() const
Definition StructView.h:376
BaseStructT * operator->() const
Definition StructView.h:390
constexpr const T * GetPtr() const
Definition StructView.h:384
TConstStructView(const T &InStruct)
Definition StructView.h:333
TConstStructView(const TInstancedStruct< T > &InstancedStruct)
Definition StructView.h:347
TConstStructView()=default
TConstStructView(const TSharedStruct< T > &SharedStruct)
Definition StructView.h:354
Definition InstancedStruct.h:307
const uint8 * GetMemory() const
Definition InstancedStruct.h:411
uint8 * GetMutableMemory()
Definition InstancedStruct.h:437
const UScriptStruct * GetScriptStruct() const
Definition InstancedStruct.h:405
Definition SharedStruct.h:349
const UScriptStruct * GetScriptStruct() const
Definition SharedStruct.h:391
uint8 * GetMemory() const
Definition SharedStruct.h:402
Definition StructView.h:118
BaseStructT * operator->() const
Definition StructView.h:176
TStructView(const TSharedStruct< T > &SharedStruct)
Definition StructView.h:154
TStructView(TInstancedStruct< T > &InstancedStruct)
Definition StructView.h:147
TStructView(const UScriptStruct *InScriptStruct, uint8 *InStructMemory=nullptr)
Definition StructView.h:139
TStructView(uint8 *InStructMemory=nullptr)
Definition StructView.h:132
TStructView(T &InStruct)
Definition StructView.h:125
T * GetPtr() const
Definition StructView.h:170
T & Get() const
Definition StructView.h:162