#pragma once

#include "stdafx.h"

#define PROCESS_LIST	"ProcList.txt"	// 処理リストを記述したファイル名
#define DATE_STRING		64				// 日付文字列の長さ
#define TOD_STRING			{"morning", "daytime", "evening"}
#define DEFAULT_BASEDIR	"."
#define DEFAULT_IMGFILE	"snapshot%d.bmp"
#define DEFAULT_REFFILE	"snapshot0.bmp"

struct Param
{
	char baseDir[PATH_LEN];
	char imgFile[PATH_LEN];
	char refFile[PATH_LEN];
	char dateStr[DATE_STRING];
	int  tod;
	int  subject;
	int  count;
	Param()	// コンストラクタ（初期化）
	{ *baseDir = *imgFile = *refFile = *dateStr = '\0'; tod = subject = count = 0; }
};

class CProcessList
{
private:
	Param	*m_Param;
	int     m_NumParam;
	int     m_CurDate;
	int     m_CurTOD;
	int     m_CurSubject;
	int     m_CurCount;
	bool	m_FirstTOD;
	bool    m_EndList;

private:
	bool ReadFile();

public:
	CProcessList(void);
	~CProcessList(void);
	bool Init();
	bool MoveNext();
	bool GetFrameDir(char *pathStr);
	bool GetRefDir(char *pathStr);
	bool MakeParamStr(char *buffer, int len);

	bool IsFirstTOD()      { return m_FirstTOD; };
	char *CurrentImgFile() { return m_Param[m_CurDate].imgFile; };
	char *CurrentRefFile() { return m_Param[m_CurDate].refFile; };
};
