inifile.h
来自「基于单片机的 snmp协议解析的一些原代码 给有用的 同行」· C头文件 代码 · 共 49 行
H
49 行
//---------------------------------------------------------------------------
#ifndef iniFileH
#define iniFileH
//#include <string>
#include <fstream.h>
#include "exconst.h"
//---------------------------------------------------------------------------
class IniFile
{
public:
IniFile();
~IniFile();
bool LoadParams();
long GetDeviceType();
string GetSerialPort();
short GetSerialBaudRate();
short GetTimeout();
string GetPhoneNumber();
long GetEmulationMode();
string GetCHAPSecret();
void SetDeviceType(long theDeviceType);
void SetDeviceType(char * theDeviceType);
void SetSerialPort(string theSerialPort);
void SetSerialPort(char * theSerialPort);
void SetSerialBaudRate(short theSerialBaudRate);
void SetSerialBaudRate(char *theSerialBaudRate);
void SetTimeout(short theTimeout);
void SetTimeout(char *theTimeout);
void SetPhoneNumber(string thePhoneNumber);
void SetPhoneNumber(char * thePhoneNumber);
void SetEmulationMode(char *theEmulationMode);
void SetEmulationMode(long theEmulationMode);
void SetCHAPSecret(char *theSecret);
private:
long deviceType;
string serialPort;
short serialBaudRate;
short timeout;
string phoneNumber;
long emulationMode;
string CHAPSecret;
fstream filePtr;
bool WriteParamFile();
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?