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

#pragma once

#include "ISCW_FProperty.h"
#include "SCW_FField.h"

using std::wstring;

class FProperty;

namespace Sourcify
{
	class SCW_FProperty : public SCW_FField, public virtual ISCW_FProperty
	{
	public:
		SCW_FProperty(FProperty* InProperty);

		void ExportTextItem_InContainer(wstring& ValueStr, ISCW_UObjectConstPtr ContainerPtr, SCW_EPropertyPortFlags PortFlags /*= SCW_EPropertyPortFlags::PPF_None*/) const override;
		
		wstring GetAuthoredName() const override;

		SCW_ELifetimeCondition GetBlueprintReplicationCondition() const override;

		wstring GetCPPType(wstring* ExtendedTypeText = nullptr, SCW_EPropertyExportCPPFlags CPPExportFlags = SCW_EPropertyExportCPPFlags::CPPF_None) const override;

		wstring GetName() const override;

		wstring GetNameCPP() const override;

		ISCW_UClassConstPtr GetOwnerClass() const override;

		ISCW_UClassPtr GetOwnerClass() override;

		ISCW_UObjectConstPtr GetOwnerUObject() const override;

		ISCW_UObjectPtr GetOwnerUObject() override;

		ISCW_UStructConstPtr GetOwnerStruct() const override;

		ISCW_UStructPtr GetOwnerStruct() override;

		ISCW_UPropertyWrapperPtr GetUPropertyWrapper() override;

		SCW_EPropertyFlags GetPropertyFlags() const override;

		wstring GetRepNotifyFuncName() const override;
		
		bool HasAllPropertyFlags(SCW_EPropertyFlags FlagsToCheck) const override;

		bool HasAnyPropertyFlags(SCW_EPropertyFlags FlagsToCheck) const override;

		bool Identical_InContainer(ISCW_UObjectConstPtr A, ISCW_UObjectConstPtr B, SCW_EPropertyPortFlags PortFlags /* = SCW_EPropertyPortFlags::PPF_None */) const override;

		const wchar_t* ImportText_InContainer(const wchar_t* Buffer, ISCW_UObjectPtr Container, ISCW_UObjectPtr OwnerObject, SCW_EPropertyPortFlags PortFlags/*, FOutputDevice* ErrorText = (FOutputDevice*)GWarn*/) const override;

		void SetPropertyFlags(SCW_EPropertyFlags InFlags) override;

		FProperty* ToFProperty() const;

		ISCW_FPropertyPtr ToFPropertyPtr() override;
		ISCW_FPropertyConstPtr ToFPropertyPtr() const override;

	protected:
		FProperty* Property;
	};
} // namespace Sourcify