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

#include "SCW_UPropertyWrapper.h"
#include "SourcifyCoreUEWrapperModule.h"
#include "UObject/UnrealType.h"

using namespace Sourcify;

SCW_UPropertyWrapper::SCW_UPropertyWrapper(UPropertyWrapper* InPropertyWrapper) : SCW_UObject(InPropertyWrapper), PropertyWrapper(InPropertyWrapper)
{

}

UPropertyWrapper* SCW_UPropertyWrapper::ToUPropertyWrapper() const
{
	return PropertyWrapper;
}

ISCW_UPropertyWrapperPtr SCW_UPropertyWrapper::ToUPropertyWrapperPtr()
{
	return GetSharedThisAs<SCW_UPropertyWrapper>();
}

ISCW_UPropertyWrapperConstPtr SCW_UPropertyWrapper::ToUPropertyWrapperPtr() const
{
	return GetSharedThisAs<SCW_UPropertyWrapper>();
}

ISCW_FPropertyConstPtr SCW_UPropertyWrapper::GetProperty() const
{
	return FSourcifyCoreUEWrapper::Get().Wrap(*PropertyWrapper->GetProperty());
}

ISCW_FPropertyPtr SCW_UPropertyWrapper::GetProperty()
{
	return FSourcifyCoreUEWrapper::Get().Wrap(*PropertyWrapper->GetProperty());
}