从master分支拉取puerts,并拉取v8制品,修改puerts插件部分UE5_5以下兼容的宏代码。保证puerts编译通过。包括
CSharpParamDefaultValueMetas.cs和ubtplugin.csproj和declarationGenerator.cpp和PropertyTranslator.cpp对UserDefinedStruct.h的引用
This commit is contained in:
@@ -8,746 +8,44 @@
|
||||
|
||||
// gen by puerts gen tools
|
||||
|
||||
#include "GenHeaders.h"
|
||||
#include "CoreMinimal.h"
|
||||
#include "DataTransfer.h"
|
||||
#include "JSClassRegister.h"
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/Box2D.h', line 111,
|
||||
// column 22> unsupported method : operator+= FBox2D &(const FVector2D &) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/Box2D.h', line 130,
|
||||
// column 22> unsupported method : operator+= FBox2D &(const FBox2D &) __attribute__((thiscall))
|
||||
|
||||
static void* _FBox2DNew_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
FBox2D* Obj = new FBox2D();
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FBox2DNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value());
|
||||
FBox2D* Obj = new FBox2D(Arg0);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FBox2DNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 2)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) &&
|
||||
Info[1]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(Isolate, Info[1]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FVector2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
const FVector2D* Arg1 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Info[1]->ToObject(Context).ToLocalChecked());
|
||||
FBox2D* Obj = new FBox2D(*Arg0, *Arg1);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FBox2DNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 2)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) &&
|
||||
Info[1]->IsNumber())
|
||||
{
|
||||
const FVector2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
const int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
FBox2D* Obj = new FBox2D(Arg0, Arg1);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FBox2DNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void _FBox2DDelete_(void* Ptr, void* ClassData, void* EnvData)
|
||||
{
|
||||
FBox2D* Self = static_cast<FBox2D*>(Ptr);
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FBox2DDelete_:%p"), Self);
|
||||
delete Self;
|
||||
}
|
||||
static void FBox2DM_op_Equality(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FBox2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FBox2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_op_Equality] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator==(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_op_Inequality(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FBox2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FBox2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_op_Inequality] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator!=(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_op_Addition(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FVector2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_op_Addition] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator+(*Arg0);
|
||||
void* Ptr = new FBox2D(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FBox2D>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FBox2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FBox2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_op_Addition] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator+(*Arg0);
|
||||
void* Ptr = new FBox2D(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FBox2D>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_set_Item(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_set_Item] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
Self->operator[](Arg0);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_ComputeSquaredDistanceToPoint(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FVector2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_ComputeSquaredDistanceToPoint] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ComputeSquaredDistanceToPoint(*Arg0);
|
||||
auto V8Result = v8::Number::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_ExpandBy(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
const float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_ExpandBy] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ExpandBy(Arg0);
|
||||
void* Ptr = new FBox2D(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FBox2D>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_GetArea(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_GetArea] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->GetArea();
|
||||
auto V8Result = v8::Number::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_GetCenter(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_GetCenter] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->GetCenter();
|
||||
void* Ptr = new FVector2D(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FVector2D>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_GetCenterAndExtents(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 2)
|
||||
{
|
||||
if (Info[0]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(
|
||||
Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked()) &&
|
||||
Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(
|
||||
Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
FVector2D* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(
|
||||
PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[0])->ToObject(Context).ToLocalChecked());
|
||||
FVector2D* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(
|
||||
PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_GetCenterAndExtents] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
Self->GetCenterAndExtents(*Arg0, *Arg1);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_GetClosestPointTo(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FVector2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_GetClosestPointTo] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->GetClosestPointTo(*Arg0);
|
||||
void* Ptr = new FVector2D(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FVector2D>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_GetExtent(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_GetExtent] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->GetExtent();
|
||||
void* Ptr = new FVector2D(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FVector2D>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_GetSize(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_GetSize] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->GetSize();
|
||||
void* Ptr = new FVector2D(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FVector2D>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_Init(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::M_Init] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
Self->Init();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_Intersect(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FBox2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FBox2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_Intersect] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->Intersect(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_IsInside(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FVector2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_IsInside] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->IsInside(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FBox2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FBox2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_IsInside] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->IsInside(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_ShiftBy(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector2D>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FVector2D* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_ShiftBy] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ShiftBy(*Arg0);
|
||||
void* Ptr = new FBox2D(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FBox2D>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FBox2DM_ToString(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FBox2D::M_ToString] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToString();
|
||||
auto V8Result =
|
||||
v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked();
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void _FBox2DMinGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::Min] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FVector2D>(Isolate, Context, &(Self->Min), true);
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FBox2D, FVector2D>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FBox2DMinSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::Min] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->Min = *PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Value->ToObject(Context).ToLocalChecked());
|
||||
}
|
||||
static void _FBox2DMaxGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::Max] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FVector2D>(Isolate, Context, &(Self->Max), true);
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FBox2D, FVector2D>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FBox2DMaxSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::Max] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->Max = *PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector2D>(Value->ToObject(Context).ToLocalChecked());
|
||||
}
|
||||
static void _FBox2DbIsValidGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::bIsValid] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Boolean::New(Isolate, Self->bIsValid);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FBox2D, bool>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FBox2DbIsValidSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FBox2D>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FBox2D::bIsValid] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->bIsValid = Value->ToBoolean(Isolate)->Value();
|
||||
}
|
||||
#include "UsingTypeDecl.hpp"
|
||||
|
||||
struct AutoRegisterForFBox2D
|
||||
{
|
||||
AutoRegisterForFBox2D()
|
||||
{
|
||||
PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition;
|
||||
|
||||
static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"Min", _FBox2DMinGet_, _FBox2DMinSet_},
|
||||
{"Max", _FBox2DMaxGet_, _FBox2DMaxSet_}, {"bIsValid", _FBox2DbIsValidGet_, _FBox2DbIsValidSet_}, {0, 0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"op_Equality", FBox2DM_op_Equality},
|
||||
{"op_Inequality", FBox2DM_op_Inequality}, {"op_Addition", FBox2DM_op_Addition}, {"set_Item", FBox2DM_set_Item},
|
||||
{"ComputeSquaredDistanceToPoint", FBox2DM_ComputeSquaredDistanceToPoint}, {"ExpandBy", FBox2DM_ExpandBy},
|
||||
{"GetArea", FBox2DM_GetArea}, {"GetCenter", FBox2DM_GetCenter}, {"GetCenterAndExtents", FBox2DM_GetCenterAndExtents},
|
||||
{"GetClosestPointTo", FBox2DM_GetClosestPointTo}, {"GetExtent", FBox2DM_GetExtent}, {"GetSize", FBox2DM_GetSize},
|
||||
{"Init", FBox2DM_Init}, {"Intersect", FBox2DM_Intersect}, {"IsInside", FBox2DM_IsInside}, {"ShiftBy", FBox2DM_ShiftBy},
|
||||
{"ToString", FBox2DM_ToString}, {0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{0, 0}};
|
||||
|
||||
Def.UETypeName = "Box2D";
|
||||
|
||||
Def.SetInitialize(_FBox2DNew_);
|
||||
Def.Finalize = _FBox2DDelete_;
|
||||
Def.Properties = Properties;
|
||||
Def.Methods = Methods;
|
||||
Def.Functions = Functions;
|
||||
|
||||
PUERTS_NAMESPACE::RegisterJSClass(Def);
|
||||
puerts::DefineClass<FBox2D>()
|
||||
.Constructor(CombineConstructors(MakeConstructor(FBox2D), MakeConstructor(FBox2D, EForceInit),
|
||||
MakeConstructor(FBox2D, const FVector2D&, const FVector2D&), MakeConstructor(FBox2D, const FVector2D*, const int32),
|
||||
MakeConstructor(FBox2D, const TArray<FVector2D>&)))
|
||||
.Property("Min", MakeProperty(&FBox2D::Min))
|
||||
.Property("Max", MakeProperty(&FBox2D::Max))
|
||||
.Property("bIsValid", MakeProperty(&FBox2D::bIsValid))
|
||||
.Method("op_Equality", MakeFunction(&FBox2D::operator==))
|
||||
.Method("op_Inequality", MakeFunction(&FBox2D::operator!=))
|
||||
.Method("op_Addition", CombineOverloads(MakeOverload(FBox2D(FBox2D::*)(const FVector2D&) const, &FBox2D::operator+),
|
||||
MakeOverload(FBox2D(FBox2D::*)(const FBox2D&) const, &FBox2D::operator+)))
|
||||
.Method("set_Item", SelectFunction(FVector2D & (FBox2D::*) (int32), &FBox2D::operator[]))
|
||||
.Method("ComputeSquaredDistanceToPoint", MakeFunction(&FBox2D::ComputeSquaredDistanceToPoint))
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION > 2
|
||||
.Method("ExpandBy", SelectFunction(FBox2D(FBox2D::*)(const double W) const, &FBox2D::ExpandBy))
|
||||
#else
|
||||
.Method("ExpandBy", SelectFunction(FBox2D(FBox2D::*)(const float W) const, &FBox2D::ExpandBy))
|
||||
#endif
|
||||
.Method("GetArea", MakeFunction(&FBox2D::GetArea))
|
||||
.Method("GetCenter", MakeFunction(&FBox2D::GetCenter))
|
||||
.Method("GetCenterAndExtents", MakeFunction(&FBox2D::GetCenterAndExtents))
|
||||
.Method("GetClosestPointTo", MakeFunction(&FBox2D::GetClosestPointTo))
|
||||
.Method("GetExtent", MakeFunction(&FBox2D::GetExtent))
|
||||
.Method("GetSize", MakeFunction(&FBox2D::GetSize))
|
||||
.Method("Init", MakeFunction(&FBox2D::Init))
|
||||
.Method("Intersect", MakeFunction(&FBox2D::Intersect))
|
||||
.Method("IsInside", CombineOverloads(MakeOverload(bool (FBox2D::*)(const FVector2D&) const, &FBox2D::IsInside),
|
||||
MakeOverload(bool (FBox2D::*)(const FBox2D&) const, &FBox2D::IsInside)))
|
||||
.Method("ShiftBy", MakeFunction(&FBox2D::ShiftBy))
|
||||
.Method("ToString", MakeFunction(&FBox2D::ToString))
|
||||
.Register();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -8,552 +8,49 @@
|
||||
|
||||
// gen by puerts gen tools
|
||||
|
||||
#include "GenHeaders.h"
|
||||
#include "CoreMinimal.h"
|
||||
#include "DataTransfer.h"
|
||||
#include "JSClassRegister.h"
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/Color.h', line 483,
|
||||
// column 19> unsupported method : operator+= void (const FColor &) __attribute__((thiscall))
|
||||
|
||||
static void* _FColorNew_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
FColor* Obj = new FColor();
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FColorNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value());
|
||||
FColor* Obj = new FColor(Arg0);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FColorNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 4)
|
||||
{
|
||||
if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber() && Info[3]->IsNumber())
|
||||
{
|
||||
uint8 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
uint8 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
uint8 Arg2 = Info[2]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
uint8 Arg3 = Info[3]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
FColor* Obj = new FColor(Arg0, Arg1, Arg2, Arg3);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FColorNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
uint32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
FColor* Obj = new FColor(Arg0);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FColorNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void _FColorDelete_(void* Ptr, void* ClassData, void* EnvData)
|
||||
{
|
||||
FColor* Self = static_cast<FColor*>(Ptr);
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FColorDelete_:%p"), Self);
|
||||
delete Self;
|
||||
}
|
||||
static void FColorM_DWColor(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_DWColor] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->DWColor();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_DWColor] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->DWColor();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_op_Equality(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FColor>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FColor* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_op_Equality] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator==(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_op_Inequality(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FColor>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FColor* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_op_Inequality] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator!=(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_FromRGBE(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_FromRGBE] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->FromRGBE();
|
||||
void* Ptr = new FLinearColor(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FLinearColor>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorS_FromHex(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsString())
|
||||
{
|
||||
const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0])));
|
||||
auto MethodResult = FColor::FromHex(Arg0);
|
||||
void* Ptr = new FColor(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FColor>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorS_MakeRandomColor(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto MethodResult = FColor::MakeRandomColor();
|
||||
void* Ptr = new FColor(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FColor>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorS_MakeRedToGreenColorFromScalar(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value();
|
||||
auto MethodResult = FColor::MakeRedToGreenColorFromScalar(Arg0);
|
||||
void* Ptr = new FColor(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FColor>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorS_MakeFromColorTemperature(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
float Arg0 = Info[0]->ToNumber(Context).ToLocalChecked()->Value();
|
||||
auto MethodResult = FColor::MakeFromColorTemperature(Arg0);
|
||||
void* Ptr = new FColor(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FColor>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_WithAlpha(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
uint8 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_WithAlpha] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->WithAlpha(Arg0);
|
||||
void* Ptr = new FColor(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FColor>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_ReinterpretAsLinear(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_ReinterpretAsLinear] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ReinterpretAsLinear();
|
||||
void* Ptr = new FLinearColor(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FLinearColor>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_ToHex(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FColor::M_ToHex] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToHex();
|
||||
auto V8Result =
|
||||
v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked();
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_ToString(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_ToString] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToString();
|
||||
auto V8Result =
|
||||
v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked();
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_InitFromString(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsString())
|
||||
{
|
||||
const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0])));
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_InitFromString] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->InitFromString(Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_ToPackedARGB(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_ToPackedARGB] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToPackedARGB();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_ToPackedABGR(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_ToPackedABGR] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToPackedABGR();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_ToPackedRGBA(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_ToPackedRGBA] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToPackedRGBA();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FColorM_ToPackedBGRA(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FColor>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FColor::M_ToPackedBGRA] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToPackedBGRA();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
#include "UsingTypeDecl.hpp"
|
||||
|
||||
struct AutoRegisterForFColor
|
||||
{
|
||||
AutoRegisterForFColor()
|
||||
{
|
||||
PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition;
|
||||
|
||||
static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{0, 0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"DWColor", FColorM_DWColor}, {"op_Equality", FColorM_op_Equality},
|
||||
{"op_Inequality", FColorM_op_Inequality}, {"FromRGBE", FColorM_FromRGBE}, {"WithAlpha", FColorM_WithAlpha},
|
||||
{"ReinterpretAsLinear", FColorM_ReinterpretAsLinear}, {"ToHex", FColorM_ToHex}, {"ToString", FColorM_ToString},
|
||||
{"InitFromString", FColorM_InitFromString}, {"ToPackedARGB", FColorM_ToPackedARGB},
|
||||
{"ToPackedABGR", FColorM_ToPackedABGR}, {"ToPackedRGBA", FColorM_ToPackedRGBA}, {"ToPackedBGRA", FColorM_ToPackedBGRA},
|
||||
{0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"FromHex", FColorS_FromHex},
|
||||
{"MakeRandomColor", FColorS_MakeRandomColor}, {"MakeRedToGreenColorFromScalar", FColorS_MakeRedToGreenColorFromScalar},
|
||||
{"MakeFromColorTemperature", FColorS_MakeFromColorTemperature}, {0, 0}};
|
||||
|
||||
Def.UETypeName = "Color";
|
||||
|
||||
Def.SetInitialize(_FColorNew_);
|
||||
Def.Finalize = _FColorDelete_;
|
||||
Def.Properties = Properties;
|
||||
Def.Methods = Methods;
|
||||
Def.Functions = Functions;
|
||||
|
||||
PUERTS_NAMESPACE::RegisterJSClass(Def);
|
||||
puerts::DefineClass<FColor>()
|
||||
.Constructor(CombineConstructors(MakeConstructor(FColor), MakeConstructor(FColor, EForceInit),
|
||||
MakeConstructor(FColor, uint8, uint8, uint8, uint8), MakeConstructor(FColor, uint32)))
|
||||
.Method("DWColor", CombineOverloads(MakeOverload(uint32 & (FColor::*) (), &FColor::DWColor),
|
||||
MakeOverload(const uint32& (FColor::*) () const, &FColor::DWColor)))
|
||||
.Method("op_Equality", MakeFunction(&FColor::operator==))
|
||||
.Method("op_Inequality", MakeFunction(&FColor::operator!=))
|
||||
.Method("FromRGBE", MakeFunction(&FColor::FromRGBE))
|
||||
.Function("FromHex", MakeFunction(&FColor::FromHex))
|
||||
.Function("MakeRandomColor", MakeFunction(&FColor::MakeRandomColor))
|
||||
.Function("MakeRedToGreenColorFromScalar", MakeFunction(&FColor::MakeRedToGreenColorFromScalar))
|
||||
.Function("MakeFromColorTemperature", MakeFunction(&FColor::MakeFromColorTemperature))
|
||||
.Method("WithAlpha", MakeFunction(&FColor::WithAlpha))
|
||||
.Method("ReinterpretAsLinear", MakeFunction(&FColor::ReinterpretAsLinear))
|
||||
.Method("ToHex", MakeFunction(&FColor::ToHex))
|
||||
.Method("ToString", MakeFunction(&FColor::ToString))
|
||||
.Method("InitFromString", MakeFunction(&FColor::InitFromString))
|
||||
.Method("ToPackedARGB", MakeFunction(&FColor::ToPackedARGB))
|
||||
.Method("ToPackedABGR", MakeFunction(&FColor::ToPackedABGR))
|
||||
.Method("ToPackedRGBA", MakeFunction(&FColor::ToPackedRGBA))
|
||||
.Method("ToPackedBGRA", MakeFunction(&FColor::ToPackedBGRA))
|
||||
.Variable("White", MakeReadonlyVariable(&FColor::White))
|
||||
.Variable("Black", MakeReadonlyVariable(&FColor::Black))
|
||||
.Variable("Transparent", MakeReadonlyVariable(&FColor::Transparent))
|
||||
.Variable("Red", MakeReadonlyVariable(&FColor::Red))
|
||||
.Variable("Green", MakeReadonlyVariable(&FColor::Green))
|
||||
.Variable("Blue", MakeReadonlyVariable(&FColor::Blue))
|
||||
.Variable("Yellow", MakeReadonlyVariable(&FColor::Yellow))
|
||||
.Variable("Cyan", MakeReadonlyVariable(&FColor::Cyan))
|
||||
.Variable("Magenta", MakeReadonlyVariable(&FColor::Magenta))
|
||||
.Variable("Orange", MakeReadonlyVariable(&FColor::Orange))
|
||||
.Variable("Purple", MakeReadonlyVariable(&FColor::Purple))
|
||||
.Variable("Turquoise", MakeReadonlyVariable(&FColor::Turquoise))
|
||||
.Variable("Silver", MakeReadonlyVariable(&FColor::Silver))
|
||||
.Variable("Emerald", MakeReadonlyVariable(&FColor::Emerald))
|
||||
.Register();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -8,416 +8,33 @@
|
||||
|
||||
// gen by puerts gen tools
|
||||
|
||||
#include "GenHeaders.h"
|
||||
#include "CoreMinimal.h"
|
||||
#include "DataTransfer.h"
|
||||
#include "JSClassRegister.h"
|
||||
|
||||
static void* _FGuidNew_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
FGuid* Obj = new FGuid();
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FGuidNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 4)
|
||||
{
|
||||
if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber() && Info[3]->IsNumber())
|
||||
{
|
||||
uint32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
uint32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
uint32 Arg2 = Info[2]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
uint32 Arg3 = Info[3]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
FGuid* Obj = new FGuid(Arg0, Arg1, Arg2, Arg3);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FGuidNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void _FGuidDelete_(void* Ptr, void* ClassData, void* EnvData)
|
||||
{
|
||||
FGuid* Self = static_cast<FGuid*>(Ptr);
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FGuidDelete_:%p"), Self);
|
||||
delete Self;
|
||||
}
|
||||
static void FGuidM_set_Item(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FGuid::M_set_Item] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
Self->operator[](Arg0);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FGuidM_get_Item(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FGuid::M_get_Item] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator[](Arg0);
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FGuidM_Invalidate(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FGuid::M_Invalidate] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
Self->Invalidate();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FGuidM_IsValid(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::M_IsValid] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->IsValid();
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FGuidM_ToString(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FGuid::M_ToString] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToString();
|
||||
auto V8Result =
|
||||
v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked();
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
EGuidFormats Arg0 = EGuidFormats(Info[0]->ToInt32(Context).ToLocalChecked()->Value());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FGuid::M_ToString] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToString(Arg0);
|
||||
auto V8Result =
|
||||
v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked();
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FGuidS_NewGuid(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto MethodResult = FGuid::NewGuid();
|
||||
void* Ptr = new FGuid(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FGuid>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FGuidS_Parse(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 2)
|
||||
{
|
||||
if (Info[0]->IsString() && Info[1]->IsObject() && PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FGuid>(
|
||||
Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0])));
|
||||
FGuid* Arg1 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(
|
||||
PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[1])->ToObject(Context).ToLocalChecked());
|
||||
auto MethodResult = FGuid::Parse(Arg0, *Arg1);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FGuidS_ParseExact(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 3)
|
||||
{
|
||||
if (Info[0]->IsString() && Info[1]->IsNumber() && Info[2]->IsObject() &&
|
||||
PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FGuid>(
|
||||
Isolate, PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FString Arg0 = UTF8_TO_TCHAR(*(v8::String::Utf8Value(Isolate, Info[0])));
|
||||
EGuidFormats Arg1 = EGuidFormats(Info[1]->ToInt32(Context).ToLocalChecked()->Value());
|
||||
FGuid* Arg2 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(
|
||||
PUERTS_NAMESPACE::DataTransfer::UnRef(Isolate, Info[2])->ToObject(Context).ToLocalChecked());
|
||||
auto MethodResult = FGuid::ParseExact(Arg0, Arg1, *Arg2);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void _FGuidAGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::A] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Integer::New(Isolate, Self->A);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FGuid, uint32>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FGuidASet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::A] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->A = Value->ToInteger(Context).ToLocalChecked()->Value();
|
||||
}
|
||||
static void _FGuidBGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::B] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Integer::New(Isolate, Self->B);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FGuid, uint32>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FGuidBSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::B] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->B = Value->ToInteger(Context).ToLocalChecked()->Value();
|
||||
}
|
||||
static void _FGuidCGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::C] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Integer::New(Isolate, Self->C);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FGuid, uint32>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FGuidCSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::C] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->C = Value->ToInteger(Context).ToLocalChecked()->Value();
|
||||
}
|
||||
static void _FGuidDGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::D] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Integer::New(Isolate, Self->D);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FGuid, uint32>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FGuidDSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FGuid>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FGuid::D] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->D = Value->ToInteger(Context).ToLocalChecked()->Value();
|
||||
}
|
||||
#include "UsingTypeDecl.hpp"
|
||||
|
||||
struct AutoRegisterForFGuid
|
||||
{
|
||||
AutoRegisterForFGuid()
|
||||
{
|
||||
PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition;
|
||||
|
||||
static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"A", _FGuidAGet_, _FGuidASet_}, {"B", _FGuidBGet_, _FGuidBSet_},
|
||||
{"C", _FGuidCGet_, _FGuidCSet_}, {"D", _FGuidDGet_, _FGuidDSet_}, {0, 0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"set_Item", FGuidM_set_Item}, {"get_Item", FGuidM_get_Item},
|
||||
{"Invalidate", FGuidM_Invalidate}, {"IsValid", FGuidM_IsValid}, {"ToString", FGuidM_ToString}, {0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {
|
||||
{"NewGuid", FGuidS_NewGuid}, {"Parse", FGuidS_Parse}, {"ParseExact", FGuidS_ParseExact}, {0, 0}};
|
||||
|
||||
Def.UETypeName = "Guid";
|
||||
|
||||
Def.SetInitialize(_FGuidNew_);
|
||||
Def.Finalize = _FGuidDelete_;
|
||||
Def.Properties = Properties;
|
||||
Def.Methods = Methods;
|
||||
Def.Functions = Functions;
|
||||
|
||||
PUERTS_NAMESPACE::RegisterJSClass(Def);
|
||||
puerts::DefineClass<FGuid>()
|
||||
.Constructor(CombineConstructors(MakeConstructor(FGuid), MakeConstructor(FGuid, uint32, uint32, uint32, uint32)))
|
||||
.Property("A", MakeProperty(&FGuid::A))
|
||||
.Property("B", MakeProperty(&FGuid::B))
|
||||
.Property("C", MakeProperty(&FGuid::C))
|
||||
.Property("D", MakeProperty(&FGuid::D))
|
||||
.Method("set_Item", SelectFunction(uint32 & (FGuid::*) (int32), &FGuid::operator[]))
|
||||
.Method("get_Item", SelectFunction(const uint32& (FGuid::*) (int32) const, &FGuid::operator[]))
|
||||
.Method("Invalidate", MakeFunction(&FGuid::Invalidate))
|
||||
.Method("IsValid", MakeFunction(&FGuid::IsValid))
|
||||
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION > 2
|
||||
.Method("ToString", MakeFunction(&FGuid::ToString, EGuidFormats::Digits))
|
||||
#else
|
||||
.Method("ToString", CombineOverloads(MakeOverload(FString(FGuid::*)() const, &FGuid::ToString),
|
||||
MakeOverload(FString(FGuid::*)(EGuidFormats Format) const, &FGuid::ToString)))
|
||||
#endif
|
||||
.Function("NewGuid", MakeFunction(&FGuid::NewGuid))
|
||||
.Function("Parse", MakeFunction(&FGuid::Parse))
|
||||
.Function("ParseExact", MakeFunction(&FGuid::ParseExact))
|
||||
.Register();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -8,717 +8,44 @@
|
||||
|
||||
// gen by puerts gen tools
|
||||
|
||||
#include "GenHeaders.h"
|
||||
#include "CoreMinimal.h"
|
||||
#include "DataTransfer.h"
|
||||
#include "JSClassRegister.h"
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntPoint.h', line 60,
|
||||
// column 15> unsupported method : operator() const int32 &(int32) __attribute__((thiscall)) const
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntPoint.h', line 68,
|
||||
// column 9> unsupported method : operator() int32 &(int32) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntPoint.h', line 92,
|
||||
// column 13> unsupported method : operator*= FIntPoint &(int32) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntPoint.h', line 100,
|
||||
// column 13> unsupported method : operator/= FIntPoint &(int32) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntPoint.h', line 108,
|
||||
// column 13> unsupported method : operator+= FIntPoint &(const FIntPoint &) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntPoint.h', line 116,
|
||||
// column 13> unsupported method : operator-= FIntPoint &(const FIntPoint &) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntPoint.h', line 124,
|
||||
// column 13> unsupported method : operator/= FIntPoint &(const FIntPoint &) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntPoint.h', line 132,
|
||||
// column 13> unsupported method : operator= FIntPoint &(const FIntPoint &) __attribute__((thiscall))
|
||||
|
||||
static void* _FIntPointNew_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
FIntPoint* Obj = new FIntPoint();
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntPointNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 2)
|
||||
{
|
||||
if (Info[0]->IsNumber() && Info[1]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
FIntPoint* Obj = new FIntPoint(Arg0, Arg1);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntPointNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value());
|
||||
FIntPoint* Obj = new FIntPoint(Arg0);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntPointNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void _FIntPointDelete_(void* Ptr, void* ClassData, void* EnvData)
|
||||
{
|
||||
FIntPoint* Self = static_cast<FIntPoint*>(Ptr);
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntPointDelete_:%p"), Self);
|
||||
delete Self;
|
||||
}
|
||||
static void FIntPointM_op_Equality(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_op_Equality] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator==(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_op_Inequality(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_op_Inequality] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator!=(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_op_Multiply(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_op_Multiply] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator*(Arg0);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_op_Division(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_op_Division] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator/(Arg0);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_op_Division] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator/(*Arg0);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_op_Addition(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_op_Addition] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator+(*Arg0);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_op_Subtraction(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_op_Subtraction] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator-(*Arg0);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_set_Item(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_set_Item] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
Self->operator[](Arg0);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_get_Item(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_get_Item] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator[](Arg0);
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_ComponentMin(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_ComponentMin] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ComponentMin(*Arg0);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_ComponentMax(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_ComponentMax] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ComponentMax(*Arg0);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_GetMax(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_GetMax] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->GetMax();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_GetMin(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_GetMin] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->GetMin();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_Size(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_Size] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->Size();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_SizeSquared(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_SizeSquared] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->SizeSquared();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointM_ToString(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntPoint::M_ToString] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToString();
|
||||
auto V8Result =
|
||||
v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked();
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointS_DivideAndRoundUp(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 2)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) &&
|
||||
Info[1]->IsNumber())
|
||||
{
|
||||
FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto MethodResult = FIntPoint::DivideAndRoundUp(*Arg0, Arg1);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 2)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) &&
|
||||
Info[1]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[1]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
FIntPoint* Arg1 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[1]->ToObject(Context).ToLocalChecked());
|
||||
auto MethodResult = FIntPoint::DivideAndRoundUp(*Arg0, *Arg1);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointS_DivideAndRoundDown(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 2)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntPoint>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) &&
|
||||
Info[1]->IsNumber())
|
||||
{
|
||||
FIntPoint* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto MethodResult = FIntPoint::DivideAndRoundDown(*Arg0, Arg1);
|
||||
void* Ptr = new FIntPoint(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntPoint>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntPointS_Num(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto MethodResult = FIntPoint::Num();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void _FIntPointXGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntPoint::X] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Integer::New(Isolate, Self->X);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FIntPoint, int32>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FIntPointXSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntPoint::X] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->X = Value->ToInteger(Context).ToLocalChecked()->Value();
|
||||
}
|
||||
static void _FIntPointYGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntPoint::Y] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Integer::New(Isolate, Self->Y);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FIntPoint, int32>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FIntPointYSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntPoint>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntPoint::Y] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->Y = Value->ToInteger(Context).ToLocalChecked()->Value();
|
||||
}
|
||||
#include "UsingTypeDecl.hpp"
|
||||
|
||||
struct AutoRegisterForFIntPoint
|
||||
{
|
||||
AutoRegisterForFIntPoint()
|
||||
{
|
||||
PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition;
|
||||
|
||||
static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {
|
||||
{"X", _FIntPointXGet_, _FIntPointXSet_}, {"Y", _FIntPointYGet_, _FIntPointYSet_}, {0, 0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"op_Equality", FIntPointM_op_Equality},
|
||||
{"op_Inequality", FIntPointM_op_Inequality}, {"op_Multiply", FIntPointM_op_Multiply},
|
||||
{"op_Division", FIntPointM_op_Division}, {"op_Addition", FIntPointM_op_Addition},
|
||||
{"op_Subtraction", FIntPointM_op_Subtraction}, {"set_Item", FIntPointM_set_Item}, {"get_Item", FIntPointM_get_Item},
|
||||
{"ComponentMin", FIntPointM_ComponentMin}, {"ComponentMax", FIntPointM_ComponentMax}, {"GetMax", FIntPointM_GetMax},
|
||||
{"GetMin", FIntPointM_GetMin}, {"Size", FIntPointM_Size}, {"SizeSquared", FIntPointM_SizeSquared},
|
||||
{"ToString", FIntPointM_ToString}, {0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {{"DivideAndRoundUp", FIntPointS_DivideAndRoundUp},
|
||||
{"DivideAndRoundDown", FIntPointS_DivideAndRoundDown}, {"Num", FIntPointS_Num}, {0, 0}};
|
||||
|
||||
Def.UETypeName = "IntPoint";
|
||||
|
||||
Def.SetInitialize(_FIntPointNew_);
|
||||
Def.Finalize = _FIntPointDelete_;
|
||||
Def.Properties = Properties;
|
||||
Def.Methods = Methods;
|
||||
Def.Functions = Functions;
|
||||
|
||||
PUERTS_NAMESPACE::RegisterJSClass(Def);
|
||||
puerts::DefineClass<FIntPoint>()
|
||||
.Constructor(CombineConstructors(
|
||||
MakeConstructor(FIntPoint), MakeConstructor(FIntPoint, int32, int32), MakeConstructor(FIntPoint, EForceInit)))
|
||||
.Property("X", MakeProperty(&FIntPoint::X))
|
||||
.Property("Y", MakeProperty(&FIntPoint::Y))
|
||||
.Method("op_Equality", MakeFunction(&FIntPoint::operator==))
|
||||
.Method("op_Inequality", MakeFunction(&FIntPoint::operator!=))
|
||||
.Method("op_Multiply", SelectFunction(FIntPoint(FIntPoint::*)(int32 Scale) const, &FIntPoint::operator*))
|
||||
.Method("op_Division", CombineOverloads(MakeOverload(FIntPoint(FIntPoint::*)(int32) const, &FIntPoint::operator/),
|
||||
MakeOverload(FIntPoint(FIntPoint::*)(const FIntPoint&) const, &FIntPoint::operator/)))
|
||||
.Method("op_Addition", MakeFunction(&FIntPoint::operator+))
|
||||
.Method("op_Subtraction", MakeFunction(&FIntPoint::operator-))
|
||||
.Method("set_Item", SelectFunction(int32 & (FIntPoint::*) (int32), &FIntPoint::operator[]))
|
||||
.Method("get_Item", SelectFunction(int32(FIntPoint::*)(int32) const, &FIntPoint::operator[]))
|
||||
.Method("ComponentMin", MakeFunction(&FIntPoint::ComponentMin))
|
||||
.Method("ComponentMax", MakeFunction(&FIntPoint::ComponentMax))
|
||||
.Method("GetMax", MakeFunction(&FIntPoint::GetMax))
|
||||
.Method("GetMin", MakeFunction(&FIntPoint::GetMin))
|
||||
.Method("Size", MakeFunction(&FIntPoint::Size))
|
||||
.Method("SizeSquared", MakeFunction(&FIntPoint::SizeSquared))
|
||||
.Method("ToString", MakeFunction(&FIntPoint::ToString))
|
||||
.Function(
|
||||
"DivideAndRoundUp", CombineOverloads(MakeOverload(FIntPoint(*)(FIntPoint, int32), &FIntPoint::DivideAndRoundUp),
|
||||
MakeOverload(FIntPoint(*)(FIntPoint, FIntPoint), &FIntPoint::DivideAndRoundUp)))
|
||||
.Function(
|
||||
"DivideAndRoundDown", SelectFunction(FIntPoint(*)(FIntPoint lhs, int32 Divisor), &FIntPoint::DivideAndRoundDown))
|
||||
.Function("Num", MakeFunction(&FIntPoint::Num))
|
||||
.Variable("ZeroValue", MakeReadonlyVariable(&FIntPoint::ZeroValue))
|
||||
.Variable("NoneValue", MakeReadonlyVariable(&FIntPoint::NoneValue))
|
||||
.Register();
|
||||
}
|
||||
};
|
||||
|
||||
AutoRegisterForFIntPoint _AutoRegisterForFIntPoint_;
|
||||
AutoRegisterForFIntPoint _AutoRegisterForFIntPoint_;
|
||||
|
||||
@@ -8,640 +8,40 @@
|
||||
|
||||
// gen by puerts gen tools
|
||||
|
||||
#include "GenHeaders.h"
|
||||
#include "CoreMinimal.h"
|
||||
#include "DataTransfer.h"
|
||||
#include "JSClassRegister.h"
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 78,
|
||||
// column 15> unsupported method : operator() const int32 &(int32) __attribute__((thiscall)) const
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 86,
|
||||
// column 9> unsupported method : operator() int32 &(int32) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 126,
|
||||
// column 14> unsupported method : operator*= FIntVector &(int32) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 134,
|
||||
// column 14> unsupported method : operator/= FIntVector &(int32) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 142,
|
||||
// column 14> unsupported method : operator+= FIntVector &(const FIntVector &) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 150,
|
||||
// column 14> unsupported method : operator-= FIntVector &(const FIntVector &) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 158,
|
||||
// column 14> unsupported method : operator= FIntVector &(const FIntVector &) __attribute__((thiscall))
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 198,
|
||||
// column 13> unsupported method : operator>> FIntVector (int32) __attribute__((thiscall)) const
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 206,
|
||||
// column 13> unsupported method : operator<< FIntVector (int32) __attribute__((thiscall)) const
|
||||
|
||||
// <SourceLocation file 'D:\\Program Files\\Epic Games\\UE_4.24\\Engine\\Source\\Runtime\\Core\\Public\\Math/IntVector.h', line 214,
|
||||
// column 13> unsupported method : operator& FIntVector (int32) __attribute__((thiscall)) const
|
||||
|
||||
static void* _FIntVectorNew_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
FIntVector* Obj = new FIntVector();
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 3)
|
||||
{
|
||||
if (Info[0]->IsNumber() && Info[1]->IsNumber() && Info[2]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
int32 Arg2 = Info[2]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
FIntVector* Obj = new FIntVector(Arg0, Arg1, Arg2);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
FIntVector* Obj = new FIntVector(Arg0);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FVector>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
FVector* Arg0 = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FVector>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
FIntVector* Obj = new FIntVector(*Arg0);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
EForceInit Arg0 = EForceInit(Info[0]->ToInt32(Context).ToLocalChecked()->Value());
|
||||
FIntVector* Obj = new FIntVector(Arg0);
|
||||
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntVectorNew_:%p"), Obj);
|
||||
return Obj;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void _FIntVectorDelete_(void* Ptr, void* ClassData, void* EnvData)
|
||||
{
|
||||
FIntVector* Self = static_cast<FIntVector*>(Ptr);
|
||||
// UE_LOG(LogTemp, Warning, TEXT("_FIntVectorDelete_:%p"), Self);
|
||||
delete Self;
|
||||
}
|
||||
static void FIntVectorM_get_Item(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_get_Item] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator[](Arg0);
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_set_Item(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_set_Item] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
Self->operator[](Arg0);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_op_Equality(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntVector>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntVector* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_op_Equality] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator==(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_op_Inequality(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntVector>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntVector* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_op_Inequality] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator!=(*Arg0);
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_op_Multiply(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_op_Multiply] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator*(Arg0);
|
||||
void* Ptr = new FIntVector(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntVector>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_op_Division(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsNumber())
|
||||
{
|
||||
int32 Arg0 = Info[0]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_op_Division] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator/(Arg0);
|
||||
void* Ptr = new FIntVector(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntVector>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_op_Addition(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntVector>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntVector* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_op_Addition] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator+(*Arg0);
|
||||
void* Ptr = new FIntVector(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntVector>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_op_Subtraction(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 1)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntVector>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()))
|
||||
{
|
||||
const FIntVector* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_op_Subtraction] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->operator-(*Arg0);
|
||||
void* Ptr = new FIntVector(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntVector>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_IsZero(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_IsZero] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->IsZero();
|
||||
auto V8Result = v8::Boolean::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_GetMax(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_GetMax] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->GetMax();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_GetMin(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_GetMin] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->GetMin();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_Size(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_Size] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->Size();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorM_ToString(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(
|
||||
Isolate, "[FIntVector::M_ToString] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto MethodResult = Self->ToString();
|
||||
auto V8Result =
|
||||
v8::String::NewFromUtf8(Isolate, TCHAR_TO_UTF8(*MethodResult), v8::NewStringType::kNormal).ToLocalChecked();
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorS_DivideAndRoundUp(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 2)
|
||||
{
|
||||
if (Info[0]->IsObject() &&
|
||||
|
||||
PUERTS_NAMESPACE::DataTransfer::IsInstanceOf<FIntVector>(Isolate, Info[0]->ToObject(Context).ToLocalChecked()) &&
|
||||
Info[1]->IsNumber())
|
||||
{
|
||||
FIntVector* Arg0 =
|
||||
PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info[0]->ToObject(Context).ToLocalChecked());
|
||||
int32 Arg1 = Info[1]->ToInteger(Context).ToLocalChecked()->Value();
|
||||
auto MethodResult = FIntVector::DivideAndRoundUp(*Arg0, Arg1);
|
||||
void* Ptr = new FIntVector(MethodResult);
|
||||
|
||||
auto V8Result = PUERTS_NAMESPACE::DataTransfer::FindOrAddStruct<FIntVector>(Isolate, Context, Ptr, false);
|
||||
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void FIntVectorS_Num(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
if (Info.Length() == 0)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
auto MethodResult = FIntVector::Num();
|
||||
auto V8Result = v8::Integer::New(Isolate, MethodResult);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "Invalid argument!");
|
||||
}
|
||||
|
||||
static void _FIntVectorXGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::X] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Integer::New(Isolate, Self->X);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FIntVector, int32>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FIntVectorXSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::X] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->X = Value->ToInteger(Context).ToLocalChecked()->Value();
|
||||
}
|
||||
static void _FIntVectorYGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::Y] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Integer::New(Isolate, Self->Y);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FIntVector, int32>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FIntVectorYSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::Y] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->Y = Value->ToInteger(Context).ToLocalChecked()->Value();
|
||||
}
|
||||
static void _FIntVectorZGet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::Z] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
auto V8Result = v8::Integer::New(Isolate, Self->Z);
|
||||
PUERTS_NAMESPACE::DataTransfer::LinkOuter<FIntVector, int32>(Context, Info.Holder(), V8Result);
|
||||
Info.GetReturnValue().Set(V8Result);
|
||||
}
|
||||
static void _FIntVectorZSet_(const v8::FunctionCallbackInfo<v8::Value>& Info)
|
||||
{
|
||||
v8::Isolate* Isolate = Info.GetIsolate();
|
||||
v8::Local<v8::Context> Context = Isolate->GetCurrentContext();
|
||||
|
||||
auto Self = PUERTS_NAMESPACE::DataTransfer::GetPointerFast<FIntVector>(Info.Holder());
|
||||
if (!Self)
|
||||
{
|
||||
PUERTS_NAMESPACE::DataTransfer::ThrowException(Isolate, "[FIntVector::Z] Attempt to access a NULL self pointer");
|
||||
return;
|
||||
}
|
||||
auto Value = Info[0];
|
||||
|
||||
Self->Z = Value->ToInteger(Context).ToLocalChecked()->Value();
|
||||
}
|
||||
#include "UsingTypeDecl.hpp"
|
||||
|
||||
struct AutoRegisterForFIntVector
|
||||
{
|
||||
AutoRegisterForFIntVector()
|
||||
{
|
||||
PUERTS_NAMESPACE::JSClassDefinition Def = JSClassEmptyDefinition;
|
||||
|
||||
static PUERTS_NAMESPACE::JSPropertyInfo Properties[] = {{"X", _FIntVectorXGet_, _FIntVectorXSet_},
|
||||
{"Y", _FIntVectorYGet_, _FIntVectorYSet_}, {"Z", _FIntVectorZGet_, _FIntVectorZSet_}, {0, 0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Methods[] = {{"get_Item", FIntVectorM_get_Item}, {"set_Item", FIntVectorM_set_Item},
|
||||
{"op_Equality", FIntVectorM_op_Equality}, {"op_Inequality", FIntVectorM_op_Inequality},
|
||||
{"op_Multiply", FIntVectorM_op_Multiply}, {"op_Division", FIntVectorM_op_Division},
|
||||
{"op_Addition", FIntVectorM_op_Addition}, {"op_Subtraction", FIntVectorM_op_Subtraction},
|
||||
{"IsZero", FIntVectorM_IsZero}, {"GetMax", FIntVectorM_GetMax}, {"GetMin", FIntVectorM_GetMin},
|
||||
{"Size", FIntVectorM_Size}, {"ToString", FIntVectorM_ToString}, {0, 0}};
|
||||
|
||||
static PUERTS_NAMESPACE::JSFunctionInfo Functions[] = {
|
||||
{"DivideAndRoundUp", FIntVectorS_DivideAndRoundUp}, {"Num", FIntVectorS_Num}, {0, 0}};
|
||||
|
||||
Def.UETypeName = "IntVector";
|
||||
|
||||
Def.SetInitialize(_FIntVectorNew_);
|
||||
Def.Finalize = _FIntVectorDelete_;
|
||||
Def.Properties = Properties;
|
||||
Def.Methods = Methods;
|
||||
Def.Functions = Functions;
|
||||
|
||||
PUERTS_NAMESPACE::RegisterJSClass(Def);
|
||||
puerts::DefineClass<FIntVector>()
|
||||
.Constructor(CombineConstructors(MakeConstructor(FIntVector), MakeConstructor(FIntVector, int32, int32, int32),
|
||||
MakeConstructor(FIntVector, int32), MakeConstructor(FIntVector, FVector), MakeConstructor(FIntVector, EForceInit)))
|
||||
.Property("X", MakeProperty(&FIntVector::X))
|
||||
.Property("Y", MakeProperty(&FIntVector::Y))
|
||||
.Property("Z", MakeProperty(&FIntVector::Z))
|
||||
.Method("get_Item", SelectFunction(const int32& (FIntVector::*) (int32) const, &FIntVector::operator[]))
|
||||
.Method("set_Item", SelectFunction(int32 & (FIntVector::*) (int32), &FIntVector::operator[]))
|
||||
.Method("op_Equality", MakeFunction(&FIntVector::operator==))
|
||||
.Method("op_Inequality", MakeFunction(&FIntVector::operator!=))
|
||||
.Method("op_Multiply", SelectFunction(FIntVector(FIntVector::*)(int32 Scale) const, &FIntVector::operator*))
|
||||
.Method("op_Division", MakeFunction(&FIntVector::operator/))
|
||||
.Method("op_Addition", MakeFunction(&FIntVector::operator+))
|
||||
.Method("op_Subtraction", MakeFunction(&FIntVector::operator-))
|
||||
.Method("IsZero", MakeFunction(&FIntVector::IsZero))
|
||||
.Method("GetMax", MakeFunction(&FIntVector::GetMax))
|
||||
.Method("GetMin", MakeFunction(&FIntVector::GetMin))
|
||||
.Method("Size", MakeFunction(&FIntVector::Size))
|
||||
.Method("ToString", MakeFunction(&FIntVector::ToString))
|
||||
.Function(
|
||||
"DivideAndRoundUp", CombineOverloads(MakeOverload(FIntVector(*)(FIntVector, int32), &FIntVector::DivideAndRoundUp),
|
||||
MakeOverload(FIntVector(*)(FIntVector, FIntVector), &FIntVector::DivideAndRoundUp)))
|
||||
.Function("Num", MakeFunction(&FIntVector::Num))
|
||||
.Variable("ZeroValue", MakeReadonlyVariable(&FIntVector::ZeroValue))
|
||||
.Variable("NoneValue", MakeReadonlyVariable(&FIntVector::NoneValue))
|
||||
.Register();
|
||||
}
|
||||
};
|
||||
|
||||
AutoRegisterForFIntVector _AutoRegisterForFIntVector_;
|
||||
AutoRegisterForFIntVector _AutoRegisterForFIntVector_;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,66 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(ENGINE_INDEPENDENT_JSENV)
|
||||
#include "Engine/NetworkObjectList.h"
|
||||
#include "TimerManager.h"
|
||||
#include "Materials/MaterialInstanceDynamic.h"
|
||||
#include "Containers/Array.h"
|
||||
#include "DisplayDebugHelpers.h"
|
||||
#include "Engine/BlueprintGeneratedClass.h"
|
||||
#include "Engine/ActorChannel.h"
|
||||
#include "Engine/NetConnection.h"
|
||||
#include "Engine/Canvas.h"
|
||||
#include "GameFramework/Actor.h"
|
||||
#include "GameFramework/CameraBlockingVolume.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "GameFramework/CharacterMovementComponent.h"
|
||||
#include "GameFramework/CheatManager.h"
|
||||
#include "GameFramework/Controller.h"
|
||||
#include "GameFramework/DamageType.h"
|
||||
#include "GameFramework/DebugTextInfo.h"
|
||||
#include "GameFramework/DefaultPawn.h"
|
||||
#include "GameFramework/DefaultPhysicsVolume.h"
|
||||
#include "GameFramework/EngineMessage.h"
|
||||
#include "GameFramework/FloatingPawnMovement.h"
|
||||
#include "GameFramework/ForceFeedbackAttenuation.h"
|
||||
#include "GameFramework/ForceFeedbackEffect.h"
|
||||
#include "GameFramework/GameMode.h"
|
||||
#include "GameFramework/GameModeBase.h"
|
||||
#include "GameFramework/GameNetworkManager.h"
|
||||
#include "GameFramework/GameSession.h"
|
||||
#include "GameFramework/GameState.h"
|
||||
#include "GameFramework/GameStateBase.h"
|
||||
#include "GameFramework/GameUserSettings.h"
|
||||
#include "GameFramework/HUD.h"
|
||||
#include "GameFramework/HUDHitBox.h"
|
||||
#include "GameFramework/Info.h"
|
||||
#include "GameFramework/InputSettings.h"
|
||||
#include "GameFramework/KillZVolume.h"
|
||||
#include "GameFramework/LocalMessage.h"
|
||||
#include "GameFramework/MovementComponent.h"
|
||||
#include "GameFramework/NavMovementComponent.h"
|
||||
#include "GameFramework/OnlineReplStructs.h"
|
||||
#include "GameFramework/OnlineSession.h"
|
||||
#include "GameFramework/PainCausingVolume.h"
|
||||
#include "GameFramework/Pawn.h"
|
||||
#include "GameFramework/PawnMovementComponent.h"
|
||||
#include "GameFramework/PhysicsVolume.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "GameFramework/PlayerInput.h"
|
||||
#include "GameFramework/PlayerMuteList.h"
|
||||
#include "GameFramework/PlayerStart.h"
|
||||
#include "GameFramework/PlayerState.h"
|
||||
#include "GameFramework/ProjectileMovementComponent.h"
|
||||
#include "GameFramework/RootMotionSource.h"
|
||||
#include "GameFramework/RotatingMovementComponent.h"
|
||||
#include "GameFramework/SaveGame.h"
|
||||
#include "GameFramework/SimpleReticle.h"
|
||||
#include "GameFramework/SpectatorPawn.h"
|
||||
#include "GameFramework/SpectatorPawnMovement.h"
|
||||
#include "GameFramework/SpringArmComponent.h"
|
||||
#include "GameFramework/TouchInterface.h"
|
||||
#include "GameFramework/Volume.h"
|
||||
#include "GameFramework/WorldSettings.h"
|
||||
|
||||
#include "Runtime/Launch/Resources/Version.h"
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Tencent is pleased to support the open source community by making Puerts available.
|
||||
* Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
|
||||
* Puerts is licensed under the BSD 3-Clause License, except for the third-party components listed in the file 'LICENSE' which may
|
||||
* be subject to their corresponding license terms. This file is subject to the terms and conditions defined in file 'LICENSE',
|
||||
* which is part of this source code package.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Binding.hpp"
|
||||
#include "UEDataBinding.hpp"
|
||||
|
||||
UsingUStruct(FBox2D);
|
||||
UsingUStruct(FVector2D);
|
||||
UsingUStruct(FLinearColor);
|
||||
UsingUStruct(FColor);
|
||||
UsingUStruct(FVector);
|
||||
UsingUStruct(FGuid);
|
||||
UsingUStruct(FIntPoint);
|
||||
UsingUStruct(FIntVector);
|
||||
UsingUStruct(FQuat);
|
||||
UsingUStruct(FRotator);
|
||||
UsingUStruct(FTransform);
|
||||
UsingUStruct(FVector4);
|
||||
UsingUStruct(FPlane);
|
||||
UsingCppType(FFloat16Color);
|
||||
UsingUStruct(FMatrix);
|
||||
UsingContainer(TArray<FVector2D>);
|
||||
UsingUStruct(FIntVector4);
|
||||
Reference in New Issue
Block a user