// CCSharpGenerationManager.h
//

#if !defined(_CCSHARPGENERATIONMANAGER_H_)
#define _CCSHARPGENERATIONMANAGER_H_

//#include <string>
#include <vector>
#include <map>
#include "CSharpBaseGenerator.h"
#include "enums.h"
#include "cmString.h"
#include "IGeneratorListener.h"

using namespace std;

class CXmlProject;
class CXmlClassInfo;
class CXmlProjectSettings;
class CXmlProjectSettings_CSharp;
class IGeneratorListener;
class CXmlProjectPostGen;

class CCSharpGenerationManager: public CCSharpBaseGenerator
{
public:
	CCSharpGenerationManager();
	virtual ~CCSharpGenerationManager();

public:
	
	void RegisterListener(IGeneratorListener* listener);

	virtual bool Generate(const cmString& currentDirectory, 
						  CXmlProject* project);
	cmString GetCurDirectory();

	void RunCompiler();
	void RunTestProject();
	void RunTestProjectScript();
	
protected:
	
	void CreateFolders();
	bool BuildScript();
	cmString GetScriptName();

	/***
	void GenerateClass(CXmlClassInfo* classInfo, vector<CXmlClassInfo*> parentStack);
	void GenerateClassContainer(CXmlClassInfo* classInfo, vector<CXmlClassInfo*> parentStack);
	void GenerateGuiClass(CXmlClassInfo* classInfo, vector<CXmlClassInfo*> parentStack);
	void GenerateGuiManager();
	void GenerateGuiResources();
	void GenerateGuiTreeNodeInfo();
	void GenerateCppFileList();
	void GenerateDefFile();
	void GenerateDllBatch();
	void GenerateCppComponentsFile();
	
	void CopyFiles();
	void CopySingleFile(const cmString& source, const cmString& destination = _T(""));
	void CopyComponentsFiles();
	void CopyDllProjectFiles();
	void CopyHeaders();
	void CopyDirectory(cmString sourcePath, cmString destinationPath);
	void GetDirectoryFiles(cmString pathName, const cmString& pattern, vector<cmString>& fileList);
	void BuildComponentFileList(const cmString& pathName, const cmString& destinationPathName, map<cmString, cmString>& fileList);
	void RunTestProjectScript();
	void CopyTestProjectFiles();
	void GenerateTestProjectDialog();
	void GeneratePostBuildFile(const cmString& fileName, const cmString& sourceFolder, const cmString& filePostfix);

	****/
	
	CXmlProject* project_;
	cmString currentDirectory_;
	IGeneratorListener* listener_;
};

#endif //!defined(_CCSHARPGENERATIONMANAGER_H_)