6#include "Containers/Map.h"
16 template <
typename FunctionType,
typename ArgumentType>
20 template <
typename FunctionType,
typename ColumnType>
24 template <
typename FunctionType>
27 template <TColumnType ColumnType>
30 return DataStorage->
GetColumn<ColumnType>(Row);
33 template <TDynamicColumnTemplate ColumnType>
44 template <
typename PropertyType>
47 PropertyType*
Get(
void* Object)
const;
48 const PropertyType*
Get(
const void* Object)
const;
51 template <
typename PropertyType>
57 PropertyType*
Get(
void* Object)
const;
58 const PropertyType*
Get(
const void* Object)
const;
62 template <
typename PropertyType>
71 PropertyType*
Get(
void* Object)
const;
72 const PropertyType*
Get(
const void* Object)
const;
81 template <
typename PropertyType>
86 template <TDataColumnOrDynamicDataColumnTemplate ObjectType>
90 template <
typename InputType, TDataColumnOrDynamicDataColumnTemplate ObjectType>
94 template <TDataColumnOrDynamicDataColumnTemplate ObjectType>
95 PropertyType&
Get(ObjectType& Object)
const;
98 template <TDataColumnOrDynamicDataColumnTemplate ObjectType>
99 const PropertyType&
Get(
const ObjectType& Object)
const;
130 template <
typename PropertyType>
133 checkf(
false,
TEXT(
"Empty properties shouldn't be accessed."));
137 template <
typename PropertyType>
140 checkf(
false,
TEXT(
"Empty properties shouldn't be accessed."));
149 template <
typename PropertyType>
152 return reinterpret_cast<PropertyType*
>((
reinterpret_cast<char*
>(Object) +
Offset));
155 template <
typename PropertyType>
158 return reinterpret_cast<const PropertyType*
>((
reinterpret_cast<const char*
>(Object) +
Offset));
166 template <
typename PropertyType>
169 Cache = Converter(Object);
173 template <
typename PropertyType>
176 Cache = Converter(Object);
185 template <
typename PropertyType>
186 template <TDataColumnOrDynamicDataColumnTemplate ObjectType>
190 Result.Offset =
reinterpret_cast<size_t>(&(
reinterpret_cast<const ObjectType*
>(0)->*
Variable));
192 ObjectTypeInfo = ObjectType::StaticStruct();
196 template <
typename PropertyType>
197 template <
typename InputType, TDataColumnOrDynamicDataColumnTemplate ObjectType>
201 Result.Converter = [Converter =
MoveTemp(Converter),
Variable](
const void* Object)
203 return Converter(
reinterpret_cast<const ObjectType*
>(Object)->*
Variable);
206 ObjectTypeInfo = ObjectType::StaticStruct();
210 template <
typename PropertyType>
211 template <TDataColumnOrDynamicDataColumnTemplate ObjectType>
214 return Get(&Object, ObjectType::StaticStruct());
217 template <
typename PropertyType>
218 template <TDataColumnOrDynamicDataColumnTemplate ObjectType>
221 return Get(&Object, ObjectType::StaticStruct());
224 template <
typename PropertyType>
227 checkf(Object,
TEXT(
"Nullptr pointer provided to Object while trying to retrieve a property value."));
228 checkf(Type.IsValid(),
TEXT(
"Nullptr pointer provided to Type while trying to retrieve a property value."));
229 checkf(IsBound(),
TEXT(
"Attempting to retrieve the value of object type (%s) from a property that wasn't bound."),
230 *Type->GetFName().ToString());
231 ensureMsgf(Type == ObjectTypeInfo,
TEXT(
"Provided object type (%s) did not match bound object type (%s)."),
232 *Type->GetFName().ToString(), ObjectTypeInfo.IsValid() ? *ObjectTypeInfo->GetFName().ToString() :
TEXT(
"<no type>"));
234 return *
Visit([Object](
auto&& Prop) {
return Prop.Get(Object); }, InternalProperty);
237 template <
typename PropertyType>
240 checkf(Object,
TEXT(
"Nullptr pointer provided to Object while trying to retrieve a property value."));
241 checkf(Type.IsValid(),
TEXT(
"Nullptr pointer provided to Type while trying to retrieve a property value."));
242 checkf(IsBound(),
TEXT(
"Attempting to retrieve the value of object type (%s) from a property that wasn't bound."),
243 *Type->GetFName().ToString());
244 ensureMsgf(Type == ObjectTypeInfo,
TEXT(
"Provided object type (%s) did not match bound object type (%s)."),
245 *Type->GetFName().ToString(), ObjectTypeInfo.IsValid() ? *ObjectTypeInfo->GetFName().ToString() :
TEXT(
"<no type>"));
247 return *
Visit([Object](
auto&& Prop) {
return Prop.Get(Object); }, InternalProperty);
250 template <
typename PropertyType>
253 return ObjectTypeInfo;
256 template <
typename PropertyType>
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
decltype(auto) Visit(Func &&Callable, Variants &&... Args)
Definition TVariant.h:271
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32 Offset
Definition VulkanMemory.cpp:4033
Definition NameTypes.h:617
Definition AndroidPlatformMisc.h:14
Definition TypedElementDataStorageInterface.h:65
ColumnType * GetColumn(RowHandle Row)
Definition TypedElementDataStorageInterface.h:802
Definition TypedElementAttributeBindingProperty.h:83
void Bind(PropertyType ObjectType::*Variable)
Definition TypedElementAttributeBindingProperty.h:187
PropertyType & Get(ObjectType &Object) const
Definition TypedElementAttributeBindingProperty.h:212
const PropertyType & Get(const void *Object, TWeakObjectPtr< const UScriptStruct > Type) const
Definition TypedElementAttributeBindingProperty.h:238
void Bind(InputType ObjectType::*Variable, TFunction< PropertyType(const InputType &)> Converter)
Definition TypedElementAttributeBindingProperty.h:198
const PropertyType & Get(const ObjectType &Object) const
Definition TypedElementAttributeBindingProperty.h:219
TWeakObjectPtr< const UScriptStruct > GetObjectTypeInfo() const
Definition TypedElementAttributeBindingProperty.h:251
bool IsBound() const
Definition TypedElementAttributeBindingProperty.h:257
PropertyType & Get(void *Object, TWeakObjectPtr< const UScriptStruct > Type) const
Definition TypedElementAttributeBindingProperty.h:225
Definition TypedElementAttributeBindingProperty.h:25
Definition TypedElementAttributeBindingProperty.h:21
Definition TypedElementAttributeBindingProperty.h:17
Definition TypedElementAttributeBindingProperty.h:76
Definition CommonTypes.h:95
Definition CommonTypes.h:88
Definition OverriddenPropertySet.cpp:45
ColumnType * GetColumn(ICoreProvider *DataStorage, RowHandle Row)
Definition TypedElementAttributeBindingProperty.h:28
Definition CommonTypes.cpp:10
uint64 RowHandle
Definition Handles.h:15
Definition WeakObjectPtrTemplates.h:25
Definition TypedElementAttributeBindingProperty.h:64
PropertyType * Get(void *Object) const
Definition TypedElementAttributeBindingProperty.h:167
PropertyType Cache
Definition TypedElementAttributeBindingProperty.h:69
TFunction< PropertyType(const void *)> Converter
Definition TypedElementAttributeBindingProperty.h:66
Definition TypedElementAttributeBindingProperty.h:53
PropertyType * Get(void *Object) const
Definition TypedElementAttributeBindingProperty.h:150
size_t Offset
Definition TypedElementAttributeBindingProperty.h:55
Definition TypedElementAttributeBindingProperty.h:46
PropertyType * Get(void *Object) const
Definition TypedElementAttributeBindingProperty.h:131