[go: up one dir, main page]

Menu

[r19]: / util / conf.h  Maximize  Restore  History

Download this file

41 lines (31 with data), 552 Bytes

 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
#ifndef __CONF_H__
#define __CONF_H__
#include <string>
#include <fstream>
using namespace std;
struct Param
{
string m_strName;
string m_strValue;
};
class ConfParser
{
public:
int init(string path);
void close();
int getNextParam(Param& param);
private:
char* getToken(char* str, string& token);
private:
ifstream m_ConfFile;
};
class SECTORParam
{
public:
int init(const string& path);
public:
string m_strDataDir; // DATADIR
int m_iSECTORPort; // SECTOR_PORT
int m_iRouterPort; // ROUTER_PORT
};
#endif