// Copyright (c) 2024 Codemongous LLC. All Rights Reserved.

#include "SCW_UK2Node_CreateDelegate.h"

#include "K2Node_CreateDelegate.h"
#include "SCW_UEdGraphNode.h"
#include "SourcifyCoreUEWrapperModule.h"

using namespace Sourcify;

SCW_UK2Node_CreateDelegate::SCW_UK2Node_CreateDelegate(UK2Node_CreateDelegate* InK2Node_CreateDelegate) : SCW_UK2Node(InK2Node_CreateDelegate), K2Node_CreateDelegate(InK2Node_CreateDelegate)
{

}

wstring SCW_UK2Node_CreateDelegate::GetFunctionName() const
{
	return *K2Node_CreateDelegate->GetFunctionName().ToString();
}

void SCW_UK2Node_CreateDelegate::HandleAnyChange(bool bForceModify/* = false*/)
{
	K2Node_CreateDelegate->HandleAnyChange(bForceModify);
}

UK2Node_CreateDelegate* SCW_UK2Node_CreateDelegate::ToUK2Node_CreateDelegate() const
{
	return K2Node_CreateDelegate;
}

ISCW_UK2Node_CreateDelegatePtr SCW_UK2Node_CreateDelegate::ToUK2Node_CreateDelegatePtr()
{
	return GetSharedThisAs<SCW_UK2Node_CreateDelegate>();
}

ISCW_UK2Node_CreateDelegateConstPtr SCW_UK2Node_CreateDelegate::ToUK2Node_CreateDelegatePtr() const
{
	return GetSharedThisAs<SCW_UK2Node_CreateDelegate>();
}

ISCW_UEdGraphPinPtr SCW_UK2Node_CreateDelegate::GetDelegateOutPin() const
{
	return FSourcifyCoreUEWrapper::Get().Wrap(*K2Node_CreateDelegate->GetDelegateOutPin());
}

void SCW_UK2Node_CreateDelegate::SetFunction(wstring Name) const
{
	K2Node_CreateDelegate->SetFunction(FName(Name.c_str()));
}