⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inifile.h

📁 基于单片机的 snmp协议解析的一些原代码 给有用的 同行
💻 H
字号:
//---------------------------------------------------------------------------
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -