mrDarker
2025-08-22 a569f6895e7ea624b869609a41ad4e39ea0f041a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#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