bool UDelegateProperty::Identical( const void* A, const void* B, uint32 PortFlags ) const { bool bResult = false; FScriptDelegate* DA = (FScriptDelegate*)A; FScriptDelegate* DB = (FScriptDelegate*)B; if( DB == NULL ) { bResult = DA->GetFunctionName() == NAME_None; } else if ( DA->GetFunctionName() == DB->GetFunctionName() ) { if ( DA->GetUObject() == DB->GetUObject() ) { bResult = true; } else if ((DA->GetUObject() == NULL || DB->GetUObject() == NULL) && (PortFlags&PPF_DeltaComparison) != 0) { bResult = true; } } return bResult; }
void UDelegateProperty::ExportTextItem( FString& ValueStr, const void* PropertyValue, const void* DefaultValue, UObject* Parent, int32 PortFlags, UObject* ExportRootScope ) const { FScriptDelegate* ScriptDelegate = (FScriptDelegate*)PropertyValue; check(ScriptDelegate != NULL); bool bDelegateHasValue = ScriptDelegate->GetFunctionName() != NAME_None; ValueStr += FString::Printf( TEXT("%s.%s"), ScriptDelegate->GetUObject() != NULL ? *ScriptDelegate->GetUObject()->GetName() : TEXT("(null)"), *ScriptDelegate->GetFunctionName().ToString() ); }