Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1912

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!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>Crystal Space 1.2.1: iutil/cfgfile.h Source File (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>iutil/cfgfile.h</h1><a href="iutil_2cfgfile_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2001 by Martin Geisse &lt;mgeisse@gmx.net&gt;</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">    This library is free software; you can redistribute it and/or</span>
<a name="l00005"></a>00005 <span class="comment">    modify it under the terms of the GNU Library General Public</span>
<a name="l00006"></a>00006 <span class="comment">    License as published by the Free Software Foundation; either</span>
<a name="l00007"></a>00007 <span class="comment">    version 2 of the License, or (at your option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">    This library is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00012"></a>00012 <span class="comment">    Library General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">    You should have received a copy of the GNU Library General Public</span>
<a name="l00015"></a>00015 <span class="comment">    License along with this library; if not, write to the Free</span>
<a name="l00016"></a>00016 <span class="comment">    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef __CS_IUTIL_CFGFILE_H__</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IUTIL_CFGFILE_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="scf__interface_8h.html" title="Crystal Space Shared Class Facility (SCF) - interface creation support.">csutil/scf_interface.h</a>"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="ref_8h.html" title="Smart Pointers.">csutil/ref.h</a>"</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">struct </span><a class="code" href="structiConfigIterator.html" title="Iterator which allows sequential access to configuration information contained in...">iConfigIterator</a>;
<a name="l00031"></a>00031 <span class="keyword">struct </span><a class="code" href="structiVFS.html" title="The Virtual Filesystem Class is intended to be the only way for Crystal Space engine...">iVFS</a>;
<a name="l00032"></a>00032 
<a name="l00036"></a><a class="code" href="structiConfigFile.html">00036</a> <span class="keyword">struct </span><a class="code" href="structiConfigFile.html" title="Configuration file interface.">iConfigFile</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a>
<a name="l00037"></a>00037 {
<a name="l00038"></a>00038   SCF_INTERFACE(<a class="code" href="structiConfigFile.html" title="Configuration file interface.">iConfigFile</a>, 2,0,0);
<a name="l00040"></a>00040   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structiConfigFile.html#2183db4f11cdcaf8b9dd8b92618585e6" title="Get configuration file name.">GetFileName</a> () <span class="keyword">const</span> = 0;
<a name="l00041"></a>00041 
<a name="l00046"></a>00046   <span class="keyword">virtual</span> <a class="code" href="structiVFS.html" title="The Virtual Filesystem Class is intended to be the only way for Crystal Space engine...">iVFS</a>* <a class="code" href="structiConfigFile.html#6d13df20f0442c1fbf65f59e4daac67a" title="Get the VFS object on which this file is stored (if any).">GetVFS</a> () <span class="keyword">const</span> = 0;
<a name="l00047"></a>00047 
<a name="l00052"></a>00052   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigFile.html#020ae0fa1c3ce264bd46ed90561c4dbd" title="Set config file name.">SetFileName</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>*, <a class="code" href="structiVFS.html" title="The Virtual Filesystem Class is intended to be the only way for Crystal Space engine...">iVFS</a>*) = 0;
<a name="l00053"></a>00053 
<a name="l00069"></a>00069   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigFile.html#0b1a3f6ebd3ccaa9be019fb616156ad7" title="Load a configuration file.">Load</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>* iFileName, <a class="code" href="structiVFS.html" title="The Virtual Filesystem Class is intended to be the only way for Crystal Space engine...">iVFS</a>* = 0, <span class="keywordtype">bool</span> Merge = <span class="keyword">false</span>,
<a name="l00070"></a>00070     <span class="keywordtype">bool</span> NewWins = <span class="keyword">true</span>) = 0;
<a name="l00071"></a>00071 
<a name="l00076"></a>00076   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigFile.html#e1a3711352a01b8e5611fb6d0d58a351" title="Save configuration to the same place from which it was loaded.">Save</a> () = 0;
<a name="l00077"></a>00077 
<a name="l00084"></a>00084   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigFile.html#e1a3711352a01b8e5611fb6d0d58a351" title="Save configuration to the same place from which it was loaded.">Save</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *iFileName, <a class="code" href="structiVFS.html" title="The Virtual Filesystem Class is intended to be the only way for Crystal Space engine...">iVFS</a>* = 0) = 0;
<a name="l00085"></a>00085 
<a name="l00087"></a>00087   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigFile.html#2f9ffafeb0fb141317ccd4bcdf27a4c5" title="Delete all options and rewind all iterators.">Clear</a> () = 0;
<a name="l00088"></a>00088 
<a name="l00095"></a>00095   <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr&lt;iConfigIterator&gt;</a> <a class="code" href="structiConfigFile.html#b7c4701d439cecfa848ee2d2d3069b53" title="Enumerate selected keys.">Enumerate</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Subsection = 0) = 0;
<a name="l00096"></a>00096 
<a name="l00098"></a>00098   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigFile.html#ea44c9e9825898dffa3024247e247e6f" title="Test if a key exists.">KeyExists</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key) <span class="keyword">const</span> = 0;
<a name="l00100"></a>00100   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigFile.html#aa086cbf83a800a3e9ed9fc88740b376" title="Test if at least one key exists with the given Subsection prefix.">SubsectionExists</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Subsection) <span class="keyword">const</span> = 0;
<a name="l00101"></a>00101 
<a name="l00106"></a>00106   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiConfigFile.html#058ef45008514b8fab06e5b3bf126238" title="Get an integer value from the configuration.">GetInt</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <span class="keywordtype">int</span> Def = 0) <span class="keyword">const</span> = 0;
<a name="l00111"></a>00111   <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiConfigFile.html#c829e1af3a2a530eef875a969c9b24ac" title="Get a float value from the configuration.">GetFloat</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <span class="keywordtype">float</span> Def = 0.0) <span class="keyword">const</span> = 0;
<a name="l00116"></a>00116   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiConfigFile.html#f1907f764a4fd50addec669a214491a6" title="Get a string value from the configuration.">GetStr</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <span class="keyword">const</span> <span class="keywordtype">char</span> *Def = <span class="stringliteral">""</span>) <span class="keyword">const</span> = 0;
<a name="l00121"></a>00121   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigFile.html#571a6754e0628698e00939db8e978aab" title="Get a boolean value from the configuration.">GetBool</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <span class="keywordtype">bool</span> Def = <span class="keyword">false</span>) <span class="keyword">const</span> = 0;
<a name="l00123"></a>00123   <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr&lt;iStringArray&gt;</a> <a class="code" href="structiConfigFile.html#502760e45145e28b475c9217399c39a3" title="Get a tuple set from the configuration.">GetTuple</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *Key) <span class="keyword">const</span> = 0;
<a name="l00125"></a>00125   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiConfigFile.html#1340a49a3b842a014efddfee86046b24" title="Get the comment of the given key, or 0 if no comment exists.">GetComment</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key) <span class="keyword">const</span> = 0;
<a name="l00126"></a>00126 
<a name="l00128"></a>00128   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigFile.html#98cd57c950aa067f5ffa51e7b22a8f6e" title="Set an null-terminated string value.">SetStr</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <span class="keyword">const</span> <span class="keywordtype">char</span> *Val) = 0;
<a name="l00130"></a>00130   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigFile.html#16d2d2c324f71e232fd86ccc42b678f0" title="Set an integer value.">SetInt</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <span class="keywordtype">int</span> Value) = 0;
<a name="l00132"></a>00132   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigFile.html#d6fddd5fd6223bd179c1da1f101464a6" title="Set a floating-point value.">SetFloat</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <span class="keywordtype">float</span> Value) = 0;
<a name="l00134"></a>00134   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigFile.html#075259cdd90c949538041f6bd0d98722" title="Set a boolean value.">SetBool</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <span class="keywordtype">bool</span> Value) = 0;
<a name="l00136"></a>00136   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigFile.html#5ceeff4b4cdcf00c38d1a4ed7a1a92b7" title="Set a tuple value.">SetTuple</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <a class="code" href="structiStringArray.html" title="This is an SCF-compatible interface for csStringArray.">iStringArray</a>* Value) = 0;
<a name="l00143"></a>00143   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigFile.html#0c6dd11917647182fb9632264e588c42" title="Set the comment for given key.">SetComment</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key, <span class="keyword">const</span> <span class="keywordtype">char</span> *Text) = 0;
<a name="l00145"></a>00145   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigFile.html#be5a3cd2a0008b2b1a1d0bf6fadf26c3" title="Delete a key and its value and comment.">DeleteKey</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Key) = 0;
<a name="l00147"></a>00147   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiConfigFile.html#db1a8f5c2ac5fdcce859df5538a4d654" title="return the final comment at the end of the configuration file">GetEOFComment</a> () <span class="keyword">const</span> = 0;
<a name="l00149"></a>00149   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigFile.html#0ed1957a7cdd5b9de17c92dd4b7d2a82" title="set the final comment at the end of the configuration file">SetEOFComment</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Text) = 0;
<a name="l00150"></a>00150 };
<a name="l00151"></a>00151 
<a name="l00152"></a>00152 
<a name="l00157"></a><a class="code" href="structiConfigIterator.html">00157</a> <span class="keyword">struct </span><a class="code" href="structiConfigIterator.html" title="Iterator which allows sequential access to configuration information contained in...">iConfigIterator</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a>
<a name="l00158"></a>00158 {
<a name="l00159"></a>00159   SCF_INTERFACE(<a class="code" href="structiConfigIterator.html" title="Iterator which allows sequential access to configuration information contained in...">iConfigIterator</a>, 2,1,0);
<a name="l00161"></a>00161   <span class="keyword">virtual</span> <a class="code" href="structiConfigFile.html" title="Configuration file interface.">iConfigFile</a> *<a class="code" href="structiConfigIterator.html#7408c25ed5507f5b5cfb331873385e76" title="Returns the configuration object for this iterator.">GetConfigFile</a> () <span class="keyword">const</span> = 0;
<a name="l00163"></a>00163   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiConfigIterator.html#4fee237b80c2c9d56003e54e6bf66097" title="Returns the subsection in the configuration.">GetSubsection</a> () <span class="keyword">const</span> = 0;
<a name="l00164"></a>00164 
<a name="l00166"></a>00166   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiConfigIterator.html#f1398cfdc4aeb4c85c36263035c16c11" title="Rewind the iterator (points to nowhere after this).">Rewind</a> () = 0;
<a name="l00168"></a>00168   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigIterator.html#5be26e40e64e7a13b156431fb54e0d25" title="Move to the next valid key. Returns false if no more keys exist.">Next</a>() = 0;
<a name="l00170"></a>00170   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigIterator.html#c452088aeafb8b132d2b99bd700f6fea" title="Return whether there is another valid key.">HasNext</a>() = 0;
<a name="l00171"></a>00171 
<a name="l00172"></a>00172 
<a name="l00179"></a>00179   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiConfigIterator.html#2fc96577deafa1c4b73ebc6736503b73" title="Get the current key name.">GetKey</a> (<span class="keywordtype">bool</span> Local = <span class="keyword">false</span>) <span class="keyword">const</span> = 0;
<a name="l00181"></a>00181   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiConfigIterator.html#2dc4b11a259b1e9afc586554f7bf0bcd" title="Get an integer value from the configuration.">GetInt</a> () <span class="keyword">const</span> = 0;
<a name="l00183"></a>00183   <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiConfigIterator.html#81d2d906f24123bf2af46c963fe40058" title="Get a float value from the configuration.">GetFloat</a> () <span class="keyword">const</span> = 0;
<a name="l00185"></a>00185   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiConfigIterator.html#2d49f0489da4d331978d54c2791bbdb9" title="Get a string value from the configuration.">GetStr</a> () <span class="keyword">const</span> = 0;
<a name="l00187"></a>00187   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiConfigIterator.html#354ece7957e771b8fa0e616c99409d08" title="Get a boolean value from the configuration.">GetBool</a> () <span class="keyword">const</span> = 0;
<a name="l00189"></a>00189   <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr&lt;iStringArray&gt;</a> <a class="code" href="structiConfigIterator.html#3f3727e1b89edc96744c4847aed66c9a" title="Get a tuple set from the configuration.">GetTuple</a>() <span class="keyword">const</span> = 0;
<a name="l00191"></a>00191   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiConfigIterator.html#55dc4809718fb2e1d205bf1cf3be59f9" title="Get the comment of the given key, or 0 if no comment exists.">GetComment</a> () <span class="keyword">const</span> = 0;
<a name="l00192"></a>00192 };
<a name="l00195"></a>00195 <span class="preprocessor">#endif // __CS_IUTIL_CFGFILE_H__</span>
</pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>