Sophie

Sophie

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

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: csFileReadHelper Class Reference (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 class="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>csFileReadHelper Class Reference</h1><!-- doxytag: class="csFileReadHelper" -->Convenience class for simple file element reading.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="filereadhelper_8h-source.html">csutil/filereadhelper.h</a>&gt;</code>
<p>

<p>
<a href="classcsFileReadHelper-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#5dd868383fdbf02111fc1bec99208c1a">csFileReadHelper</a> (<a class="el" href="structiFile.html">iFile</a> *file)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize reader.  <a href="#5dd868383fdbf02111fc1bec99208c1a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structiFile.html">iFile</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#e4cac3c87fca84500a2a2b7377255433">GetFile</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the wrapped file.  <a href="#e4cac3c87fca84500a2a2b7377255433"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#439cd7ce61130f69dcdd94cd98ee385e">Skip</a> (size_t num)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Skip a given amount of bytes.  <a href="#439cd7ce61130f69dcdd94cd98ee385e"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Character reading</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#dbe50097ed2e0962ab673d7a7f5298a5">GetChar</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a single character. Returns EOF if the stream has finished.  <a href="#dbe50097ed2e0962ab673d7a7f5298a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#4d0b844b7e5e4225fa88d9aec91672ae">LookChar</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the next character (or EOF), but don't move forward.  <a href="#4d0b844b7e5e4225fa88d9aec91672ae"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">String reading</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#24a49c66e482d2a9b96f206693a6ef1f">GetString</a> (char *buf, size_t len, bool OmitNewline=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a line of text.  <a href="#24a49c66e482d2a9b96f206693a6ef1f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#c93ae959f01bb87ddde8643786ee52f8">ReadTextFloat</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a floating-point value from the stream that is stored as ASCII.  <a href="#c93ae959f01bb87ddde8643786ee52f8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#0dfe6447f00ffd5235b86a7a21811aae">ReadTextInt</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read an integer value from the stream that is stored as ASCII.  <a href="#0dfe6447f00ffd5235b86a7a21811aae"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#d6097f7e762dfef15121670775d48c60">SkipWhitespace</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Skip any whitespace characters.  <a href="#d6097f7e762dfef15121670775d48c60"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Sized type reading</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="remark" compact><dt><b>Remarks:</b></dt><dd>No endian conversion is done. </dd></dl>
<br><br></div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e99ebafb823a15bb14b15ce484ebc34"></a><!-- doxytag: member="csFileReadHelper::ReadInt16" ref="0e99ebafb823a15bb14b15ce484ebc34" args="(int16 &amp;val)" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>ReadInt16</b> (<a class="el" href="group__util.html#g4355d16fcf9f644c9ac84293f0b1801f">int16</a> &amp;val)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ff67d85f7685876aca64ea8f1e84da06"></a><!-- doxytag: member="csFileReadHelper::ReadInt32" ref="ff67d85f7685876aca64ea8f1e84da06" args="(int32 &amp;val)" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>ReadInt32</b> (<a class="el" href="group__util.html#g56f1a81c92849566ae864511088eb7e8">int32</a> &amp;val)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsFileReadHelper.html#96db067db90dd1e08df89fea3f9fc6a6">ReadInt8</a> (<a class="el" href="group__util.html#ge47c588f3ab8c61121c1c7ab7edc47cd">int8</a> &amp;val)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a specifically sized data value from the file.  <a href="#96db067db90dd1e08df89fea3f9fc6a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6b08e8563949adfe2bc4b790683bb27c"></a><!-- doxytag: member="csFileReadHelper::ReadUInt16" ref="6b08e8563949adfe2bc4b790683bb27c" args="(uint16 &amp;val)" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>ReadUInt16</b> (<a class="el" href="group__util.html#g05f6b0ae8f6a6e135b0e290c25fe0e4e">uint16</a> &amp;val)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4d0032571f0c48393f3eb4a8decc5dfc"></a><!-- doxytag: member="csFileReadHelper::ReadUInt32" ref="4d0032571f0c48393f3eb4a8decc5dfc" args="(uint32 &amp;val)" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>ReadUInt32</b> (<a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> &amp;val)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="088ce66b77779f8c7246b3d363193c5f"></a><!-- doxytag: member="csFileReadHelper::ReadUInt8" ref="088ce66b77779f8c7246b3d363193c5f" args="(uint8 &amp;val)" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>ReadUInt8</b> (<a class="el" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79">uint8</a> &amp;val)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Convenience class for simple file element reading. 
<p>Definition at line <a class="el" href="filereadhelper_8h-source.html#l00035">35</a> of file <a class="el" href="filereadhelper_8h-source.html">filereadhelper.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="5dd868383fdbf02111fc1bec99208c1a"></a><!-- doxytag: member="csFileReadHelper::csFileReadHelper" ref="5dd868383fdbf02111fc1bec99208c1a" args="(iFile *file)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">csFileReadHelper::csFileReadHelper           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structiFile.html">iFile</a> *&nbsp;</td>
          <td class="paramname"> <em>file</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Initialize reader. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>file</em>&nbsp;</td><td>The file to subsequently read from. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="filereadhelper_8h-source.html#l00043">43</a> of file <a class="el" href="filereadhelper_8h-source.html">filereadhelper.h</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="dbe50097ed2e0962ab673d7a7f5298a5"></a><!-- doxytag: member="csFileReadHelper::GetChar" ref="dbe50097ed2e0962ab673d7a7f5298a5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int csFileReadHelper::GetChar           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read a single character. Returns EOF if the stream has finished. 
<p>

</div>
</div><p>
<a class="anchor" name="e4cac3c87fca84500a2a2b7377255433"></a><!-- doxytag: member="csFileReadHelper::GetFile" ref="e4cac3c87fca84500a2a2b7377255433" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structiFile.html">iFile</a>* csFileReadHelper::GetFile           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the wrapped file. 
<p>

<p>Definition at line <a class="el" href="filereadhelper_8h-source.html#l00046">46</a> of file <a class="el" href="filereadhelper_8h-source.html">filereadhelper.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="24a49c66e482d2a9b96f206693a6ef1f"></a><!-- doxytag: member="csFileReadHelper::GetString" ref="24a49c66e482d2a9b96f206693a6ef1f" args="(char *buf, size_t len, bool OmitNewline=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool csFileReadHelper::GetString           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>OmitNewline</em> = <code>true</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read a line of text. 
<p>
Returns false if the stream has finished. If 'OmitNewline' is true then the newline character will be thrown away. 
</div>
</div><p>
<a class="anchor" name="4d0b844b7e5e4225fa88d9aec91672ae"></a><!-- doxytag: member="csFileReadHelper::LookChar" ref="4d0b844b7e5e4225fa88d9aec91672ae" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int csFileReadHelper::LookChar           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the next character (or EOF), but don't move forward. 
<p>

</div>
</div><p>
<a class="anchor" name="96db067db90dd1e08df89fea3f9fc6a6"></a><!-- doxytag: member="csFileReadHelper::ReadInt8" ref="96db067db90dd1e08df89fea3f9fc6a6" args="(int8 &amp;val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool csFileReadHelper::ReadInt8           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__util.html#ge47c588f3ab8c61121c1c7ab7edc47cd">int8</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>val</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read a specifically sized data value from the file. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>val</em>&nbsp;</td><td>The variable to read to. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>False on EOF. </dd></dl>

</div>
</div><p>
<a class="anchor" name="c93ae959f01bb87ddde8643786ee52f8"></a><!-- doxytag: member="csFileReadHelper::ReadTextFloat" ref="c93ae959f01bb87ddde8643786ee52f8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float csFileReadHelper::ReadTextFloat           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read a floating-point value from the stream that is stored as ASCII. 
<p>

</div>
</div><p>
<a class="anchor" name="0dfe6447f00ffd5235b86a7a21811aae"></a><!-- doxytag: member="csFileReadHelper::ReadTextInt" ref="0dfe6447f00ffd5235b86a7a21811aae" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int csFileReadHelper::ReadTextInt           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read an integer value from the stream that is stored as ASCII. 
<p>

</div>
</div><p>
<a class="anchor" name="439cd7ce61130f69dcdd94cd98ee385e"></a><!-- doxytag: member="csFileReadHelper::Skip" ref="439cd7ce61130f69dcdd94cd98ee385e" args="(size_t num)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csFileReadHelper::Skip           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>num</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Skip a given amount of bytes. 
<p>

<p>Definition at line <a class="el" href="filereadhelper_8h-source.html#l00049">49</a> of file <a class="el" href="filereadhelper_8h-source.html">filereadhelper.h</a>.</p>

<p>References <a class="el" href="structiFile.html#411c083eb2f6745a7fa0fe15f598ad0b">iFile::SetPos()</a>.</p>

</div>
</div><p>
<a class="anchor" name="d6097f7e762dfef15121670775d48c60"></a><!-- doxytag: member="csFileReadHelper::SkipWhitespace" ref="d6097f7e762dfef15121670775d48c60" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csFileReadHelper::SkipWhitespace           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Skip any whitespace characters. 
<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csutil/<a class="el" href="filereadhelper_8h-source.html">filereadhelper.h</a></ul>
<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>