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

#include "SCW_UK2Node_DynamicCast.h"
#include "K2Node_DynamicCast.h"
#include "SCW_UClass.h"
#include "SourcifyCoreUEWrapperModule.h"

using namespace Sourcify;

SCW_UK2Node_DynamicCast::SCW_UK2Node_DynamicCast(UK2Node_DynamicCast* InK2Node_DynamicCast) : SCW_UK2Node(InK2Node_DynamicCast), K2Node_DynamicCast(InK2Node_DynamicCast)
{

}

ISCW_UClassPtr SCW_UK2Node_DynamicCast::GetTargetType() const
{
	return FSourcifyCoreUEWrapper::Get().Wrap(*K2Node_DynamicCast->TargetType.Get());
}

void SCW_UK2Node_DynamicCast::SetTargetType(ISCW_UClassPtr InTargetType)
{
	K2Node_DynamicCast->TargetType = dynamic_cast<SCW_UClass*>(InTargetType.get())->ToUClass();
}

UK2Node_DynamicCast* SCW_UK2Node_DynamicCast::ToUK2Node_DynamicCast() const
{
	return K2Node_DynamicCast;
}

ISCW_UK2Node_DynamicCastPtr SCW_UK2Node_DynamicCast::ToUK2Node_DynamicCastPtr()
{
	return GetSharedThisAs<SCW_UK2Node_DynamicCast>();
}

ISCW_UK2Node_DynamicCastConstPtr SCW_UK2Node_DynamicCast::ToUK2Node_DynamicCastPtr() const
{
	return GetSharedThisAs<SCW_UK2Node_DynamicCast>();
}