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

#pragma once

#include "ISCW_FMemberReference.h"
#include "SCW_Base.h"

struct FMemberReference;

namespace Sourcify
{
	class SCW_FMemberReference : public SCW_Base, public ISCW_FMemberReference
	{
	public:
		SCW_FMemberReference(FMemberReference* InMemberReference);

		wstring GetMemberName() const override;

		ISCW_UClassPtr GetMemberParentClass() const override;

		wstring GetMemberScopeName() const override;

		bool IsSelfContext() const override;

		bool IsLocalScope() const override;

		ISCW_FPropertyPtr ResolveMember_FProperty(ISCW_UClassPtr InClass) const override;

		void SetDirect(const wstring InMemberName, /*const FGuid InMemberGuid, */ISCW_UClassPtr InMemberParentClass, bool bIsConsideredSelfContext) override;
		
		void SetExternalMember(wstring InMemberName, ISCW_UClassPtr InMemberParentClass) override;

		void SetLocalMember(wstring InMemberName, ISCW_UStructPtr InScope, const SCW_FGuid& InMemberGuid) override;

		void SetLocalMember(wstring InMemberName, const wstring& InScope, const SCW_FGuid& InMemberGuid) override;

		void SetMemberName(wstring InMemberName) override;
		
		FMemberReference* ToFMemberReference() const;

		ISCW_FMemberReferencePtr ToFMemberReferencePtr() override;
		ISCW_FMemberReferenceConstPtr ToFMemberReferencePtr() const override;

	protected:
		FMemberReference* MemberReference;
	};
} // namespace Sourcify