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

#include "SCW_UK2Node_StructMemberGet.h"
#include "K2Node_StructMemberGet.h"
#include "SourcifyCoreUEWrapperModule.h"

using namespace Sourcify;

SCW_UK2Node_StructMemberGet::SCW_UK2Node_StructMemberGet(UK2Node_StructMemberGet* InK2Node_StructMemberGet) : SCW_UK2Node_StructOperation(InK2Node_StructMemberGet), K2Node_StructMemberGet(InK2Node_StructMemberGet)
{

}

vector<shared_ptr<ISCW_FOptionalPinFromProperty>> SCW_UK2Node_StructMemberGet::GetShowPinForProperties()
{
	vector<shared_ptr<ISCW_FOptionalPinFromProperty>> ShowPinForProperties;
	for (auto& OptionalPinFromProperty : K2Node_StructMemberGet->ShowPinForProperties)
	{
		ShowPinForProperties.push_back(FSourcifyCoreUEWrapper::Get().Wrap(OptionalPinFromProperty));
	}

	return ShowPinForProperties;
}

void SCW_UK2Node_StructMemberGet::SetShowPinForProperties(const vector<shared_ptr<ISCW_FOptionalPinFromProperty>>& InShowPinForProperties)
{
	for (int32 i = 0; i < InShowPinForProperties.size(); ++i)
	{
		K2Node_StructMemberGet->ShowPinForProperties[i].bShowPin = InShowPinForProperties[i]->GetShowPin();
	}
}

UK2Node_StructMemberGet* SCW_UK2Node_StructMemberGet::ToUK2Node_StructMemberGet() const
{
	return K2Node_StructMemberGet;
}

ISCW_UK2Node_StructMemberGetPtr SCW_UK2Node_StructMemberGet::ToUK2Node_StructMemberGetPtr()
{
	return GetSharedThisAs<SCW_UK2Node_StructMemberGet>();
}

ISCW_UK2Node_StructMemberGetConstPtr SCW_UK2Node_StructMemberGet::ToUK2Node_StructMemberGetPtr() const
{
	return GetSharedThisAs<SCW_UK2Node_StructMemberGet>();
}