#ifndef __HiDocumentRec_h
#define __HiDocumentRec_h

class FCHiProject;

class FCHiDocumentRec
{
public:
	FCHiDocumentRec ();
	FCHiDocumentRec (FCHiProject* pProject, long lDocumentId, DWORD dwIndex);

	BOOL		GetIsInvalid () const;
	long		GetDocumentId () const;		// _xZkqqHx_jHjKjHpAjFlGiPjB_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
	flint		GetFirstSessionIndex ();	// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiImKjChFiBeC_xHqqkZx_
	long		GetSuperDocId ();			// _xZkqqHx_iPoDiImKjHjKjHpAjFlGiPjBiBeC_xHqqkZx_
	WString		GetDocTitle ();				// _xZkqqHx_jHjKjHpAjFlGiPjBjGlMiBeC_xHqqkZx_
	WString		GetVersion ();				// _xZkqqHx_jHjKjHpAjFlGiPjBiDgPiBfLiDfHiDiHiDjDiBeC_xHqqkZx_
	GUID		GetUserId ();				// _xZkqqHx_iDiGiBfLiDfF_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
	FDSECTIME	GetDate ();					// _xZkqqHx_jHjKjHpAjFlGiPjBiNoMjAkMjDpKiBeC_xHqqkZx_UTC_xZkqqHx_iBeC_xHqqkZx_
	WString		GetComment ();				// _xZkqqHx_jHjKjHpAjFlGiPjBiDfCiDiBiDjDiDgHiBeC_xHqqkZx_
	BOOL		GetIsLogCommandUserId ();	// _xZkqqHx_jFnCiPfHiOnCiPoOjFpBiCmMiDiNiDePiCpAiLeMjIfOiBeC_xHqqkZx_
	double		GetHtreeScore ();			// _xZkqqHx_jHjKjHpAiDfIiDfCiDeBiBeC_xHqqkZx_

// 06.01.31 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	BOOL		GetIsTemporary ();
//	WString		GetHintText (const FCHiProject* pProject);
	void		GetValue (	flint* fliFirstSessionIndex,	// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiImKjChFiBeC_xHqqkZx_
							long* lSuperDocId,				// _xZkqqHx_iPoDiImKjHjKjHpAjFlGiPjBiBeC_xHqqkZx_
							WString* wstrDocTitle,			// _xZkqqHx_jHjKjHpAjFlGiPjBjGlMiBeC_xHqqkZx_
							WString* wstrVersion,			// _xZkqqHx_jHjKjHpAjFlGiPjBiDgPiBfLiDfHiDiHiDjDiBeC_xHqqkZx_
							GUID* guidUserId,				// _xZkqqHx_iDiGiBfLiDfF_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
							FDSECTIME* fdstDate,			// _xZkqqHx_jHjKjHpAjFlGiPjBiNoMjAkMjDpKiBeC_xHqqkZx_UTC_xZkqqHx_iBeC_xHqqkZx_
							WString* wstrComment,			// _xZkqqHx_jHjKjHpAjFlGiPjBiDfCiDiBiDjDiDgHiBeC_xHqqkZx_
							BOOL* bIsLogCommandUserId,		// _xZkqqHx_jFnCiPfHiOnCiPoOjFpBiCmMiDiNiDePiCpAiLeMjIfOiBeC_xHqqkZx_
							double* dHtreeScore);			// _xZkqqHx_jHjKjHpAiDfIiDfCiDeBiBeC_xHqqkZx_

protected:
	void		CheckIndex ();

protected:
	FCHiProject*	m_pProject;			// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiBeC_xHqqkZx_
	long			m_lDocumentId;		// _xZkqqHx_jHjKjHpAjFlGiPjB_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
	DWORD			m_dwIndex;			// _xZkqqHx_iDiMiDfCiBfLiDgIiDeDiDjDiDgGiDgCiDeOiDfIiBeC_xHqqkZx_
}; // class FCHiDocumentRec.

class FCHiDocumentRecW : public FCHiDocumentRec
{
protected:
typedef FCHiDocumentRec BASE_CLASS;

public:
	FCHiDocumentRecW ();
	FCHiDocumentRecW (const FCHiDocumentRec& hiDocRec);
	void	SetFirstSessionIndex (flint fliSessionIndex);	// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiImKjChFiBeC_xHqqkZx_
	void	SetSuperDocId (long lDocId);					// _xZkqqHx_iPoDiImKjHjKjHpAjFlGiPjBiBeC_xHqqkZx_
	void	SetDocTitle (const wchar_t* wcpDocTitle);		// _xZkqqHx_jHjKjHpAjFlGiPjBjGlMiBeC_xHqqkZx_
	void	SetVersion (const wchar_t* wcpVersion);			// _xZkqqHx_jHjKjHpAjFlGiPjBiDgPiBfLiDfHiDiHiDjDiBeC_xHqqkZx_
	void	SetUserId (const GUID& guidUserId);				// _xZkqqHx_iDiGiBfLiDfF_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
	void	SetDate (FDSECTIME fdstDate);					// _xZkqqHx_jHjKjHpAjFlGiPjBiNoMjAkMjDpKiBeC_xHqqkZx_UTC_xZkqqHx_iBeC_xHqqkZx_
	void	SetComment (const wchar_t* wcpComment);			// _xZkqqHx_jHjKjHpAjFlGiPjBiDfCiDiBiDjDiDgHiBeC_xHqqkZx_
	void	SetIsLogCommandUserId (const BOOL bIsLogCommandUserId);	// _xZkqqHx_jFnCiPfHiOnCiPoOjFpBiCmMiDiNiDePiCpAiLeMjIfOiBeC_xHqqkZx_
	void	SetHtreeScore (double dScore);					// _xZkqqHx_jHjKjHpAiDfIiDfCiDeBiBeC_xHqqkZx_
	void	Update ();
	void	GetData (BYTEVector& vData);

protected:
	enum {
		FD_FIRST_SESSION_INDEX_ID	= (1L << 0),
		FD_SUPER_DOC_ID				= (1L << 1),
		FD_DOC_TITLE				= (1L << 2),
		FD_VERSION					= (1L << 3),
		FD_USER_ID					= (1L << 4),
		FD_DATE						= (1L << 5),
		FD_COMMENT					= (1L << 6),
		FD_IS_LOG_COMMAND_USER_ID	= (1L << 7),
		FD_HTREE_SCORE				= (1L << 8),
	};

protected:
	DWORD		m_dwFlag;
	flint		m_fliFirstSessionIndex;	// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiImKjChFiBeC_xHqqkZx_
	long		m_lSuperDocId;			// _xZkqqHx_iPoDiImKjHjKjHpAjFlGiPjBiBeC_xHqqkZx_
	WString		m_wstrDocTitle;			// _xZkqqHx_jHjKjHpAjFlGiPjBjGlMiBeC_xHqqkZx_
	WString		m_wstrVersion;			// _xZkqqHx_jHjKjHpAjFlGiPjBiDgPiBfLiDfHiDiHiDjDiBeC_xHqqkZx_
	GUID		m_guidUserId;			// _xZkqqHx_iDiGiBfLiDfF_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
	FDSECTIME	m_fdstDate;				// _xZkqqHx_jHjKjHpAjFlGiPjBiNoMjAkMjDpKiBeC_xHqqkZx_UTC_xZkqqHx_iBeC_xHqqkZx_
	WString		m_wstrComment;			// _xZkqqHx_jHjKjHpAjFlGiPjBiDfCiDiBiDjDiDgHiBeC_xHqqkZx_
	BOOL		m_bIsLogCommandUserId;	// _xZkqqHx_jFnCiPfHiOnCiPoOjFpBiCmMiDiNiDePiCpAiLeMjIfOiBeC_xHqqkZx_
	double		m_dHtreeScore;			// _xZkqqHx_jHjKjHpAiDfIiDfCiDeBiBeC_xHqqkZx_
}; // class FCHiDocumentRecW.

#endif//__HiDocumentRec_h
