MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetMethodSignature

Method GetMethodSignature

Source/Engine/Scripting/BinaryModule.cpp:1372–1388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1370}
1371
1372void ManagedBinaryModule::GetMethodSignature(void* method, ScriptingTypeMethodSignature& signature)
1373{
1374#if USE_CSHARP
1375 const auto mMethod = (MMethod*)method;
1376 signature.Name = mMethod->GetName();
1377 signature.IsStatic = mMethod->IsStatic();
1378 signature.ReturnType = MoveTemp(MUtils::UnboxVariantType(mMethod->GetReturnType()));
1379 const int32 paramsCount = mMethod->GetParametersCount();
1380 signature.Params.Resize(paramsCount);
1381 for (int32 paramIdx = 0; paramIdx < paramsCount; paramIdx++)
1382 {
1383 auto& param = signature.Params[paramIdx];
1384 param.Type = MoveTemp(MUtils::UnboxVariantType(mMethod->GetParameterType(paramIdx)));
1385 param.IsOut = mMethod->GetParameterIsOut(paramIdx);
1386 }
1387#endif
1388}
1389
1390// Pointers with the highest bit turned on are properties
1391#if PLATFORM_64BITS

Callers 2

InvokeMethod · 0.45

Calls 7

IsStaticMethod · 0.80
GetNameMethod · 0.45
GetReturnTypeMethod · 0.45
GetParametersCountMethod · 0.45
ResizeMethod · 0.45
GetParameterTypeMethod · 0.45
GetParameterIsOutMethod · 0.45

Tested by

no test coverage detected