5#if !WITH_VERSE_BPVM || defined(__INTELLISENSE__)
48template <
typename FunctionType>
50template <
typename InterfaceProxyType>
57template <
typename NativeType>
60 static constexpr bool Value =
false;
64template <
typename NativeType,
typename =
void>
87template <
typename ObjectType>
114template <
typename InterfaceProxyType>
118template <
typename NativeType,
typename =
void>
125template <
typename NativeType>
133template <
typename InterfaceProxyType>
136template <
typename NativeType>
143template <
class NativeType UE_REQUIRES(std::is_convertible_v<NativeType*, FNativeType*>)>
169 return VValue::FromBool(Logic);
196 return VValue::Char(
Char);
201 return VValue::Char32(Char32);
212 template <
class ObjectType>
220 template <
class ObjectType>
225 template <
class ObjectType>
231 template <
class InterfaceProxyType>
252 template <
class NativeType UE_REQUIRES(std::is_convertible_v<NativeType*, FNativeType*>)>
258 template <
class ElementType>
262 return ToVValue(Context, Array[Index]);
267 template <
class KeyType,
class ValueType>
272 for (
auto Pair :
Map)
277 return VMapBase::New<VMap>(
Context, Pairs.
Num(), [&](
uint32 I) { return Pairs[I]; });
280 template <
typename ValueType>
306 return {FOpResult::Return};
314 return {FOpResult::Return};
324 Context.RaiseVerseRuntimeError(ERuntimeDiagnostic::ErrRuntime_GeneratedNativeInternal,
FText::FromString(
"Value exceeds the range of a 64 bit integer."));
325 return {FOpResult::Error};
328 return {FOpResult::Return};
343 Denominator.
Value = 1;
360 V_DIE(
"Unexpected rational value");
364 return {FOpResult::Return};
372 return {FOpResult::Return};
381 return {FOpResult::Return};
389 return {FOpResult::Return};
397 return {FOpResult::Return};
400 template <
class EnumType>
410 Context.RaiseVerseRuntimeError(ERuntimeDiagnostic::ErrRuntime_GeneratedNativeInternal,
FText::FromString(
"Native enumerators must be integers between 0 and 255"));
411 return {FOpResult::Error};
413 return {FOpResult::Return};
416 template <
class ObjectType>
422 OutNative.Value =
reinterpret_cast<ObjectType*
>(
Value.AsUObject());
423 return {FOpResult::Return};
426 template <
class InterfaceProxyType>
429 template <
class StructType>
435 return {FOpResult::Return};
452 if (Result.IsReturn())
456 if (Result.IsReturn())
466 template <
class NativeType UE_REQUIRES(std::is_convertible_v<NativeType*, FNativeType*>)>
473 Context.RaiseVerseRuntimeError(ERuntimeDiagnostic::ErrRuntime_GeneratedNativeInternal,
FText::FromString(
"Attempted to assign an incompatible type to a native function parameter or native field."));
474 return {FOpResult::Error};
478 return {FOpResult::Return};
481 template <
class ElementType>
489 for (
const VValue Element :
Array)
499 return {FOpResult::Return};
502 template <
class KeyType,
class ValueType>
526 return {FOpResult::Return};
529 template <
typename ValueType>
548 return {FOpResult::Return};
553 template <
typename ReturnType,
typename... ParamTypes>
#define check(expr)
Definition AssertionMacros.h:314
#define ensure( InExpression)
Definition AssertionMacros.h:464
#define AUTORTFM_DISABLE
Definition AutoRTFMDefines.h:116
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
#define VERSE_UNREACHABLE()
Definition VVMUnreachable.h:8
EVerseFalse
Definition VVMVerseEnum.h:97
EVerseTrue
Definition VVMVerseEnum.h:104
static CORE_API FText FromString(const ANSICHAR *String)
Definition Text.cpp:1081
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT void Push(ElementType &&Item)
Definition Array.h:1224
UE_FORCEINLINE_HINT void Reserve(SizeType Number)
Definition Array.h:3016
Definition UnrealString.h.inl:34
Definition NonNullPointer.h:23
COREUOBJECT_API bool IsValidLowLevel() const
Definition UObjectBase.cpp:394
Definition VVMNativeString.h:31
U16 Index
Definition radfft.cpp:71
Definition VVMNativeRational.h:13
Definition VVMNativeConverter.h:51
Definition ObjectPtr.h:488
Definition Optional.h:131
constexpr OptionalType & GetValue()
Definition Optional.h:443
void Reset()
Definition Optional.h:306
OptionalType & Emplace(ArgsType &&... Args)
Definition Optional.h:323
constexpr const OptionalType & Get(const OptionalType &DefaultValue UE_LIFETIMEBOUND) const UE_LIFETIMEBOUND
Definition Optional.h:472
Definition RemoveReference.h:10
Definition VVMNativeConverter.h:49
Definition VVMNativeConverter.h:153
static VValue ToVValue(FAllocationContext Context, const TNativeTuple< ElementTypes... > &Tuple, std::index_sequence< Indices... >)
Definition VVMNativeConverter.h:247
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< FVerseRational > &OutNative)
Definition VVMNativeConverter.h:331
static VValue ToVValue(FAllocationContext Context, const FVerseFunction &Function)
static VValue ToVValue(FAllocationContext Context, TInterfaceInstance< InterfaceProxyType > Object)
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< UTF8CHAR > &OutNative)
Definition VVMNativeConverter.h:384
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< TNativeTuple< ElementTypes... > > &OutNative)
Definition VVMNativeConverter.h:439
static VValue ToVValue(FAllocationContext Context, const FNativeString &String)
Definition VVMNativeConverter.h:189
static VValue ToVValue(FAllocationContext Context, bool Logic)
Definition VVMNativeConverter.h:167
static VValue ToVValue(FAllocationContext Context, EVerseTrue)
Definition VVMNativeConverter.h:162
static VValue ToVValue(FAllocationContext Context, UTF8CHAR Char)
Definition VVMNativeConverter.h:194
static VValue ToVValue(FAllocationContext Context, double Number)
Definition VVMNativeConverter.h:184
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< EVerseTrue > &OutNative)
Definition VVMNativeConverter.h:303
static VValue ToVValue(FAllocationContext Context, ObjectType *Object)
Definition VVMNativeConverter.h:213
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< TNonNullPtr< ObjectType > > &OutNative)
Definition VVMNativeConverter.h:417
static VValue ToVValue(FAllocationContext Context, const TArray< ElementType > &Array)
Definition VVMNativeConverter.h:259
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< TNativeTuple< ElementTypes... > > &OutNative, std::index_sequence< Indices... >)
Definition VVMNativeConverter.h:445
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< UTF32CHAR > &OutNative)
Definition VVMNativeConverter.h:392
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< FVerseValue > &OutNative)
static VValue ToVValue(FAllocationContext Context, EnumType Enumerator)
Definition VVMNativeConverter.h:205
static VValue ToVValue(FAllocationContext Context, const TNativeTuple< ElementTypes... > &Tuple)
Definition VVMNativeConverter.h:241
static VValue ToVValue(FAllocationContext Context, TNonNullPtr< ObjectType > Object)
Definition VVMNativeConverter.h:221
static VValue ToVValue(FAllocationContext Context, const FVerseValue &Value)
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< TArray< ElementType > > &OutNative)
Definition VVMNativeConverter.h:482
static VValue ToVValue(FAllocationContext Context, const TMap< KeyType, ValueType > &Map)
Definition VVMNativeConverter.h:268
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< FNativeString > &OutNative)
Definition VVMNativeConverter.h:375
static VValue ToVValue(FAllocationContext Context, const ::FNullOpt &Optional)
Definition VVMNativeConverter.h:293
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< int64 > &OutNative)
Definition VVMNativeConverter.h:317
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< bool > &OutNative)
Definition VVMNativeConverter.h:309
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< TOptional< ValueType > > &OutNative)
Definition VVMNativeConverter.h:530
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< TVerseFunction< ReturnType(ParamTypes...)> > &OutNative)
static VValue ToVValue(FAllocationContext Context, int64 Number)
Definition VVMNativeConverter.h:172
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< TMap< KeyType, ValueType > > &OutNative)
Definition VVMNativeConverter.h:503
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< double > &OutNative)
Definition VVMNativeConverter.h:367
static VValue ToVValue(FAllocationContext Context, const ::TOptional< ValueType > &Optional)
Definition VVMNativeConverter.h:281
static VValue ToVValue(FAllocationContext Context, EVerseFalse)
Definition VVMNativeConverter.h:156
static TEnableIf< TIsEnumClass< EnumType >::Value, FOpResult >::Type FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< EnumType > &OutNative)
Definition VVMNativeConverter.h:402
static VValue ToVValue(FAllocationContext Context, StructType &&Struct)
Definition VVMNativeConverter.h:235
static TEnableIf< TIsNativeStruct< StructType >::Value, FOpResult >::Type FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< StructType > &OutNative)
Definition VVMNativeConverter.h:431
static VValue ToVValue(FAllocationContext Context, const FVerseRational &Rational)
Definition VVMNativeConverter.h:177
static VValue ToVValue(FAllocationContext Context, const NativeType &Type)
Definition VVMNativeConverter.h:253
static VValue ToVValue(FAllocationContext Context, ::TObjectPtr< ObjectType > Object)
Definition VVMNativeConverter.h:226
static VValue ToVValue(FAllocationContext Context, UTF32CHAR Char32)
Definition VVMNativeConverter.h:199
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< TInterfaceInstance< InterfaceProxyType > > &OutNative)
static FOpResult FromVValue(FAllocationContext Context, const VValue Value, TFromVValue< NativeType > &OutNative)
Definition VVMNativeConverter.h:467
const NativeType * Value
Definition VVMNativeConverter.h:139
const NativeType & GetValue()
Definition VVMNativeConverter.h:140
NativeType GetValue()
Definition VVMNativeConverter.h:147
NativeType * Value
Definition VVMNativeConverter.h:128
TNonNullPtr< NativeType > GetValue()
Definition VVMNativeConverter.h:129
Definition VVMNativeConverter.h:120
NativeType GetValue()
Definition VVMNativeConverter.h:122
NativeType Value
Definition VVMNativeConverter.h:121
Definition VVMNativeConverter.h:59
static constexpr bool Value
Definition VVMNativeConverter.h:60
Definition VVMNativeTuple.h:31
void Emplace()
Definition VVMNativeConverter.h:92
TOptional< ObjectType * > Value
Definition VVMNativeConverter.h:90
TToVValue & operator=(TNonNullPtr< ObjectType > Other)
Definition VVMNativeConverter.h:94
TToVValue & operator=(TOptional< TNonNullPtr< ObjectType > > Other)
Definition VVMNativeConverter.h:99
Definition VVMNativeConverter.h:66
TToVValue & operator=(NativeType Other)
Definition VVMNativeConverter.h:71
TOptional< NativeType > Value
Definition VVMNativeConverter.h:67
NativeType & operator*()
Definition VVMNativeConverter.h:83
TToVValue & operator=(TOptional< NativeType > Other)
Definition VVMNativeConverter.h:76
void Emplace()
Definition VVMNativeConverter.h:69