#ifndef __ProjectCopy_h
#define __ProjectCopy_h

//----- 06.01.25 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//DlgSelectUser.cpp(68): void CFCDlgSelectUser::Initialize (FCHiProject* pProject, BOOL bCanSelectUnsetUser)
//DlgSelectUser.h(26): 	virtual void	Initialize (FCHiProject* pProject, BOOL bCanSelectUnsetUser);
//DlgSelectUser.h(32): 	FCHiProject*		m_pProject;
//DlgHiForkTag.cpp(74): void CFCDlgHiForkTag::Initialize (	FCHiProject& project,
//DlgProjectProperty.cpp(90): void CFCDlgProjectProperty::Initialize (FCHiProject& project,
//DlgTimeLabel.cpp(76): void CFCDlgTimeLabel::Initialize (	FCHiProject& project,
//DlgHiForkTag.h(24): 	virtual void	Initialize (FCHiProject& project,
//DlgProjectProperty.h(38): 	virtual void		Initialize (FCHiProject& project,
//DlgTimeLabel.h(24): 	virtual void	Initialize (FCHiProject& project,
//----- 06.01.25 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

#include "HiProject.h"	// For FCHiProject.

class FCDocumentRecCopy;
class FCDocRecCopyFactory;

class FCProjectCopy
{
public:
	FCProjectCopy ();
	FCProjectCopy (FCHiProject& project);
	~FCProjectCopy ();
	void		SetFactory (const FCDocRecCopyFactory* pFactory);
	void		operator = (FCHiProject& project);
// 06.02.06 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	BOOL		IsRealTableRecordModified (const FCTableName& tableName) const;
	BOOL		IsVirtualTableRecordModified (FCHiProject& project) const;
	void		Clear ();
	WString		GetFilePath () const;
	WString		GetTitle () const;
	FDSECTIME	GetDate () const;
	BOOL		GetIsUnknownFile () const;
	GUID		GetUserId () const;
	WString		GetComment () const;
	WString		GetHintText () const;
	void		GetMemberUserList (GuidToUserNameMap& mpGuidToUserName) const;
	WString		UserIdToUserName (const GUID& guidUserId) const;
	FCDocumentRecCopy*	GetDocumentRec (long lDocumentId);
	const FCDocumentRecCopy*	GetDocumentRec (long lDocumentId) const;
	long		SubDocumentIdToTopId (long lDocId) const;

	BOOL		IsMemberOfUsersGroup (const GUID& guid) const;
	BOOL		IsQualifiedToModify (const GUID& guidUserId) const;
	FCHiProject::Qualification CheckQualification (const GUID& guidUserId) const;
	long		FindDocumentId (const wchar_t* wcpDocTitle,
								const wchar_t* wcpVersion) const;
	int			CalcUniqSubVersion (const wchar_t* wcpDocTitle,
									const wchar_t* wcpVersion) const;
	void		CalcUniqDocTitle (	WString& wstrNewTitle,
									const wchar_t* wcpDocTitle,
									const wchar_t* wcpVersion) const;
	const FCDocumentRecCopy*	GetFirstHidocumentRec (long& lDocId) const;
	const FCDocumentRecCopy*	GetNextHidocumentRec (long& lDocId) const;
	void		GetHidocumentTree (longSet& stTopId, map<long, longSet>& mpIdToSubId) const;
	void		GetLowerHidocument (longSet& stHiDocId, long lHiDocId) const;
	WString		GetUniqSubDocumentVersion (long lSuperDocId) const;

protected:
	GUID					m_guidTableGuid;
	DWORD					m_dwLastEndIndex;	// _xZkqqHx_iDiMiDfCiBfLiDgIjAjEiBeC_xHqqkZx_
	DWORD					m_dwLastAppendIdentifier;	// _xZkqqHx_iNmFiMoDiCmMiDiMiDfCiBfLiDgIiCmMjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iBeC_xHqqkZx_

	WString					m_wstrFilePath;		// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCmMiDhAiDfIiBeC_xHqqkZx_
	WString					m_wstrTitle;		// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCmMiDfOiDeDiDgHiDiLiBeC_xHqqkZx_
	FDSECTIME				m_fdstDate;			// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiNoMjAkMjDpKiOjOiBeC_xHqqkZx_
	GUID					m_guidUserId;		// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiNoMjAkMiOnC_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
	WString					m_wstrComment;		// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCmMiDfCiDiBiDjDiDgHiBeC_xHqqkZx_
	GuidToUserNameMap		m_mpUserIdToName;	// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCmM_xHqqkZx_UserId->Name_xZkqqHx_iBeC_xHqqkZx_
	set<GUID>				m_stLimitedUser;	// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCmMjAkHiMmAiDiGiBfLiDfFiBfLiBeC_xHqqkZx_
	map<long, FCDocumentRecCopy*>	m_mpDocIdToDocRec;	// _xZkqqHx_jFlGiPjB_xHqqkZx_ID->FCDocRecData_xZkqqHx_iCmMiDgFiBfLiDhFiDiLiBeC_xHqqkZx_
	const FCDocRecCopyFactory*	m_pFactory;		// _xZkqqHx_iDhEiDeAiDeOiDgHiDiKiBfLiBeC_xHqqkZx_
}; // class FCProjectCopy.

#endif//__ProjectCopy_h
