📄 classwgui_1_1cconfigstore.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>wGui::CConfigStore class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> </center><hr><h1>wGui::CConfigStore Class Reference</h1>A class for storing configuration settings <a class="el" href="classwGui_1_1CConfigStore.html">CConfigStore</a> allows settings to be stored and read from common text files. <a href="#_details">More...</a><p><code>#include <<a class="el" href="wg__config__store_8h-source.html">wg_config_store.h</a>></code><p><h2>Public Methods</h2><ul><li><a name="a0" doxytag="wGui::CConfigStore::CConfigStore"></a><a class="el" href="classwGui_1_1CConfigStore.html#a0">CConfigStore</a> (void)<dl class="el"><dd><font size=-1><em>Constructor.<br><br></em></font></dl><li><a name="a1" doxytag="wGui::CConfigStore::~CConfigStore"></a>virtual <a class="el" href="classwGui_1_1CConfigStore.html#a1">~CConfigStore</a> (void)<dl class="el"><dd><font size=-1><em>Destructor.<br><br></em></font></dl><li>std::pair< bool, std::string > <a class="el" href="classwGui_1_1CConfigStore.html#a2">GetStringEntry</a> (std::string sKey) const<li>std::pair< bool, long int > <a class="el" href="classwGui_1_1CConfigStore.html#a3">GetLongIntEntry</a> (std::string sKey) const<li>std::pair< bool, double > <a class="el" href="classwGui_1_1CConfigStore.html#a4">GetDoubleEntry</a> (std::string sKey) const<li>void <a class="el" href="classwGui_1_1CConfigStore.html#a5">SetStringEntry</a> (std::string sKey, std::string sValue)<li>void <a class="el" href="classwGui_1_1CConfigStore.html#a6">SetLongIntEntry</a> (std::string sKey, long int lValue)<li>void <a class="el" href="classwGui_1_1CConfigStore.html#a7">SetDoubleEntry</a> (std::string sKey, double dValue)<li>void <a class="el" href="classwGui_1_1CConfigStore.html#a8">RemoveEntry</a> (std::string sKey)<li>bool <a class="el" href="classwGui_1_1CConfigStore.html#a9">EntryExists</a> (std::string sKey) const<li>void <a class="el" href="classwGui_1_1CConfigStore.html#a10">StoreToFile</a> (std::string sFilename) const<li>void <a class="el" href="classwGui_1_1CConfigStore.html#a11">ReadFromFile</a> (std::string sFilename)<li><a name="a12" doxytag="wGui::CConfigStore::Clear"></a>void <a class="el" href="classwGui_1_1CConfigStore.html#a12">Clear</a> (void)<dl class="el"><dd><font size=-1><em>Clear all settings from the object.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>A class for storing configuration settings <a class="el" href="classwGui_1_1CConfigStore.html">CConfigStore</a> allows settings to be stored and read from common text files.<p><p>Definition at line <a class="el" href="wg__config__store_8h-source.html#l00039">39</a> of file <a class="el" href="wg__config__store_8h-source.html">wg_config_store.h</a>.<hr><h2>Member Function Documentation</h2><a name="a9" doxytag="wGui::CConfigStore::EntryExists"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool wGui::CConfigStore::EntryExists </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">std::string </td> <td class="mdname1" valign="top" nowrap> <em>sKey</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Test to see if a specified entry exists <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sKey</em> </td><td>A string that identifies the entry to be tested </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>true if the entry exists, otherwise false </dl><p>Definition at line <a class="el" href="wg__config__store_8cpp-source.html#l00104">104</a> of file <a class="el" href="wg__config__store_8cpp-source.html">wg_config_store.cpp</a>.<p>Referenced by <a class="el" href="wg__application_8cpp-source.html#l00163">wGui::CApplication::Init()</a>. </td> </tr></table><a name="a4" doxytag="wGui::CConfigStore::GetDoubleEntry"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> std::pair< bool, double > wGui::CConfigStore::GetDoubleEntry </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">std::string </td> <td class="mdname1" valign="top" nowrap> <em>sKey</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Read the specified setting as a double <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sKey</em> </td><td>A string that identifies the entry to be read </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>A pair, where the first bool indicates if the setting was retrieved, and the second is double value of the specified setting </dl><p>Definition at line <a class="el" href="wg__config__store_8cpp-source.html#l00065">65</a> of file <a class="el" href="wg__config__store_8cpp-source.html">wg_config_store.cpp</a>. </td> </tr></table><a name="a3" doxytag="wGui::CConfigStore::GetLongIntEntry"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> std::pair< bool, long int > wGui::CConfigStore::GetLongIntEntry </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">std::string </td> <td class="mdname1" valign="top" nowrap> <em>sKey</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Read the specified setting as an integer <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sKey</em> </td><td>A string that identifies the entry to be read </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>A pair, where the first bool indicates if the setting was retrieved, and the second is long integer value of the specified setting </dl><p>Definition at line <a class="el" href="wg__config__store_8cpp-source.html#l00050">50</a> of file <a class="el" href="wg__config__store_8cpp-source.html">wg_config_store.cpp</a>.<p>Referenced by <a class="el" href="wg__application_8cpp-source.html#l00163">wGui::CApplication::Init()</a>. </td> </tr></table><a name="a2" doxytag="wGui::CConfigStore::GetStringEntry"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> std::pair< bool, std::string > wGui::CConfigStore::GetStringEntry </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">std::string </td> <td class="mdname1" valign="top" nowrap> <em>sKey</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Read the specified setting as a string <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sKey</em> </td><td>A string that identifies the entry to be read </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>A pair, where the first bool indicates if the setting was retrieved, and the second is string value of the specified setting </dl><p>Definition at line <a class="el" href="wg__config__store_8cpp-source.html#l00035">35</a> of file <a class="el" href="wg__config__store_8cpp-source.html">wg_config_store.cpp</a>.<p>Referenced by <a class="el" href="wg__application_8cpp-source.html#l00288">wGui::CApplication::GetFontEngine()</a>, and <a class="el" href="wg__application_8cpp-source.html#l00163">wGui::CApplication::Init()</a>. </td> </tr></table><a name="a11" doxytag="wGui::CConfigStore::ReadFromFile"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void wGui::CConfigStore::ReadFromFile </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">std::string </td> <td class="mdname1" valign="top" nowrap> <em>sFilename</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Read the settings from a file This will not clear any current settings in the object, but will overwrite any values with the same key <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sFilename</em> </td><td>The filename to read the settings from </td></tr></table></dl><p>Definition at line <a class="el" href="wg__config__store_8cpp-source.html#l00126">126</a> of file <a class="el" href="wg__config__store_8cpp-source.html">wg_config_store.cpp</a>.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -