Sophie

Sophie

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

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: iFile Struct 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>iFile Struct Reference<br>
<small>
[<a class="el" href="group__vfs.html">Virtual File System (VFS)</a>]</small>
</h1><!-- doxytag: class="iFile" --><!-- doxytag: inherits="iBase" -->A replacement for FILE type in the virtual file space.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="vfs_8h-source.html">iutil/vfs.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for iFile:</div>
<div class="dynsection">
<p><center><img src="structiFile__inherit__graph.png" border="0" usemap="#iFile__inherit__map" alt="Inheritance graph"></center>
<map name="iFile__inherit__map">
<area shape="rect" href="classscfImplementation1.html" title="scfImplementation1\&lt; csMemFile, iFile \&gt;" alt="" coords="212,5,489,32"><area shape="rect" href="classscfImplementation1.html" title="scfImplementation1\&lt; csPhysicalFile, iFile \&gt;" alt="" coords="203,56,499,83"><area shape="rect" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one..." alt="" coords="5,31,61,57"><area shape="rect" href="classcsMemFile.html" title="Essentially a raw memory buffer which implements the abstract iFile interface." alt="" coords="556,5,644,32"><area shape="rect" href="classcsPhysicalFile.html" title="An implementation of the abstract iFile interface for real files within the physical..." alt="" coords="547,56,653,83"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="structiFile-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">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#f1da4c6ef65ca75360d134b0cd047dc9">AtEOF</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the stream is at end-of-file, else false.  <a href="#f1da4c6ef65ca75360d134b0cd047dc9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#eae974e73b0c49bf22d6c11c4c4f5eb2">Flush</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flush stream.  <a href="#eae974e73b0c49bf22d6c11c4c4f5eb2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classcsPtr.html">csPtr</a><br>
&lt; <a class="el" href="structiDataBuffer.html">iDataBuffer</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#8b4612b4492382cf2d4f17dd4bbf364e">GetAllData</a> (bool nullterm=false)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request whole content of the file as a single data buffer.  <a href="#8b4612b4492382cf2d4f17dd4bbf364e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#0d39996448ca1794faa2bdf58d6b186b">GetName</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query file name (in VFS).  <a href="#0d39996448ca1794faa2bdf58d6b186b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#63192d4c90e269feef6075d8c7f81efb">GetPos</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query current file pointer.  <a href="#63192d4c90e269feef6075d8c7f81efb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#184c528adfec25f53545fe9271ff374b">GetSize</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query file size.  <a href="#184c528adfec25f53545fe9271ff374b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#a0f33b299c54426c60d5ce7d9f1db8de">GetStatus</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check (and clear) file last error status.  <a href="#a0f33b299c54426c60d5ce7d9f1db8de"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#23a8ceeaf85b15241acd3ef2f98b78d4">Read</a> (char *Data, size_t DataSize)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read DataSize bytes and place them into the buffer at which Data points.  <a href="#23a8ceeaf85b15241acd3ef2f98b78d4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#411c083eb2f6745a7fa0fe15f598ad0b">SetPos</a> (size_t newpos)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set new file pointer.  <a href="#411c083eb2f6745a7fa0fe15f598ad0b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiFile.html#73a0d4bf182d42deb70e9982c3b17af7">Write</a> (const char *Data, size_t DataSize)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write DataSize bytes from the buffer at which Data points.  <a href="#73a0d4bf182d42deb70e9982c3b17af7"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A replacement for FILE type in the virtual file space. 
<p>
Main creators of instances implementing this interface:<ul>
<li><a class="el" href="structiVFS.html#6d46cd7b7eefd7c4e8e7281394baf581" title="Open a file on the VFS filesystem.">iVFS::Open()</a> </li></ul>

<p>Definition at line <a class="el" href="vfs_8h-source.html#l00110">110</a> of file <a class="el" href="vfs_8h-source.html">vfs.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="f1da4c6ef65ca75360d134b0cd047dc9"></a><!-- doxytag: member="iFile::AtEOF" ref="f1da4c6ef65ca75360d134b0cd047dc9" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool iFile::AtEOF           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns true if the stream is at end-of-file, else false. 
<p>

<p>Implemented in <a class="el" href="classcsMemFile.html#ad2813d90ec4b3c13a04649b2b5c37af">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#3401ae3ad0abae373dacab4ba222b151">csPhysicalFile</a>.</p>

</div>
</div><p>
<a class="anchor" name="eae974e73b0c49bf22d6c11c4c4f5eb2"></a><!-- doxytag: member="iFile::Flush" ref="eae974e73b0c49bf22d6c11c4c4f5eb2" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void iFile::Flush           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Flush stream. 
<p>

<p>Implemented in <a class="el" href="classcsMemFile.html#b4851e941844524a07eafb8c0b93c779">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#54db1b8e06d2052ef8ccd6e79f699ab4">csPhysicalFile</a>.</p>

</div>
</div><p>
<a class="anchor" name="8b4612b4492382cf2d4f17dd4bbf364e"></a><!-- doxytag: member="iFile::GetAllData" ref="8b4612b4492382cf2d4f17dd4bbf364e" args="(bool nullterm=false)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classcsPtr.html">csPtr</a>&lt;<a class="el" href="structiDataBuffer.html">iDataBuffer</a>&gt; iFile::GetAllData           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>nullterm</em> = <code>false</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Request whole content of the file as a single data buffer. 
<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>nullterm</em>&nbsp;</td><td>Set this to true if you want a null char to be appended to the buffer (e.g. for use with string functions.) </td></tr>
  </table>
</dl>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Null-termination might have a performance penalty (depending upon where the file is stored.) Use only when needed. </dd></dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The complete data contained in the file; or an invalidated pointer if this object does not support this function (e.g. write-only VFS files). Check for an invalidated result via <a class="el" href="classcsRef.html#620198af96e2f744bab6207d9c546ed8" title="Smart pointer validity check.">csRef&lt;&gt;::IsValid()</a>. Do not modify the contained data! </dd></dl>

<p>Implemented in <a class="el" href="classcsMemFile.html#ef66782be803c3534a755ccb7844f58e">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#354114912f66ca387233678eed9230f3">csPhysicalFile</a>.</p>

</div>
</div><p>
<a class="anchor" name="0d39996448ca1794faa2bdf58d6b186b"></a><!-- doxytag: member="iFile::GetName" ref="0d39996448ca1794faa2bdf58d6b186b" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* iFile::GetName           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Query file name (in VFS). 
<p>

<p>Implemented in <a class="el" href="classcsMemFile.html#a4bf78fccb504a3c9d938b2950ee8d34">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#47042151625f5adf1fb93fc5d6103d46">csPhysicalFile</a>.</p>

</div>
</div><p>
<a class="anchor" name="63192d4c90e269feef6075d8c7f81efb"></a><!-- doxytag: member="iFile::GetPos" ref="63192d4c90e269feef6075d8c7f81efb" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t iFile::GetPos           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Query current file pointer. 
<p>

<p>Implemented in <a class="el" href="classcsMemFile.html#abfa720728dfe01f03c0272a413873ba">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#a14eb2c802069e4873282fe926927b3c">csPhysicalFile</a>.</p>

</div>
</div><p>
<a class="anchor" name="184c528adfec25f53545fe9271ff374b"></a><!-- doxytag: member="iFile::GetSize" ref="184c528adfec25f53545fe9271ff374b" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t iFile::GetSize           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Query file size. 
<p>

<p>Implemented in <a class="el" href="classcsMemFile.html#67936bab115af26874b4579a5c3f53bf">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#41b8f1cf3656e48169e9ce2e3258ad4e">csPhysicalFile</a>.</p>

</div>
</div><p>
<a class="anchor" name="a0f33b299c54426c60d5ce7d9f1db8de"></a><!-- doxytag: member="iFile::GetStatus" ref="a0f33b299c54426c60d5ce7d9f1db8de" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int iFile::GetStatus           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check (and clear) file last error status. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__vfs.html#gf655ca2c3b3f4c242b7e719f83d73e3c" title="Access denied: either you have no write access, the filesystem is read-only or you...">VFS_STATUS_ACCESSDENIED</a> </dd></dl>

<p>Implemented in <a class="el" href="classcsMemFile.html#933a67a9a10e158a3a3a1201941e423c">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#e72b1738a6790dc09b5a1a48d248e22e">csPhysicalFile</a>.</p>

</div>
</div><p>
<a class="anchor" name="23a8ceeaf85b15241acd3ef2f98b78d4"></a><!-- doxytag: member="iFile::Read" ref="23a8ceeaf85b15241acd3ef2f98b78d4" args="(char *Data, size_t DataSize)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t iFile::Read           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>Data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>DataSize</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read DataSize bytes and place them into the buffer at which Data points. 
<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>Data</em>&nbsp;</td><td>Pointer to the buffer into which the data should be read. The buffer should be at least DataSize bytes in size. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>DataSize</em>&nbsp;</td><td>Number of bytes to read. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of bytes actually read. If an error occurs, zero is returned. Invoke <a class="el" href="structiFile.html#a0f33b299c54426c60d5ce7d9f1db8de" title="Check (and clear) file last error status.">GetStatus()</a> to retrieve the error code. </dd></dl>

<p>Implemented in <a class="el" href="classcsMemFile.html#20215cecbaaf5122253b77f20862f8ea">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#3c42887b6321353c86c0f90171cfb0e2">csPhysicalFile</a>.</p>

</div>
</div><p>
<a class="anchor" name="411c083eb2f6745a7fa0fe15f598ad0b"></a><!-- doxytag: member="iFile::SetPos" ref="411c083eb2f6745a7fa0fe15f598ad0b" args="(size_t newpos)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool iFile::SetPos           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>newpos</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set new file pointer. 
<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>newpos</em>&nbsp;</td><td>New position in file. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the operation succeeded, else false. </dd></dl>

<p>Implemented in <a class="el" href="classcsMemFile.html#9577865cdba807b26362a59a11baa7a4">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#a619cec9b6dfbaa32679ee398f610052">csPhysicalFile</a>.</p>

<p>Referenced by <a class="el" href="filereadhelper_8h-source.html#l00049">csFileReadHelper::Skip()</a>.</p>

</div>
</div><p>
<a class="anchor" name="73a0d4bf182d42deb70e9982c3b17af7"></a><!-- doxytag: member="iFile::Write" ref="73a0d4bf182d42deb70e9982c3b17af7" args="(const char *Data, size_t DataSize)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t iFile::Write           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>Data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>DataSize</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Write DataSize bytes from the buffer at which Data points. 
<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>Data</em>&nbsp;</td><td>Pointer to the data to be written. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>DataSize</em>&nbsp;</td><td>Number of bytes to write. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of bytes actually written. If an error occurs, zero is returned. Invoke <a class="el" href="structiFile.html#a0f33b299c54426c60d5ce7d9f1db8de" title="Check (and clear) file last error status.">GetStatus()</a> to retrieve the error code. </dd></dl>

<p>Implemented in <a class="el" href="classcsMemFile.html#ec57eadb7ecd407ededeca5bf1685ae4">csMemFile</a>, and <a class="el" href="classcsPhysicalFile.html#e94489794fea57bcc3051df2a1f93643">csPhysicalFile</a>.</p>

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