101 lines
8.0 KiB
HTML
101 lines
8.0 KiB
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>/include/ZE_ZConfigFile.h Source File</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.3 -->
|
|
<center>
|
|
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
|
<hr><h1>/include/ZE_ZConfigFile.h</h1><a href="ZE__ZConfigFile_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*******************************************************************************</span>
|
|
00002 <span class="comment"> This file is Part of the ZEngine Library for 2D game development.</span>
|
|
00003 <span class="comment"> Copyright (C) 2002, 2003 James Turk</span>
|
|
00004 <span class="comment"></span>
|
|
00005 <span class="comment"> Licensed under a BSD-style license.</span>
|
|
00006 <span class="comment"></span>
|
|
00007 <span class="comment"> The maintainer of this library is James Turk (james@conceptofzero.net) </span>
|
|
00008 <span class="comment"> and the home of this Library is http://www.zengine.sourceforge.net</span>
|
|
00009 <span class="comment">*******************************************************************************/</span>
|
|
00010
|
|
00021 <span class="preprocessor">#ifndef __ze_zconfigfile_h__</span>
|
|
00022 <span class="preprocessor"></span><span class="preprocessor">#define __ze_zconfigfile_h__</span>
|
|
00023 <span class="preprocessor"></span>
|
|
00024 <span class="preprocessor">#include "<a class="code" href="ZE__ZEngine_8h.html">ZE_ZEngine.h</a>"</span>
|
|
00025
|
|
00026 <span class="keyword">namespace </span>ZE
|
|
00027 {
|
|
00028
|
|
<a name="l00034"></a><a class="code" href="classZE_1_1ZConfigFile.html">00034</a> <span class="keyword">class </span><a class="code" href="classZE_1_1ZConfigFile.html">ZConfigFile</a>
|
|
00035 {
|
|
00036 <span class="keyword">private</span>:
|
|
00037
|
|
00038 <span class="comment">//Private Types//</span>
|
|
00039
|
|
<a name="l00046"></a><a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Variable.html">00046</a> <span class="keyword">class </span><a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Variable.html">ZCF_Variable</a>
|
|
00047 {
|
|
00048 <span class="keyword">public</span>:
|
|
<a name="l00050"></a><a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Variable.html#m0">00050</a> std::string <a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Variable.html#m0">var</a>;
|
|
<a name="l00052"></a><a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Variable.html#m1">00052</a> std::string <a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Variable.html#m1">val</a>;
|
|
00053 };
|
|
00054
|
|
<a name="l00060"></a><a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Section.html">00060</a> <span class="keyword">class </span><a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Section.html">ZCF_Section</a>
|
|
00061 {
|
|
00062 <span class="keyword">public</span>:
|
|
<a name="l00064"></a><a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Section.html#m0">00064</a> std::string <a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Section.html#m0">section</a>;
|
|
<a name="l00066"></a><a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Section.html#m1">00066</a> std::list<ZCF_Variable> <a class="code" href="classZE_1_1ZConfigFile_1_1ZCF__Section.html#m1">varList</a>;
|
|
00067 };
|
|
00068
|
|
00069 <span class="keyword">protected</span>:
|
|
<a name="l00071"></a><a class="code" href="classZE_1_1ZConfigFile.html#n0">00071</a> std::list<ZCF_Section> <a class="code" href="classZE_1_1ZConfigFile.html#n0">rFileLayout</a>;
|
|
<a name="l00073"></a><a class="code" href="classZE_1_1ZConfigFile.html#n1">00073</a> std::string <a class="code" href="classZE_1_1ZConfigFile.html#n1">rFilename</a>;
|
|
00074
|
|
00082 std::string <a class="code" href="classZE_1_1ZConfigFile.html#b0">CleanString</a>(std::string str) <span class="keyword">const</span>;
|
|
00083
|
|
00091 <span class="keywordtype">bool</span> <a class="code" href="classZE_1_1ZConfigFile.html#b1">Exists</a>(std::string sec) <span class="keyword">const</span>;
|
|
00092
|
|
00101 <span class="keywordtype">bool</span> <a class="code" href="classZE_1_1ZConfigFile.html#b1">Exists</a>(std::string sec, std::string var) <span class="keyword">const</span>;
|
|
00102
|
|
00111 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZConfigFile.html#b3">SetVariable</a>(std::string sec, std::string var, std::string val);
|
|
00112
|
|
00122 std::string <a class="code" href="classZE_1_1ZConfigFile.html#b4">GetVariable</a>(std::string sec, std::string var, std::string defVal) <span class="keyword">const</span>;
|
|
00123
|
|
00124 <span class="keyword">public</span>:
|
|
00125
|
|
00131 <a class="code" href="classZE_1_1ZConfigFile.html#a0">ZConfigFile</a>();
|
|
00132
|
|
00139 <a class="code" href="classZE_1_1ZConfigFile.html#a0">ZConfigFile</a>(std::string filename);
|
|
00140
|
|
00146 <span class="keyword">virtual</span> <a class="code" href="classZE_1_1ZConfigFile.html#a2">~ZConfigFile</a>();
|
|
00147
|
|
00154 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZConfigFile.html#a3">Process</a>(std::string filename);
|
|
00155
|
|
00166 <span class="keywordtype">float</span> <a class="code" href="classZE_1_1ZConfigFile.html#a4">GetFloat</a>(std::string section, std::string var, <span class="keywordtype">float</span> defVal) <span class="keyword">const</span>;
|
|
00167
|
|
00177 <span class="keywordtype">int</span> <a class="code" href="classZE_1_1ZConfigFile.html#a5">GetInt</a>(std::string section, std::string var, <span class="keywordtype">int</span> defVal) <span class="keyword">const</span>;
|
|
00178
|
|
00189 <span class="keywordtype">bool</span> <a class="code" href="classZE_1_1ZConfigFile.html#a6">GetBool</a>(std::string section, std::string var, <span class="keywordtype">bool</span> defVal) <span class="keyword">const</span>;
|
|
00190
|
|
00200 std::string <a class="code" href="classZE_1_1ZConfigFile.html#a7">GetString</a>(std::string section, std::string var, std::string defVal) <span class="keyword">const</span>;
|
|
00201
|
|
00212 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZConfigFile.html#a8">SetFloat</a>(std::string section, std::string var, <span class="keywordtype">float</span> val);
|
|
00213
|
|
00223 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZConfigFile.html#a9">SetInt</a>(std::string section, std::string var, <span class="keywordtype">int</span> val);
|
|
00224
|
|
00234 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZConfigFile.html#a10">SetBool</a>(std::string section, std::string var, <span class="keywordtype">bool</span> val);
|
|
00235
|
|
00245 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZConfigFile.html#a11">SetString</a>(std::string section, std::string var, std::string val);
|
|
00246
|
|
00252 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZConfigFile.html#a12">Flush</a>();
|
|
00253
|
|
00259 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZConfigFile.html#a13">Close</a>();
|
|
00260 };
|
|
00261
|
|
00262 }
|
|
00263
|
|
00264 <span class="preprocessor">#endif //__ze_zconfigfile_h__</span>
|
|
</pre></div><hr><address style="align: right;"><small>Generated on Sun Jun 29 14:13:50 2003 for ZEngine by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border=0
|
|
width=110 height=53></a>1.3 </small></address>
|
|
</body>
|
|
</html>
|