PerSt Pile
version 0.0.1
Persistent storage pile used for storing key/value pairs
|
Persistent storage pile used for storing key/value pairs on different underlying objects.
The pile provides an interface in the form of PerSt class and a number of providers:
Instantiating and general management is performed through PerStFactory class and it also allows custom providers to be added.
Initialization and termination needs to be done once per application:
PerStFactory::init (); // ... PerStFactory::end ();
To create a new file-based instance with QSettings back-end and read the content if the file "config.ini" exists use:
PerSt * result = PerStFactory::create ( "config", "config.ini"); result->beginGroup ("general"); int port = result->valueInt ("in_port"); ++port; result->setValue ("out_port", port); result->endGroup ("general"); // ... delete result;