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
| #ifndef CONFIG_VISION_H
| #define CONFIG_VISION_H
|
| class CConfigVision
| {
| public:
| CConfigVision();
| ~CConfigVision();
|
| public:
| //1. ÉèÖù¤×÷·¾¶
| void SetWorkDir(const char *pszPath, const char *pszName);
|
| //2. дÈë¶ÁÈ¡²ÎÊý
| bool WriteText(const char *pszSection, const char *pszName, const char *pszValue);
| std::string ReadText(const char *pszSection, const char *pszName, const char *pszDefault);
|
| //3. дÈë¶ÁÈ¡²ÎÊý
| bool WriteInt(const char *pszSection, const char *pszName, int intValue);
| int ReadInt(const char *pszSection, const char *pszName, int defaultValue);
|
| //4. дÈë¶ÁÈ¡²ÎÊý
| bool WriteBool(const char *pszSection, const char *pszName, int bValue);
| bool ReadBool(const char *pszSection, const char *pszName, bool deaultBool);
|
| //5. дÈë¶ÁÈ¡²ÎÊý
| bool WriteFloat(const char *pszSection, const char *pszName, double fValue);
| double ReadFloat(const char *pszSection, const char *pszName, double defaultValue);
|
| private:
| CString m_strFileName;
|
| private:
| //1. ³õʼ»¯´´½¨Îļþ
| void init(std::string filePath, std::string strName);
| };
|
|
| #endif
|
|