[英]Is there a C++ cross platform key/value API or library for C++?
We want to persist some user settings int he GUI part of our code. 我们希望在代码的GUI部分中保留一些用户设置。 I used to do Win32 programming exclusively and the typical way this was done was with registry settings.
我以前只使用Win32编程,这种方式的典型方法是使用注册表设置。
I assume that this should be done with configuration files, but was wondering if there was a library or cross platform wrapper that made key/value pair persistence very easy. 我假设这应该用配置文件完成,但是想知道是否有一个库或跨平台包装器使得键/值对持久性非常容易。
Qt's QSettings class handles this: Qt的QSettings类处理这个:
http://doc.qt.nokia.com/4.6/qsettings.html http://doc.qt.nokia.com/4.6/qsettings.html
Boost.PropertyTree支持XML,JSON,INI配置文件。
想到老派Berkley DB 。
In the old days we used .ini files in windows. 在过去,我们在Windows中使用.ini文件。 Here is a portable version of an ini file read/write library
这是一个ini文件读/写库的可移植版本
It will work on Windows as well as Linux. 它可以在Windows和Linux上运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.