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

📄 classpstructuredfile.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>PStructuredFile 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>PStructuredFile Class Reference</h1><code>#include &lt;<a class="el" href="sfile_8h-source.html">sfile.h</a>&gt;</code><p><p>Inheritance diagram for PStructuredFile:<p><center><img src="classPStructuredFile.png" usemap="#PStructuredFile_map" border="0" alt=""></center><map name="PStructuredFile_map"><area href="classPFile.html" alt="PFile" shape="rect" coords="0,112,100,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="0,56,100,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,100,24"></map><a href="classPStructuredFile-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Structure definition functions</h2></td></tr><tr><td nowrap align=right valign=top>enum &nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#z361_0">ElementType</a> { <br>&nbsp;&nbsp;<a class="el" href="classPStructuredFile.html#z361_0s0">Character</a>, <a class="el" href="classPStructuredFile.html#z361_0s1">Integer16</a>, <a class="el" href="classPStructuredFile.html#z361_0s2">Integer32</a>, <a class="el" href="classPStructuredFile.html#z361_0s3">Integer64</a>, <br>&nbsp;&nbsp;<a class="el" href="classPStructuredFile.html#z361_0s4">Float32</a>, <a class="el" href="classPStructuredFile.html#z361_0s5">Float64</a>, <a class="el" href="classPStructuredFile.html#z361_0s6">Float80</a>, <a class="el" href="classPStructuredFile.html#z361_0s7">NumElementTypes</a><br> }</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>All element types in a structure.</em> <a href="#z361_0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>PINDEX&nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#z361_1">GetStructureSize</a> ()</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#z361_2">SetStructure</a> (<a class="el" href="structPStructuredFile_1_1Element.html">Element</a> *<a class="el" href="classPStructuredFile.html#n1">structure</a>, PINDEX <a class="el" href="classPStructuredFile.html#n2">numElements</a>)</td></tr><tr><td colspan=2><br><h2>Public Types</h2></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="classPStructuredFile.html#z357_0">PStructuredFile</a> ()</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#z357_1">PStructuredFile</a> (<a class="el" href="classPFile.html#z125_0">OpenMode</a> mode, int opts=ModeDefault)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#z357_2">PStructuredFile</a> (const <a class="el" href="classPFilePath.html">PFilePath</a> &amp;name, <a class="el" href="classPFile.html#z125_0">OpenMode</a> mode=ReadWrite, int opts=ModeDefault)</td></tr><tr><td colspan="2"><div class="groupHeader">Structured I/O functions</div></td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#z359_0">Read</a> (void *buffer)</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#z359_1">Write</a> (const void *buffer)</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top>PINDEX&nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#n0">structureSize</a></td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Number of bytes in structure.</em> <a href="#n0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="structPStructuredFile_1_1Element.html">Element</a> *&nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#n1">structure</a></td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Array of elements in the structure.</em> <a href="#n1"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>PINDEX&nbsp;</td><td valign=bottom><a class="el" href="classPStructuredFile.html#n2">numElements</a></td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Number of elements in the array.</em> <a href="#n2"></a><em></em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>A class representing a a structured file that is portable accross CPU architectures (as in the XDR protocol).<p>This differs from object serialisation in that the access is always to a disk file and is random access. It would primarily be used for database type applications. <p><hr><h2>Member Enumeration Documentation</h2><a name="z361_0" doxytag="PStructuredFile::ElementType"></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"> enum PStructuredFile::ElementType      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>All element types in a structure.<p><dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a name="z361_0s0" doxytag="Character"></a><em>Character</em></em>&nbsp;</td><td><a class="el" href="structPStructuredFile_1_1Element.html">Element</a> is a single character.</td></tr><tr><td valign=top><em><a name="z361_0s1" doxytag="Integer16"></a><em>Integer16</em></em>&nbsp;</td><td><a class="el" href="structPStructuredFile_1_1Element.html">Element</a> is a 16 bit integer.</td></tr><tr><td valign=top><em><a name="z361_0s2" doxytag="Integer32"></a><em>Integer32</em></em>&nbsp;</td><td><a class="el" href="structPStructuredFile_1_1Element.html">Element</a> is a 32 bit integer.</td></tr><tr><td valign=top><em><a name="z361_0s3" doxytag="Integer64"></a><em>Integer64</em></em>&nbsp;</td><td><a class="el" href="structPStructuredFile_1_1Element.html">Element</a> is a 64 bit integer.</td></tr><tr><td valign=top><em><a name="z361_0s4" doxytag="Float32"></a><em>Float32</em></em>&nbsp;</td><td><a class="el" href="structPStructuredFile_1_1Element.html">Element</a> is a 32 bit IEE floating point number.</td></tr><tr><td valign=top><em><a name="z361_0s5" doxytag="Float64"></a><em>Float64</em></em>&nbsp;</td><td><a class="el" href="structPStructuredFile_1_1Element.html">Element</a> is a 64 bit IEE floating point number.</td></tr><tr><td valign=top><em><a name="z361_0s6" doxytag="Float80"></a><em>Float80</em></em>&nbsp;</td><td><a class="el" href="structPStructuredFile_1_1Element.html">Element</a> is a 80 bit IEE floating point number.</td></tr><tr><td valign=top><em><a name="z361_0s7" doxytag="NumElementTypes"></a><em>NumElementTypes</em></em>&nbsp;</td><td></td></tr></table></dl>    </td>  </tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="z357_0" doxytag="PStructuredFile::PStructuredFile"></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"> PStructuredFile::PStructuredFile </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 structured file object but do not open it. It does not initially have a valid file name. However, an attempt to open the file using the PFile::Open()# function will generate a unique temporary file.<p>The initial structure size is one byte.     </td>  </tr></table><a name="z357_1" doxytag="PStructuredFile::PStructuredFile"></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"> PStructuredFile::PStructuredFile </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classPFile.html#z125_0">OpenMode</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>mode</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>opts</em> = ModeDefault</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Create a unique temporary file name, and open the file in the specified mode and using the specified options. Note that opening a new, unique, temporary file name in ReadOnly mode will always fail. This would only be usefull in a mode and options that will create the file.<p>The PChannel::IsOpen()# function may be used after object construction to determine if the file was successfully opened. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>opts</em>&nbsp;</td><td>Mode in which to open the file. <a class="el" href="classPFile.html#z125_1">OpenOptions</a> enum# for open operation. </td></tr></table></dl>    </td>  </tr></table><a name="z357_2" doxytag="PStructuredFile::PStructuredFile"></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"> PStructuredFile::PStructuredFile </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPFilePath.html">PFilePath</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>name</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classPFile.html#z125_0">OpenMode</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>mode</em> = ReadWrite, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>opts</em> = ModeDefault</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Create a structured file object with the specified name and open it in the specified mode and with the specified options.<p>The PChannel::IsOpen()# function may be used after object construction to determine if the file was successfully opened. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>mode</em>&nbsp;</td><td>Name of file to open. </td></tr><tr><td valign=top><em>opts</em>&nbsp;</td><td>Mode in which to open the file. <a class="el" href="classPFile.html#z125_1">OpenOptions</a> enum# for open operation. </td></tr></table></dl>    </td>  </tr></table>

⌨️ 快捷键说明

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