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

#include "SCW_FGraphNodeCreator.h"

#include "SCW_UEdGraph.h"
#include "SourcifyCoreUEWrapperModule.h"

using namespace Sourcify;

using std::make_shared;

SCW_FGraphNodeCreator_UK2Node_Event::SCW_FGraphNodeCreator_UK2Node_Event(FGraphNodeCreator<UK2Node_Event>* InGraphNodeCreator) : GraphNodeCreator(InGraphNodeCreator)
{

}

ISCW_UK2Node_EventPtr SCW_FGraphNodeCreator_UK2Node_Event::CreateNode(bool bSelectNewNode/* = true*/)
{
	return FSourcifyCoreUEWrapper::Get().Wrap(*GraphNodeCreator->CreateNode(bSelectNewNode));
}

void SCW_FGraphNodeCreator_UK2Node_Event::Finalize()
{
	GraphNodeCreator->Finalize();
}
		
FGraphNodeCreator<UK2Node_Event>* SCW_FGraphNodeCreator_UK2Node_Event::ToFGraphNodeCreator() const
{
	return GraphNodeCreator.Get();
}

ISCW_FGraphNodeCreator_UK2Node_EventPtr SCW_FGraphNodeCreator_UK2Node_Event::ToFGraphNodeCreator_UK2Node_EventPtr()
{
	return GetSharedThisAs<SCW_FGraphNodeCreator_UK2Node_Event>();
}

ISCW_FGraphNodeCreator_UK2Node_EventConstPtr SCW_FGraphNodeCreator_UK2Node_Event::ToFGraphNodeCreator_UK2Node_EventPtr() const
{
	return GetSharedThisAs<SCW_FGraphNodeCreator_UK2Node_Event>();
}

SCW_FGraphNodeCreator_UK2Node_CreateDelegate::SCW_FGraphNodeCreator_UK2Node_CreateDelegate(FGraphNodeCreator<UK2Node_CreateDelegate>* InGraphNodeCreator) : GraphNodeCreator(InGraphNodeCreator)
{

}

ISCW_UK2Node_CreateDelegatePtr SCW_FGraphNodeCreator_UK2Node_CreateDelegate::CreateNode(bool bSelectNewNode/* = true*/)
{
	return FSourcifyCoreUEWrapper::Get().Wrap(*GraphNodeCreator->CreateNode(bSelectNewNode));
}

void SCW_FGraphNodeCreator_UK2Node_CreateDelegate::Finalize()
{
	GraphNodeCreator->Finalize();
}
		
FGraphNodeCreator<UK2Node_CreateDelegate>* SCW_FGraphNodeCreator_UK2Node_CreateDelegate::ToFGraphNodeCreator() const
{
	return GraphNodeCreator.Get();
}

ISCW_FGraphNodeCreator_UK2Node_CreateDelegatePtr SCW_FGraphNodeCreator_UK2Node_CreateDelegate::ToFGraphNodeCreator_UK2Node_CreateDelegatePtr()
{
	return GetSharedThisAs<SCW_FGraphNodeCreator_UK2Node_CreateDelegate>();
}

ISCW_FGraphNodeCreator_UK2Node_CreateDelegateConstPtr SCW_FGraphNodeCreator_UK2Node_CreateDelegate::ToFGraphNodeCreator_UK2Node_CreateDelegatePtr() const
{
	return GetSharedThisAs<SCW_FGraphNodeCreator_UK2Node_CreateDelegate>();
}