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

#include "SCW_UK2Node_Event.h"
#include "SourcifyCoreUEWrapperModule.h"
#include "Editor/BlueprintGraph/Classes/K2Node_Event.h"

using namespace Sourcify;

SCW_UK2Node_Event::SCW_UK2Node_Event(UK2Node_Event* InK2Node_Event) : SCW_UK2Node_EditablePinBase(InK2Node_Event), K2Node_Event(InK2Node_Event)
{

}

ISCW_UFunctionPtr SCW_UK2Node_Event::FindEventSignatureFunction() const
{
	return FSourcifyCoreUEWrapper::Get().Wrap(*K2Node_Event->FindEventSignatureFunction());
}

ISCW_FMemberReferencePtr SCW_UK2Node_Event::GetEventReference() const
{
	return FSourcifyCoreUEWrapper::Get().Wrap(K2Node_Event->EventReference);
}

wstring SCW_UK2Node_Event::GetCustomFunctionName() const
{
	return TCHAR_TO_WCHAR(*K2Node_Event->CustomFunctionName.ToString());
}

wstring SCW_UK2Node_Event::GetFunctionName() const
{
	return TCHAR_TO_WCHAR(*K2Node_Event->GetFunctionName().ToString());
}

bool SCW_UK2Node_Event::GetOverrideFunction() const
{
	return K2Node_Event->bOverrideFunction;
}

void SCW_UK2Node_Event::SetOverrideFunction(bool InOverride)
{
	K2Node_Event->bOverrideFunction = InOverride;
}

UK2Node_Event* SCW_UK2Node_Event::ToUK2Node_Event() const
{
	return K2Node_Event;
}