⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classpmemoryfile.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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>PMemoryFile class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><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="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>PMemoryFile Class Reference</h1><code>#include &lt;<a class="el" href="memfile_8h-source.html">memfile.h</a>&gt;</code><p><p>Inheritance diagram for PMemoryFile:<p><center><img src="classPMemoryFile.png" usemap="#PMemoryFile_map" border="0" alt=""></center><map name="PMemoryFile_map"><area href="classPFile.html" alt="PFile" shape="rect" coords="0,112,87,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="0,56,87,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,87,24"></map><a href="classPMemoryFile-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 Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Construction</div></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z483_0">PMemoryFile</a> ()</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z483_1">PMemoryFile</a> (const <a class="el" href="classPBYTEArray.html">PBYTEArray</a> &amp;<a class="el" href="classPMemoryFile.html#n0">data</a>)</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PObject</div></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPObject.html#z199_0">Comparison</a>&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z485_0">Compare</a> (const <a class="el" href="classPObject.html">PObject</a> &amp;obj) const</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PChannel</div></td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z487_0">Read</a> (void *buf, PINDEX len)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z487_1">Write</a> (const void *buf, PINDEX len)</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PFile</div></td></tr><tr><td nowrap align=right valign=top>off_t&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z489_0">GetLength</a> () const</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z489_1">SetLength</a> (off_t len)</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z489_2">SetPosition</a> (off_t pos, <a class="el" href="classPFile.html#z133_0">FilePositionOrigin</a> origin=Start)</td></tr><tr><td nowrap align=right valign=top>off_t&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z489_3">GetPosition</a> () const</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PFile</div></td></tr><tr><td nowrap align=right valign=top>const <a class="el" href="classPBYTEArray.html">PBYTEArray</a> &amp;&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#z491_0">GetData</a> () const</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPBYTEArray.html">PBYTEArray</a>&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#n0">data</a></td></tr><tr><td nowrap align=right valign=top>off_t&nbsp;</td><td valign=bottom><a class="el" href="classPMemoryFile.html#n1">position</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class is used to allow a block of memory to substitute for a disk file. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="z483_0" doxytag="PMemoryFile::PMemoryFile"></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"> PMemoryFile::PMemoryFile </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>Create a new, empty, memory file.     </td>  </tr></table><a name="z483_1" doxytag="PMemoryFile::PMemoryFile"></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"> PMemoryFile::PMemoryFile </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPBYTEArray.html">PBYTEArray</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>data</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>Create a new memory file initialising to the specified content. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>data</em>&nbsp;</td><td>New content filr memory file. </td></tr></table></dl>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="z485_0" doxytag="PMemoryFile::Compare"></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"> <a class="el" href="classPObject.html#z199_0">Comparison</a> PMemoryFile::Compare </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPObject.html">PObject</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>obj</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Determine the relative rank of the two objects. This is essentially the string comparison of the PFilePath# names of the files.<p><dl compact><dt><b>Returns: </b></dt><dd> relative rank of the file paths. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>obj</em>&nbsp;</td><td>Other file to compare against. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPFile.html#z127_0">PFile</a>.    </td>  </tr></table><a name="z491_0" doxytag="PMemoryFile::GetData"></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"> const <a class="el" href="classPBYTEArray.html">PBYTEArray</a>&amp; PMemoryFile::GetData </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> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the memory data the file has operated with.     </td>  </tr></table><a name="z489_0" doxytag="PMemoryFile::GetLength"></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"> off_t PMemoryFile::GetLength </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><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the current size of the file. The size of the file corresponds to the size of the data array.<p><dl compact><dt><b>Returns: </b></dt><dd> length of file in bytes. </dl><p>Reimplemented from <a class="el" href="classPFile.html#z133_5">PFile</a>.    </td>  </tr></table><a name="z489_3" doxytag="PMemoryFile::GetPosition"></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"> off_t PMemoryFile::GetPosition </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><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the current active position in the file for the next read or write operation.<p><dl compact><dt><b>Returns: </b></dt><dd> current file position relative to start of file. </dl><p>Reimplemented from <a class="el" href="classPFile.html#z133_8">PFile</a>.    </td>  </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -