#ifndef FILE_RECIPE_H
|
#define FILE_RECIPE_H
|
|
#include "LocProcess.h"
|
|
class CFileRecipe
|
{
|
public:
|
CFileRecipe();
|
~CFileRecipe();
|
|
public:
|
//1. ÎļþÊÇ·ñ´æÔÚ
|
static bool fileIsExist(std::string fileName);
|
|
//2. ɾ³ýÎļþϵÄËùÓÐÎļþ
|
static void removeDir(std::string dirPath);
|
|
//3. ´´½¨Ä¿Â¼
|
static void makeDir(std::string dirName);
|
|
//4. ´ò¿ªºÍ´´½¨CSVÎļþ
|
static bool openRecipeFile(CStdioFile &fileRecipe, CString fileName);
|
static bool readRecileFile(CStdioFile &fileRecipe, CString fileName);
|
|
//5. ¸ñʽת»»
|
static CString toCString(std::string str);
|
|
//6. ¸ñʽת»»
|
static std::string toString(CString str);
|
|
//7. дÈëCSVÎļþ
|
static void WriteString(CStdioFile &fileRecipe, std::string strText);
|
static void WriteCString(CStdioFile &fileRecipe, CString strText);
|
|
//8. ¶ÁÈ¡Îļþ
|
static BOOL ReadString(CStdioFile &fileRecipe, CString &strRes);
|
//9. ×Ö·û·Ö¸î
|
static int StringSplit(const std::string& strScr, const std::string& delim, std::vector<std::string>& strings);
|
static int CStringSplit(const CString& strText, const std::string& delim, std::vector<std::string>& strings);
|
|
//10. Êý¾Ýת»»
|
static int CStringToInt(CString strText);
|
static int StringToInt(std::string str);
|
static double CStringToF(CString strText);
|
static double StringToF(std::string str);
|
|
private:
|
|
};
|
|
#endif
|