Windows C++ Library
|
The config data provider that uses an .ini file for storage. More...
#include <IniFileCfgProvider.hpp>
Public Member Functions | |
IniFileCfgProvider (const tstring &publisher, const tstring &application) | |
Constructor. | |
virtual | ~IniFileCfgProvider () |
Destructor. | |
virtual tstring | readString (const tstring §ionName, const tstring &keyName, const tstring &defaultValue) const |
Read a string value. | |
virtual void | writeString (const tstring §ionName, const tstring &keyName, const tstring &value) |
Write a string value. | |
virtual void | deleteSection (const tstring §ionName) |
Delete the entire section. | |
Static Public Member Functions | |
static bool | isAvailable () |
Check if there is a config file already. | |
static void | removeConfig () |
Remove the config information. | |
Private Attributes | |
tstring | m_publisher |
The name of the publisher. | |
tstring | m_application |
The application name. | |
CIniFile | m_iniFile |
The underlying storage. |
The config data provider that uses an .ini file for storage.
The .ini file resides in the application folder.
WCL::IniFileCfgProvider::IniFileCfgProvider | ( | const tstring & | publisher, |
const tstring & | application | ||
) |
Constructor.
WCL::IniFileCfgProvider::~IniFileCfgProvider | ( | ) | [virtual] |
Destructor.
bool WCL::IniFileCfgProvider::isAvailable | ( | ) | [static] |
Check if there is a config file already.
void WCL::IniFileCfgProvider::removeConfig | ( | ) | [static] |
Remove the config information.
tstring WCL::IniFileCfgProvider::readString | ( | const tstring & | sectionName, |
const tstring & | keyName, | ||
const tstring & | defaultValue | ||
) | const [virtual] |
Read a string value.
Implements WCL::IConfigProvider.
void WCL::IniFileCfgProvider::writeString | ( | const tstring & | sectionName, |
const tstring & | keyName, | ||
const tstring & | value | ||
) | [virtual] |
Write a string value.
Implements WCL::IConfigProvider.
void WCL::IniFileCfgProvider::deleteSection | ( | const tstring & | sectionName | ) | [virtual] |
Delete the entire section.
Implements WCL::IConfigProvider.
tstring WCL::IniFileCfgProvider::m_publisher [private] |
The name of the publisher.
tstring WCL::IniFileCfgProvider::m_application [private] |
The application name.
CIniFile WCL::IniFileCfgProvider::m_iniFile [private] |
The underlying storage.