linux inifile.h
来源:互联网 发布:心脏支架 知乎 编辑:程序博客网 时间:2024/05/01 10:48
#ifndef __CONFIG_H__
#define __CONFIG_H__
#include <string>
#include <map>
using namespace std;
class CIniFile
{
public:
CIniFile(const string &strFileName);
~CIniFile(void);
int Dump();
int ReadItem(const string& strSection, const string& strKey, const string& strDefault, string& strValue);
int WriteItem(const string& strSection, const string& strKey, const string& strValue);
private:
int Load();
int Save();
int ReadLine(FILE* pFile, string& strLine);
int TrimString(string& strToken);
private:
static const int BUFFER_LEN = 1024;
string m_strFileName;
typedef map<string, string> ConfigType;
map<string, ConfigType> m_mSec2Config;
};
#endif /* __CONFIG_H__ */
#define __CONFIG_H__
#include <string>
#include <map>
using namespace std;
class CIniFile
{
public:
CIniFile(const string &strFileName);
~CIniFile(void);
int Dump();
int ReadItem(const string& strSection, const string& strKey, const string& strDefault, string& strValue);
int WriteItem(const string& strSection, const string& strKey, const string& strValue);
private:
int Load();
int Save();
int ReadLine(FILE* pFile, string& strLine);
int TrimString(string& strToken);
private:
static const int BUFFER_LEN = 1024;
string m_strFileName;
typedef map<string, string> ConfigType;
map<string, ConfigType> m_mSec2Config;
};
#endif /* __CONFIG_H__ */
0 0
- linux inifile.h
- IniFile.h源文件分析
- linux inifile.cpp
- Inifile
- inifile
- inifile
- c# IniFile 简单操作
- IniFile简单读写类
- IniFile Ini操作
- IniFile Read Write
- Delphi IniFile 应用详解
- iniFile 配置文件操作类
- 配置文件inifile入门浅析
- IniFile read & write source code
- Linux-退格键回显(^H^H^H^H)stty/tcgetattr学习
- linux-blk.h
- Linux -dlfcn.h
- Linux errno.h
- 常见面试第二题之什么是Context
- 升级 Xcode 6.4 后 Alcatraz 消失的问题
- sql之left join、right join、inner join的区别
- LabVIEW中访问数据库的几种不同方法
- 利用NSInvocation对方法进行抽象,实现对方法的加锁
- linux inifile.h
- 百度编辑器ueditor1.4.2-更改图片上传路径和图片读取路径
- Android应用如何监听自己是否被卸载及卸载反馈功能的实现(第二版)
- Linux下安装使用f.lux
- Android运行时ART简要介绍和学习计划
- 【字符串操作】 寻找两个字符串中的 最大公共子串
- Laravel框架学习记录一 框架基础
- 数据库中几个基本概念 主码 外码
- Html学习笔记2