// CAtlMainDialogWrapperGenerator.h
//

#if !defined(_ATLMAINDIALOGWRAPPERGENERATOR_H_)
#define _ATLMAINDIALOGWRAPPERGENERATOR_H_

#include "AtlBaseGenerator.h"
//#include <string>
#include <vector>
#include "cmString.h"

using namespace std;

class CXmlClassInfo;

class CAtlMainDialogWrapperGenerator: public CAtlBaseGenerator
{
public:
	CAtlMainDialogWrapperGenerator();
	~CAtlMainDialogWrapperGenerator();

	void Generate();

	static cmString GetMainDlgName(const cmString& classPrefix);

protected:

	virtual void GenerateHeader();
	virtual void GenerateImplementation();

	// header file generators
	//
	void Head_generateHeader();
	void Head_generateIfDefBegin();
	void Head_generateIncludeSection();
	void Head_generateDlgInclude(CXmlClassInfo* classInfo);
	void Head_generateDlgDeclare(CXmlClassInfo* classInfo);
	void Head_generateViewIndexDeclare(CXmlClassInfo* classInfo);
	void Head_generateClassBegin();
	void Head_generateConstructor();
	void Head_generateDestructor();
	void Head_generateDialogData();
	void Head_generateGetSetData();
	void Head_generateOverrides();
	void Head_generateMessageMap();
	void Head_generateDataMembers();
	void Head_generateInitializeTree();
	void Head_generateStoreNodeData();
	void Head_generateBuildNode(CXmlClassInfo* classInfo, string parentPath);
	void Head_generateOnOK();
	void Head_generateGetChildDialog();
	void Head_generateClassEnd();
	void Head_generateIfDefEnd();
	void Head_generateGetNodeInfo();
	void Head_generateDeleteNode();
	void Head_generateUpdateWindowSize();
	void Head_generateDisplayPopupMenu();
	void Head_generateUpdateNodeImages();
	void Head_generateInterfaceImplementation();

	// implementation file generators
	//
	void Impl_generateHeader();
	void Impl_generateIncludeSection();
	void Impl_generateDebugSymbols();
	void Impl_generateMainTitle();
	void Impl_generateConstructor();
	void Impl_generateDestructor();
	void Impl_generateGetSetData();
	//void Impl_generateMapCreateItem(CXmlClassInfo* classInfo, vector<CXmlClassInfo*> parentStack, int& count, string parentPath);
	//void Impl_generateMapItemCreateItem(CXmlClassInfo* classInfo, vector<CXmlClassInfo*> parentStack, int& count, string parentPath);
	//void Impl_generateMapItemRemoveItem(CXmlClassInfo* classInfo, vector<CXmlClassInfo*> parentStack, int& count, string parentPath);
	//void Impl_generateDeleteNode();
	//void Impl_generateUpdateNodeImages();
	//void Impl_generateInterfaceImplementation();
	//string Impl_GeneratePathVariables(CXmlClassInfo* classInfo, vector<CXmlClassInfo*>& parentStack, bool containerVarOnly);
	//string Impl_GenerateVarPath(CXmlClassInfo* classInfo, vector<CXmlClassInfo*>& parentStack, bool containerVarOnly = false);
	//string Impl_GenerateClassPathVariables(CXmlClassInfo* classInfo, bool containerOnly);
	//string Impl_GenerateNodePath(CXmlClassInfo* classInfo, vector<CXmlClassInfo*>& parentStack);
	//string Impl_GenerateItemPath(CXmlClassInfo* classInfo, vector<CXmlClassInfo*>& parentStack);

	// utils
	//
	cmString GetMainDlgName();
	
	cmString implCode_;
	cmString headCode_;
};

#endif // !defined(_ATLMAINDIALOGWRAPPERGENERATOR_H_)
