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

📄 classchm_1_1chmistream.html

📁 It is a chm file viewer lib with source code
💻 HTML
字号:
<!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>chm::chmistream 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="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>chm::chmistream Class Reference</h1>Inputstream for reading files inside a chm archives. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="chmxx_8h-source.html">chmxx.h</a>&gt;</code><p><a href="classchm_1_1chmistream-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 nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a0">chmistream</a> (const <a class="el" href="classchm_1_1chmfile.html">chmfile</a> &amp;chm, const std::string &amp;path, size_t buf_size=1024)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Create a new input stream from archive for given path.</em> <a href="#a0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>std::streamsize&nbsp;</td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a1">read_left</a> () const</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Returns the number of bytes that are left to be read from this stream.</em> <a href="#a1"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a2">~chmistream</a> ()</td></tr><tr><td nowrap align=right valign=top>size_t&nbsp;</td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a3">get_encint</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Get little endian MS encint from the stream.</em> <a href="#a3"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a4">get_dword</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Get local endianized MS dword (2 x 2 bytes) from the stream.</em> <a href="#a4"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>unsigned int&nbsp;</td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a5">get_word</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Get local endianized MS word (2 bytes) from the stream.</em> <a href="#a5"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a6">get_sr</a> (int s, int r, int &amp;pos)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Get a s-r encoded value from the stream.</em> <a href="#a6"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a7">get_sr_finish</a> (int &amp;pos)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Inputstream for reading files inside a chm archives.<p><div class="fragment"><pre>        <a class="code" href="classchm_1_1chmfile.html">chm::chmfile</a> chm(<span class="stringliteral">"/chmfile.chm"</span>);        <a class="code" href="classchm_1_1chmistream.html">chm::chmistream</a> in(chm, <span class="stringliteral">"/path"</span>);        string line;        <span class="keywordflow">while</span> ( readline(chm, line) ) {            cout &lt;&lt; line;        }</pre></div> <p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00148">148</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="chm::chmistream::chmistream"></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"> chm::chmistream::chmistream </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classchm_1_1chmfile.html">chmfile</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>chm</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const std::string &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>path</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>size_t&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>buf_size</em> = 1024</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 new input stream from archive for given path.<p>    </td>  </tr></table><a name="a2" doxytag="chm::chmistream::~chmistream"></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"> virtual chm::chmistream::~chmistream </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>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a4" doxytag="chm::chmistream::get_dword"></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"> unsigned long chm::chmistream::get_dword </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> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get local endianized MS dword (2 x 2 bytes) from the stream.<p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00176">176</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>.    </td>  </tr></table><a name="a3" doxytag="chm::chmistream::get_encint"></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"> size_t chm::chmistream::get_encint </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> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get little endian MS encint from the stream.<p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00160">160</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>.    </td>  </tr></table><a name="a6" doxytag="chm::chmistream::get_sr"></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"> unsigned long chm::chmistream::get_sr </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>s</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>r</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>pos</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get a s-r encoded value from the stream.<p>Scale must alwqays be 2. Use 0 for initial pos. When finished reading an entry of sr-s call the get_sr_finish(pos). <p>Definition at line <a class="el" href="chmxx_8h-source.html#l00213">213</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>.    </td>  </tr></table><a name="a7" doxytag="chm::chmistream::get_sr_finish"></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"> void chm::chmistream::get_sr_finish </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>pos</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00253">253</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>.    </td>  </tr></table><a name="a5" doxytag="chm::chmistream::get_word"></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"> unsigned int chm::chmistream::get_word </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> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get local endianized MS word (2 bytes) from the stream.<p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00195">195</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>.    </td>  </tr></table><a name="a1" doxytag="chm::chmistream::read_left"></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"> std::streamsize chm::chmistream::read_left </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>Returns the number of bytes that are left to be read from this stream.<p>So returns the size of file when nothing has been read.     </td>  </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="chmxx_8h-source.html">chmxx.h</a></ul><hr>Copyright &copy; 2003 Indrek Mandre <script language="JavaScript">  document.write ('&lt;<a href="mailto:indrek' + '@' + 'mare.ee">indrek' + '@' + 'mare.ee</a>&gt;');</script><p>&nbsp;</p>

⌨️ 快捷键说明

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