///////////////////////////////////////////////////////////////////////////////
//  CFilePath.h

#pragma once

#include <string>

namespace filesystem {

class CFilePath {
	// ルートフォルダ
	static std::string	m_RootFolderPath;

	// 文字コードはShiftJISのみ扱う
	// 区切り文字は￥マークのみ扱う
	std::string		m_FilePath;

private:
	void	AddSeparator(void);
	void	DeleteSeparator(void);

	std::string::size_type	GetLastSeparatorIndex(void) const;

public:
	CFilePath(void);
	virtual ~CFilePath();

	// ルートフォルダパスの設定
	static void	SetRootFolderPath(const std::string& RootFolderPath);

	// ベースフォルダパスを設定する
	void	SetBaseFolderPath();

	// 実行ファイルのパスを設定する
	void	SetExeFilePath();

	// テンポラリフォルダパスを設定する
	void	SetTemporaryFolderPath(void);

	// Windows固有のフォルダパスを設定する
	void	SetPersonalFolderPath(void);
	void	SetAppDataFolderPath(void);

	// ファイル名の連結
	// 終端にパス区切り文字が無ければ追加してから連結する
	void	AddFileName(const std::string& FileName);

	// フォルダ名の連結
	// 終端にパス区切り文字が無ければ追加してから連結する
	void	AddFolderName(const std::string& FolderName);

	//
	const std::string&	GetString(void) const;
	const char*			c_str(void) const;

	std::string		GetParentPath(void) const;
	std::string		GetChildFileName(void) const;
};

} // end of namespace filesystem

