【文件属性】:
文件名称:ini 文件操作
文件大小:2KB
文件格式:ZIP
更新时间:2022-10-09 04:17:23
c++ ini
ini 文件操作(读取、保存) c++ 代码实现。
class TIni {
private:
std::map> _data;
public:
int32_t readInteger(std::string section, std::string key, int32_t defaultValue);
float readFloat(std::string section, std::string key, float defaultValue);
bool readBoolean(std::string section, std::string key, bool defaultValue);
std::string readString(std::string section, std::string key, std::string defaultValue);
void writeInteger(std::string section, std::string key, int32_t value);
void writeFloat(std::string section, std::string key, float value);
void writeBoolean(std::string section, std::string key, bool value);
void writeString(std::string section, std::string key, std::string value);
bool valueExists(std::string section, std::string key);
bool sectionExists(std::string section);
void deleteKey(std::string section, std::string key);
void eraseSection(std::string section);
void save(std::string filename);
void clear();
static TIni parse(std::string filename);
};
【文件预览】:
ini.hpp
ini.cpp