zengine/doc/html/classZE_1_1ZConfigFile.html

779 lines
30 KiB
HTML
Raw Normal View History

2002-11-21 05:40:49 +00:00
<!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>ZE::ZConfigFile class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
2002-12-22 04:31:15 +00:00
<!-- Generated by Doxygen 1.3-rc2 -->
2002-11-21 05:40:49 +00:00
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>ZE::ZConfigFile Class Reference</h1><code>#include &lt;<a class="el" href="ZE__ZConfigFile_8h-source.html">ZE_ZConfigFile.h</a>&gt;</code>
<p>
Inherits <a class="el" href="classZE_1_1ZObject.html">ZE::ZObject</a>.
<p>
<a href="classZE_1_1ZConfigFile-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classZE_1_1ZConfigFile.html">ZConfigFile</a> class for INI-style configuration files for games or applications. Inherited from <a class="el" href="classZE_1_1ZObject.html">ZObject</a>.
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a0">ZConfigFile</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Default constructor.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a1">ZConfigFile</a> (string filename)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Constructor which takes filename.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a2">~ZConfigFile</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Destructor, flushes file.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a3">Process</a> (string filename)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Parse a file.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a4">GetInt</a> (string section, string var, int defVal)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get value in integer format from file.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a5">GetBool</a> (string section, string var, bool defVal)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get value in boolean format from file.</em> <a href="#a5"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>string&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a6">GetString</a> (string section, string var, string defVal)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get value in string format from file.</em> <a href="#a6"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a7">SetInt</a> (string section, string var, int val)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Set value in integer format in file.</em> <a href="#a7"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a8">SetBool</a> (string section, string var, bool val)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Set value in boolean format in file.</em> <a href="#a8"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a9">SetString</a> (string section, string var, string val)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Set value in string format in file.</em> <a href="#a9"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a10">Flush</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Write all values to file.</em> <a href="#a10"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#a11">Close</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Close the file.</em> <a href="#a11"></a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>string&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#c0">CleanString</a> (string str)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Reformat a string in a form more suitable to parsing.</em> <a href="#c0"></a><em></em></font><br><br></td></tr>
2002-12-05 00:05:06 +00:00
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#c1">Exists</a> (string sec)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Check if a section exists.</em> <a href="#c1"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#c2">Exists</a> (string sec, string var)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Check if a variable exists.</em> <a href="#c2"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#c3">SetVariable</a> (string sec, string var, string val)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Internal function to set variables.</em> <a href="#c3"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>string&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#c4">GetVariable</a> (string sec, string var, string defVal)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Internal function to get value of a variable.</em> <a href="#c4"></a><em></em></font><br><br></td></tr>
2002-11-21 05:40:49 +00:00
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="o0" doxytag="ZE::ZConfigFile::mFileLayout"></a>
list&lt; <a class="el" href="classZE_1_1ZConfigFile_1_1ZCF__Section.html">ZCF_Section</a> &gt;&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#o0">mFileLayout</a></td></tr>
2002-11-21 05:40:49 +00:00
<tr><td>&nbsp;</td><td><font size=-1><em>List of sections of internal type.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="o1" doxytag="ZE::ZConfigFile::mFilename"></a>
string&nbsp;</td><td valign=bottom><a class="el" href="classZE_1_1ZConfigFile.html#o1">mFilename</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Filename of file currently open.</em></font><br><br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="ZE::ZConfigFile::ZConfigFile"></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"> ZE::ZConfigFile::ZConfigFile </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
A no-op default constructor. </td>
</tr>
</table>
<a name="a1" doxytag="ZE::ZConfigFile::ZConfigFile"></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"> ZE::ZConfigFile::ZConfigFile </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>filename</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
2002-12-05 00:05:06 +00:00
Constructor takes filename, and calls process on it. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>filename</em>&nbsp;</td><td>File to load as <a class="el" href="classZE_1_1ZConfigFile.html">ZConfigFile</a>. </td></tr>
</table>
</dl>
</td>
2002-11-21 05:40:49 +00:00
</tr>
</table>
<a name="a2" doxytag="ZE::ZConfigFile::~ZConfigFile"></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"> ZE::ZConfigFile::~ZConfigFile </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Flushes the file, ensures a flush if the file is left open. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="c0" doxytag="ZE::ZConfigFile::CleanString"></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"> string ZE::ZConfigFile::CleanString </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>str</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
2002-12-05 00:05:06 +00:00
Removes whitespace from a string and makes all characters lowercase. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>str</em>&nbsp;</td><td>The string to get a clean version of. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Cleaned string. </dd></dl>
</td>
</tr>
</table>
<a name="c1" doxytag="ZE::ZConfigFile::Exists"></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 ZE::ZConfigFile::Exists </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>sec</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Find out if a section currently exists. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>sec</em>&nbsp;</td><td>Section to check for. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>bool, true if section exists in file. </dd></dl>
</td>
</tr>
</table>
<a name="c2" doxytag="ZE::ZConfigFile::Exists"></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 ZE::ZConfigFile::Exists </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>sec</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>var</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
2002-12-05 00:05:06 +00:00
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Find out if a variable currently exists. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>sec</em>&nbsp;</td><td>Section to check in. </td></tr>
<tr><td valign=top><em>var</em>&nbsp;</td><td>Variable to check for. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>bool, true if section exists in file. </dd></dl>
</td>
</tr>
</table>
<a name="c3" doxytag="ZE::ZConfigFile::SetVariable"></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 ZE::ZConfigFile::SetVariable </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>sec</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>var</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>val</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set variable to value, called internally only. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>sec</em>&nbsp;</td><td>Section for variable. </td></tr>
<tr><td valign=top><em>var</em>&nbsp;</td><td>Variable to set. </td></tr>
<tr><td valign=top><em>val</em>&nbsp;</td><td>Value to set variable to. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="c4" doxytag="ZE::ZConfigFile::GetVariable"></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"> string ZE::ZConfigFile::GetVariable </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>sec</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>var</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>defVal</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Get value of variable, called internally only. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>sec</em>&nbsp;</td><td>Section for variable. </td></tr>
<tr><td valign=top><em>var</em>&nbsp;</td><td>Variable to get. </td></tr>
<tr><td valign=top><em>defVal</em>&nbsp;</td><td>Value to return if variable doesnt exist. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Value of variable. </dd></dl>
</td>
2002-11-21 05:40:49 +00:00
</tr>
</table>
<a name="a3" doxytag="ZE::ZConfigFile::Process"></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 ZE::ZConfigFile::Process </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>filename</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
2002-12-05 00:05:06 +00:00
Parses the file, reading the contents into the fileLayout map. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>filename</em>&nbsp;</td><td>File to parse and attach this ZDataFile to. </td></tr>
</table>
</dl>
</td>
2002-11-21 05:40:49 +00:00
</tr>
</table>
<a name="a4" doxytag="ZE::ZConfigFile::GetInt"></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"> int ZE::ZConfigFile::GetInt </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>section</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>var</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>defVal</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
2002-12-05 00:05:06 +00:00
Get the current value of a variable in the file, or defVal if not found in file. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>section</em>&nbsp;</td><td>Name of section to seek variable under. </td></tr>
<tr><td valign=top><em>var</em>&nbsp;</td><td>Name of variable to seek value for. </td></tr>
<tr><td valign=top><em>defVal</em>&nbsp;</td><td>Value to return if var does not exist within section. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Contents of the variable in integer format. </dd></dl>
</td>
2002-11-21 05:40:49 +00:00
</tr>
</table>
<a name="a5" doxytag="ZE::ZConfigFile::GetBool"></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 ZE::ZConfigFile::GetBool </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>section</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>var</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>defVal</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
2002-12-05 00:05:06 +00:00
Get the current value of a variable in the file, or defVal if not found in file. (Valid values are "0","1","true" and "false") <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>section</em>&nbsp;</td><td>Name of section to seek variable under. </td></tr>
<tr><td valign=top><em>var</em>&nbsp;</td><td>Name of variable to seek value for. </td></tr>
<tr><td valign=top><em>defVal</em>&nbsp;</td><td>Value to return if var does not exist within section. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Contents of the variable in boolean format. </dd></dl>
</td>
2002-11-21 05:40:49 +00:00
</tr>
</table>
<a name="a6" doxytag="ZE::ZConfigFile::GetString"></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"> string ZE::ZConfigFile::GetString </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>section</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>var</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>defVal</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
2002-12-05 00:05:06 +00:00
Get the current value of a variable in the file, or defVal if not found in file. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>section</em>&nbsp;</td><td>Name of section to seek variable under. </td></tr>
<tr><td valign=top><em>var</em>&nbsp;</td><td>Name of variable to seek value for. </td></tr>
<tr><td valign=top><em>defVal</em>&nbsp;</td><td>Value to return if var does not exist within section. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Contents of the variable in string format. </dd></dl>
</td>
2002-11-21 05:40:49 +00:00
</tr>
</table>
<a name="a7" doxytag="ZE::ZConfigFile::SetInt"></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 ZE::ZConfigFile::SetInt </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>section</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>var</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>val</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
2002-12-05 00:05:06 +00:00
Set the new value of a variable in the file to val, creating the section and variable if not already found in file. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>section</em>&nbsp;</td><td>Name of section to edit variable under. </td></tr>
<tr><td valign=top><em>var</em>&nbsp;</td><td>Name of variable to set value for. </td></tr>
<tr><td valign=top><em>val</em>&nbsp;</td><td>Integer value to set variable to in file. </td></tr>
</table>
</dl>
</td>
2002-11-21 05:40:49 +00:00
</tr>
</table>
<a name="a8" doxytag="ZE::ZConfigFile::SetBool"></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 ZE::ZConfigFile::SetBool </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>section</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>var</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>bool&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>val</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
2002-12-05 00:05:06 +00:00
Set the new value of a variable in the file to val, creating the section and variable if not already found in file. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>section</em>&nbsp;</td><td>Name of section to edit variable under. </td></tr>
<tr><td valign=top><em>var</em>&nbsp;</td><td>Name of variable to set value for. </td></tr>
<tr><td valign=top><em>val</em>&nbsp;</td><td>Boolean value to set variable to in file. </td></tr>
</table>
</dl>
</td>
2002-11-21 05:40:49 +00:00
</tr>
</table>
<a name="a9" doxytag="ZE::ZConfigFile::SetString"></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 ZE::ZConfigFile::SetString </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>section</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>var</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>string&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>val</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
2002-12-05 00:05:06 +00:00
Set the new value of a variable in the file to val, creating the section and variable if not already found in file. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>section</em>&nbsp;</td><td>Name of section to edit variable under. </td></tr>
<tr><td valign=top><em>var</em>&nbsp;</td><td>Name of variable to set value for. </td></tr>
<tr><td valign=top><em>val</em>&nbsp;</td><td>String value to set variable to in file. </td></tr>
</table>
</dl>
</td>
2002-11-21 05:40:49 +00:00
</tr>
</table>
<a name="a10" doxytag="ZE::ZConfigFile::Flush"></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 ZE::ZConfigFile::Flush </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Writes all values and sections to file. </td>
</tr>
</table>
<a name="a11" doxytag="ZE::ZConfigFile::Close"></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 ZE::ZConfigFile::Close </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Flush the file and clear the filename. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
2002-12-22 04:31:15 +00:00
<li>/include/<a class="el" href="ZE__ZConfigFile_8h-source.html">ZE_ZConfigFile.h</a><li>/src/<a class="el" href="ZE__ZConfigFile_8cpp.html">ZE_ZConfigFile.cpp</a></ul>
<hr><address style="align: right;"><small>Generated on Sat Dec 21 23:20:23 2002 for ZEngine by
2002-11-21 05:40:49 +00:00
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0
2002-12-22 04:31:15 +00:00
width=110 height=53></a>1.3-rc2 </small></address>
2002-11-21 05:40:49 +00:00
</body>
</html>