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

#pragma once

#include "ISCW_UClass.h"
#include "ISCW_UStruct.h"
#include "SCW_FImplementedInterface.h"
#include "SCW_UField.h"
#include "SCW_UFunction.h"
#include "SCW_UObject.h"
#include "SCW_UScriptStruct.h"
#include "SCW_UStruct.h"

class UClass;

namespace Sourcify
{
	class SCW_UClass : public SCW_UStruct, public virtual ISCW_UClass
	{
	public:
		SCW_UClass(UClass* InClass);

		ISCW_UClassPtr ToUClassPtr() override;

		ISCW_UClassConstPtr ToUClassPtr() const override;

		void ClassConstructor(ISCW_UObjectPtr ObjectToConstruct, ISCW_UObjectPtr ArchitypeObject, SCW_EObjectInitializerOptions ObjectInitializerOptions) const override;

		ISCW_UObjectPtr FindArchetype(ISCW_UClassConstPtr ArchetypeClass, const wstring& ArchetypeName) const override;

		ISCW_UFunctionPtr FindFunctionByName(const wstring& InName, SCW_EIncludeSuperFlagType IncludeSuper = SCW_EIncludeSuperFlagType::IncludeSuper) const override;

		void GenerateFunctionList(vector<wstring>& OutArray) const override;

		ISCW_UClassPtr GetAuthoritativeClass() const override;

		ISCW_UObjectPtr GetClassDefaultObject() const override;

		shared_ptr<ISCW_UObject> GetClassGeneratedBy() const override;

		wstring GetClassPathName() const override;

		wstring GetConfigName() const override;

		shared_ptr<ISCW_UObject> GetDefaultObject(bool bCreateIfNeeded = true) const override;
		
		void GetDefaultObjectSubobjects(vector<ISCW_UObjectPtr>& OutDefaultSubobjects) const override;
		
		shared_ptr<ISCW_UScriptStruct> GetSparseClassDataStruct() const override;

		ISCW_UClassPtr GetSuperClass() const override;

		bool HasAllClassFlags(SCW_EClassFlags FlagsToCheck) const override;

		bool HasAnyClassFlags(SCW_EClassFlags FlagsToCheck) const override;

		vector<ISCW_FImplementedInterfacePtr> Interfaces() const override;

		bool IsChildOf(ISCW_UClassConstPtr SomeBase) const override;

		bool IsChildOf_AActor() const override;

		bool IsChildOf_UActorComponent() const override;

		bool IsChildOf_UInterface() const override;

		bool IsInterface() const override;

		UClass* ToUClass() const;

	protected:
		UClass* Class;
	};
} // namespace Sourcify