// NameManager.h: interface for the NameManager class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_NAMEMANAGER_H__7BDD1D12_A8B5_4468_8996_C021C2141818__INCLUDED_)
#define AFX_NAMEMANAGER_H__7BDD1D12_A8B5_4468_8996_C021C2141818__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class NameManager  
{
protected:
	CString **NameArray;
	int ArraySize;
	int StringCount;
	void GrowArray();
	void Delete();
	bool FindString(const CString &str,int *pos);
	void RemoveString(int idx);
	int Separate(const CString &newname,CString *basename);
	int NumStrCompare(const CString &str1,const CString &str2);
public:
	static NameManager *Instance;
	void Reset();
	void RemoveString(const CString &str) { int pos; if(FindString(str,&pos)) RemoveString(pos);}
	void AddString(const CString &str);
	bool IsUnique(const CString &str);
	CString MakeUnique(CString str);
	NameManager();
	virtual ~NameManager();

};

#endif // !defined(AFX_NAMEMANAGER_H__7BDD1D12_A8B5_4468_8996_C021C2141818__INCLUDED_)
