MCPcopy Create free account
hub / github.com/crazytuzi/UnrealCSharp / GetParamName

Method GetParamName

Source/ScriptCodeGenerator/Private/FGeneratorCore.cpp:640–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640FString FGeneratorCore::GetParamName(FProperty* Property)
641{
642 if (const auto ByteProperty = CastField<FByteProperty>(Property))
643 {
644 if (ByteProperty->Enum != nullptr)
645 {
646 return FString::Printf(TEXT(
647 "(%s)%s"
648 ),
649 *TName<uint8, uint8>::Get(),
650 *FUnrealCSharpFunctionLibrary::Encode(ByteProperty));
651 }
652 }
653
654 if (const auto EnumProperty = CastField<FEnumProperty>(Property))
655 {
656 return FString::Printf(TEXT(
657 "(%s)%s"
658 ),
659 *GetPropertyType(EnumProperty->GetUnderlyingProperty()),
660 *FUnrealCSharpFunctionLibrary::Encode(EnumProperty));
661 }
662
663 if (IsPrimitiveProperty(Property))
664 {
665 return FUnrealCSharpFunctionLibrary::Encode(Property);
666 }
667 else
668 {
669 return FString::Printf(TEXT(
670 "%s?.%s ?? nint.Zero"),
671 *FUnrealCSharpFunctionLibrary::Encode(Property),
672 *PROPERTY_GARBAGE_COLLECTION_HANDLE
673 );
674 }
675}
676
677FString FGeneratorCore::GetFunctionPrefix(FProperty* Property)
678{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected