#pragma once
#include "effectdata.hpp"

class CContentData : public CDataBase
{
private:
	CString m_Path;
	CString m_File;
	bool m_Dirty;
	CString m_EffectName[32];
	void StripComment (CString& str);

public:
	CContentData (CString& path);
	~CContentData (void);

	void ReadData (CString file);
	void WriteData (void);
	void InitialData (CString file);

	int FindMatIndex (CString& mat);

	const CString EffectName (int id) const
	{
		ASSERT (id >=0);
		ASSERT (id < 32);

		CString toret;
		int index;

		index = m_EffectName[id].Find ("content\\effects\\");

		toret = m_EffectName[id].Right (m_EffectName[id].GetLength () - index - strlen ("content\\effects\\"));

		return toret;
	}
	void EffectName (CString& name,int id)
	{
		ASSERT (id >=0);
		ASSERT (id < 32);
		m_Dirty = true;
		name.MakeLower ();
		m_EffectName[id] = name;
	}
};
